Index: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java =================================================================== --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (revision 1037574) +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (working copy) @@ -315,6 +315,14 @@ HIVEFETCHOUTPUTSERDE("hive.fetch.output.serde", "org.apache.hadoop.hive.serde2.DelimitedJSONSerDe"), SEMANTIC_ANALYZER_HOOK("hive.semantic.analyzer.hook",null), + + HIVE_AUTHORIZATION_ENABLED("hive.security.authorization.enabled", false), + HIVE_AUTHORIZATION_MANAGER("hive.security.authorization.manager", null), + HIVE_AUTHENTICATOR_MANAGER("hive.security.authenticator.manager", null), + HIVE_AUTHORIZATION_TABLE_OWNER_GRANTS("hive.exec.security.authorization.table.owner.grants", null), + HIVE_AUTHORIZATION_TABLE_USER_GRANTS("hive.exec.security.authorization.table.user.grants", null), + HIVE_AUTHORIZATION_TABLE_GROUP_GRANTS("hive.exec.security.authorization.table.group.grants", null), + HIVE_AUTHORIZATION_TABLE_ROLE_GRANTS("hive.exec.security.authorization.table.role.grants", null), ; Index: conf/hive-default.xml =================================================================== --- conf/hive-default.xml (revision 1037574) +++ conf/hive-default.xml (working copy) @@ -786,4 +786,52 @@ Default property values for newly created tables + + hive.security.authorization.enabled + false + enable or disable the hive client authorization + + + + hive.security.authorization.manager + org.apache.hadoop.hive.ql.security.authorization.DefaultAuthorizationProviderManager + the hive client authorization manager class name + + + + hive.security.authenticator.manager + org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator + hive client authenticator manager class name + + + + hive.exec.security.authorization.table.owner.grants + + the privileges automatically granted to the owner + + + + hive.exec.security.authorization.table.user.grants + + the privileges automatically granted to some users whenenve a table gets created. + An example like "userX,userY:select;userZ:create" will grant select privilege to userX and userY, + and grant create privilege to userZ whenenve a new table created. + + + + hive.exec.security.authorization.table.group.grants + + the privileges automatically granted to some groups whenenve a table gets created. + An example like "groupX,groupY:select;groupZ:create" will grant select privilege to groupX and groupY, + and grant create privilege to groupZ whenenve a new table created. + + + + hive.exec.security.authorization.table.role.grants + + the privileges automatically granted to some groups whenenve a table gets created. + An example like "roleX,roleY:select;roleZ:create" will grant select privilege to roleX and roleY, + and grant create privilege to roleZ whenenve a new table created. + + Index: metastore/if/hive_metastore.thrift =================================================================== --- metastore/if/hive_metastore.thrift (revision 1037574) +++ metastore/if/hive_metastore.thrift (working copy) @@ -29,11 +29,25 @@ 4: optional list fields // if the name is one of the user defined types } +struct PrincipalPrivilegeSet { + 1: map userPrivileges, // user name -> privilege set + 2: map groupPrivileges, // group name -> privilege set + 3: map rolePrivileges, //role name -> privilege set +} + // namespace for tables struct Database { 1: string name, 2: string description, 3: string locationUri, + 4: optional PrincipalPrivilegeSet privileges +} + +struct Role { + 1: string roleName, + 2: Database database, + 3: i32 createTime, + 4: string ownerName, } // This object holds the information needed by SerDes @@ -76,7 +90,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 { @@ -86,7 +101,8 @@ 4: i32 createTime, 5: i32 lastAccessTime, 6: StorageDescriptor sd, - 7: map parameters + 7: map parameters, + 8: optional PrincipalPrivilegeSet privileges } struct Index { @@ -109,6 +125,62 @@ 2: map properties } +struct ColumnPrivilegeBag { + 1: string dbName, + 2: string tableName, + 3: string partitionName, + 4: map columnPrivileges +} + +struct PrivilegeBag { + 1: string userPrivileges, //user privileges + 2: map dbPrivileges, //database privileges + 3: map tablePrivileges, //table privileges + 4: map partitionPrivileges, //partition privileges + 5: list columnPrivileges, //column privileges +} + +struct SecurityUser { + 1: string principalName, + 2: bool isRole, + 3: bool isGroup, + 4: string privileges, + 5: i32 createTime, + 6: string grantor, +} + +struct SecurityDB { + 1: string principalName, + 2: bool isRole, + 3: bool isGroup, + 4: string privileges, + 5: i32 createTime, + 6: string grantor, + 7: Database db, +} + +struct SecurityTablePartition { + 1: string principalName, + 2: bool isRole, + 3: bool isGroup, + 4: string privileges, + 5: i32 createTime, + 6: string grantor, + 7: Table table, + 8: Partition part, +} + +struct SecurityColumn { + 1: string principalName, + 2: bool isRole, + 3: bool isGroup, + 4: string privileges, + 5: i32 createTime, + 6: string grantor, + 7: Table table, + 8: Partition partition, + 9: string column, +} exception MetaException { 1: string message @@ -208,6 +280,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) @@ -215,6 +291,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) @@ -227,6 +306,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) @@ -271,6 +353,46 @@ throws(1:NoSuchObjectException o1, 2:MetaException o2) list get_index_names(1:string db_name, 2:string tbl_name, 3:i16 max_indexes=-1) throws(1:MetaException o2) + + //authorization privileges + PrincipalPrivilegeSet get_user_privilege_set (1: string user_name, 2: list group_names) + throws(1:MetaException o1) + PrincipalPrivilegeSet get_db_privilege_set (1: string db_name, 2: string user_name, 3: list group_names) + throws(1:MetaException o1) + PrincipalPrivilegeSet get_table_privilege_set (1: string db_name, 2: string table_name, 3: string user_name, 4: list group_names) + throws(1:MetaException o1) + PrincipalPrivilegeSet get_partition_privilege_set (1: string db_name, 2: string table_name, 3: string part_name, 4: string user_name, 5: list group_names) + throws(1:MetaException o1) + + PrincipalPrivilegeSet get_column_privilege_set (1: string db_name, 2: string table_name, 3: string part_name, 4: string column_name, 5: string user_name, 6: list group_names) + throws(1:MetaException o1) + + bool create_role(1: string role_name, 2: string owner_name, 3: string db_name) throws(1:MetaException o1) + + bool drop_role(1: string role_name, 2: string db_name) throws(1:MetaException o1) + + bool add_role_member (1: string role_name, 2: string user_name, 3: bool is_role, 4: bool is_group, 5: string db_name) throws(1:MetaException o1) + + bool remove_role_member (1: string role_name, 2: string user_name, 3: bool is_role, 4: bool is_group, 5: string db_name) throws(1:MetaException o1) + + list list_roles(1: string principal_name, 2: bool is_role, 3: bool is_group, 4: string db_name) throws(1:MetaException o1) + + list list_security_user_grant(1: string principla_name, 2: bool is_role, 3: bool is_group) throws(1:MetaException o1) + + list list_security_db_grant(1: string principal_name, 2: bool is_group, 3: bool is_role, 4: string db_name) throws(1:MetaException o1) + + list list_security_table_grant(1: string principal_name, 2: bool is_group, 3: bool is_role, 4: string db_name, 5: string table_name) throws(1:MetaException o1) + + list list_security_partition_grant(1: string principal_name, 2: bool is_group, 3: bool is_role, 4: string db_name, 5: string table_name, 6: string part_name) throws(1:MetaException o1) + + list list_security_column_grant(1: string principal_name, 2: bool is_group, 3: bool is_role, 4: string db_name, 5: string table_name, 6: string part_name, 7: string column_name) throws(1:MetaException o1) + + bool grant_privileges (1: string user_name, 2: bool is_role, 3: bool is_group, 4: PrivilegeBag privileges, 5: string grantor) throws(1:MetaException o1) + + bool revoke_privileges (1: string user_name, 2: bool is_role, 3: bool is_group, 4: PrivilegeBag privileges) throws(1:MetaException o1) + + bool revoke_all_privileges (1: string user_name, 2: bool is_role, 3: bool is_group, 4: bool remove_user_priv, 5: list dbs, + 6: list tables, 7: list parts, 8: map> columns) throws(1:MetaException o1) } // * Note about the DDL_TIME: When creating or altering a table or a partition, Index: metastore/src/gen-cpp/ThriftHiveMetastore.cpp =================================================================== --- metastore/src/gen-cpp/ThriftHiveMetastore.cpp (revision 1037574) +++ metastore/src/gen-cpp/ThriftHiveMetastore.cpp (working copy) @@ -701,14 +701,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size90; - apache::thrift::protocol::TType _etype93; - iprot->readListBegin(_etype93, _size90); - this->success.resize(_size90); - uint32_t _i94; - for (_i94 = 0; _i94 < _size90; ++_i94) + 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) { - xfer += iprot->readString(this->success[_i94]); + xfer += iprot->readString(this->success[_i156]); } 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 _iter95; - for (_iter95 = this->success.begin(); _iter95 != this->success.end(); ++_iter95) + std::vector ::const_iterator _iter157; + for (_iter157 = this->success.begin(); _iter157 != this->success.end(); ++_iter157) { - xfer += oprot->writeString((*_iter95)); + xfer += oprot->writeString((*_iter157)); } xfer += oprot->writeListEnd(); } @@ -789,14 +789,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size96; - apache::thrift::protocol::TType _etype99; - iprot->readListBegin(_etype99, _size96); - (*(this->success)).resize(_size96); - uint32_t _i100; - for (_i100 = 0; _i100 < _size96; ++_i100) + uint32_t _size158; + apache::thrift::protocol::TType _etype161; + iprot->readListBegin(_etype161, _size158); + (*(this->success)).resize(_size158); + uint32_t _i162; + for (_i162 = 0; _i162 < _size158; ++_i162) { - xfer += iprot->readString((*(this->success))[_i100]); + xfer += iprot->readString((*(this->success))[_i162]); } iprot->readListEnd(); } @@ -897,14 +897,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size101; - apache::thrift::protocol::TType _etype104; - iprot->readListBegin(_etype104, _size101); - this->success.resize(_size101); - uint32_t _i105; - for (_i105 = 0; _i105 < _size101; ++_i105) + 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) { - xfer += iprot->readString(this->success[_i105]); + xfer += iprot->readString(this->success[_i167]); } 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 _iter106; - for (_iter106 = this->success.begin(); _iter106 != this->success.end(); ++_iter106) + std::vector ::const_iterator _iter168; + for (_iter168 = this->success.begin(); _iter168 != this->success.end(); ++_iter168) { - xfer += oprot->writeString((*_iter106)); + xfer += oprot->writeString((*_iter168)); } xfer += oprot->writeListEnd(); } @@ -985,14 +985,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size107; - apache::thrift::protocol::TType _etype110; - iprot->readListBegin(_etype110, _size107); - (*(this->success)).resize(_size107); - uint32_t _i111; - for (_i111 = 0; _i111 < _size107; ++_i111) + uint32_t _size169; + apache::thrift::protocol::TType _etype172; + iprot->readListBegin(_etype172, _size169); + (*(this->success)).resize(_size169); + uint32_t _i173; + for (_i173 = 0; _i173 < _size169; ++_i173) { - xfer += iprot->readString((*(this->success))[_i111]); + xfer += iprot->readString((*(this->success))[_i173]); } iprot->readListEnd(); } @@ -1721,17 +1721,17 @@ if (ftype == apache::thrift::protocol::T_MAP) { { this->success.clear(); - uint32_t _size112; - apache::thrift::protocol::TType _ktype113; - apache::thrift::protocol::TType _vtype114; - iprot->readMapBegin(_ktype113, _vtype114, _size112); - uint32_t _i116; - for (_i116 = 0; _i116 < _size112; ++_i116) + uint32_t _size174; + apache::thrift::protocol::TType _ktype175; + apache::thrift::protocol::TType _vtype176; + iprot->readMapBegin(_ktype175, _vtype176, _size174); + uint32_t _i178; + for (_i178 = 0; _i178 < _size174; ++_i178) { - std::string _key117; - xfer += iprot->readString(_key117); - Type& _val118 = this->success[_key117]; - xfer += _val118.read(iprot); + std::string _key179; + xfer += iprot->readString(_key179); + Type& _val180 = this->success[_key179]; + xfer += _val180.read(iprot); } iprot->readMapEnd(); } @@ -1770,11 +1770,11 @@ xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_MAP, 0); { xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRUCT, this->success.size()); - std::map ::const_iterator _iter119; - for (_iter119 = this->success.begin(); _iter119 != this->success.end(); ++_iter119) + std::map ::const_iterator _iter181; + for (_iter181 = this->success.begin(); _iter181 != this->success.end(); ++_iter181) { - xfer += oprot->writeString(_iter119->first); - xfer += _iter119->second.write(oprot); + xfer += oprot->writeString(_iter181->first); + xfer += _iter181->second.write(oprot); } xfer += oprot->writeMapEnd(); } @@ -1813,17 +1813,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 _size182; + apache::thrift::protocol::TType _ktype183; + apache::thrift::protocol::TType _vtype184; + iprot->readMapBegin(_ktype183, _vtype184, _size182); + uint32_t _i186; + for (_i186 = 0; _i186 < _size182; ++_i186) { - std::string _key125; - xfer += iprot->readString(_key125); - Type& _val126 = (*(this->success))[_key125]; - xfer += _val126.read(iprot); + std::string _key187; + xfer += iprot->readString(_key187); + Type& _val188 = (*(this->success))[_key187]; + xfer += _val188.read(iprot); } iprot->readMapEnd(); } @@ -1952,14 +1952,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size127; - apache::thrift::protocol::TType _etype130; - iprot->readListBegin(_etype130, _size127); - this->success.resize(_size127); - uint32_t _i131; - for (_i131 = 0; _i131 < _size127; ++_i131) + uint32_t _size189; + apache::thrift::protocol::TType _etype192; + iprot->readListBegin(_etype192, _size189); + this->success.resize(_size189); + uint32_t _i193; + for (_i193 = 0; _i193 < _size189; ++_i193) { - xfer += this->success[_i131].read(iprot); + xfer += this->success[_i193].read(iprot); } iprot->readListEnd(); } @@ -2014,10 +2014,10 @@ xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter132; - for (_iter132 = this->success.begin(); _iter132 != this->success.end(); ++_iter132) + std::vector ::const_iterator _iter194; + for (_iter194 = this->success.begin(); _iter194 != this->success.end(); ++_iter194) { - xfer += (*_iter132).write(oprot); + xfer += (*_iter194).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2064,14 +2064,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size133; - apache::thrift::protocol::TType _etype136; - iprot->readListBegin(_etype136, _size133); - (*(this->success)).resize(_size133); - uint32_t _i137; - for (_i137 = 0; _i137 < _size133; ++_i137) + uint32_t _size195; + apache::thrift::protocol::TType _etype198; + iprot->readListBegin(_etype198, _size195); + (*(this->success)).resize(_size195); + uint32_t _i199; + for (_i199 = 0; _i199 < _size195; ++_i199) { - xfer += (*(this->success))[_i137].read(iprot); + xfer += (*(this->success))[_i199].read(iprot); } iprot->readListEnd(); } @@ -2216,14 +2216,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size138; - apache::thrift::protocol::TType _etype141; - iprot->readListBegin(_etype141, _size138); - this->success.resize(_size138); - uint32_t _i142; - for (_i142 = 0; _i142 < _size138; ++_i142) + 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[_i142].read(iprot); + xfer += this->success[_i204].read(iprot); } iprot->readListEnd(); } @@ -2278,10 +2278,10 @@ xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter143; - for (_iter143 = this->success.begin(); _iter143 != this->success.end(); ++_iter143) + std::vector ::const_iterator _iter205; + for (_iter205 = this->success.begin(); _iter205 != this->success.end(); ++_iter205) { - xfer += (*_iter143).write(oprot); + xfer += (*_iter205).write(oprot); } xfer += oprot->writeListEnd(); } @@ -2328,14 +2328,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size144; - apache::thrift::protocol::TType _etype147; - iprot->readListBegin(_etype147, _size144); - (*(this->success)).resize(_size144); - uint32_t _i148; - for (_i148 = 0; _i148 < _size144; ++_i148) + 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))[_i148].read(iprot); + xfer += (*(this->success))[_i210].read(iprot); } iprot->readListEnd(); } @@ -2904,14 +2904,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size149; - apache::thrift::protocol::TType _etype152; - iprot->readListBegin(_etype152, _size149); - this->success.resize(_size149); - uint32_t _i153; - for (_i153 = 0; _i153 < _size149; ++_i153) + uint32_t _size211; + apache::thrift::protocol::TType _etype214; + iprot->readListBegin(_etype214, _size211); + this->success.resize(_size211); + uint32_t _i215; + for (_i215 = 0; _i215 < _size211; ++_i215) { - xfer += iprot->readString(this->success[_i153]); + xfer += iprot->readString(this->success[_i215]); } iprot->readListEnd(); } @@ -2950,10 +2950,10 @@ xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter154; - for (_iter154 = this->success.begin(); _iter154 != this->success.end(); ++_iter154) + std::vector ::const_iterator _iter216; + for (_iter216 = this->success.begin(); _iter216 != this->success.end(); ++_iter216) { - xfer += oprot->writeString((*_iter154)); + xfer += oprot->writeString((*_iter216)); } xfer += oprot->writeListEnd(); } @@ -2992,14 +2992,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - 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) + 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) { - xfer += iprot->readString((*(this->success))[_i159]); + xfer += iprot->readString((*(this->success))[_i221]); } iprot->readListEnd(); } @@ -3114,14 +3114,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size160; - apache::thrift::protocol::TType _etype163; - iprot->readListBegin(_etype163, _size160); - this->success.resize(_size160); - uint32_t _i164; - for (_i164 = 0; _i164 < _size160; ++_i164) + uint32_t _size222; + apache::thrift::protocol::TType _etype225; + iprot->readListBegin(_etype225, _size222); + this->success.resize(_size222); + uint32_t _i226; + for (_i226 = 0; _i226 < _size222; ++_i226) { - xfer += iprot->readString(this->success[_i164]); + xfer += iprot->readString(this->success[_i226]); } iprot->readListEnd(); } @@ -3160,10 +3160,10 @@ xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter165; - for (_iter165 = this->success.begin(); _iter165 != this->success.end(); ++_iter165) + std::vector ::const_iterator _iter227; + for (_iter227 = this->success.begin(); _iter227 != this->success.end(); ++_iter227) { - xfer += oprot->writeString((*_iter165)); + xfer += oprot->writeString((*_iter227)); } xfer += oprot->writeListEnd(); } @@ -3202,14 +3202,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - 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) + uint32_t _size228; + apache::thrift::protocol::TType _etype231; + iprot->readListBegin(_etype231, _size228); + (*(this->success)).resize(_size228); + uint32_t _i232; + for (_i232 = 0; _i232 < _size228; ++_i232) { - xfer += iprot->readString((*(this->success))[_i170]); + xfer += iprot->readString((*(this->success))[_i232]); } iprot->readListEnd(); } @@ -3914,14 +3914,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size171; - apache::thrift::protocol::TType _etype174; - iprot->readListBegin(_etype174, _size171); - this->part_vals.resize(_size171); - uint32_t _i175; - for (_i175 = 0; _i175 < _size171; ++_i175) + uint32_t _size233; + apache::thrift::protocol::TType _etype236; + iprot->readListBegin(_etype236, _size233); + this->part_vals.resize(_size233); + uint32_t _i237; + for (_i237 = 0; _i237 < _size233; ++_i237) { - xfer += iprot->readString(this->part_vals[_i175]); + xfer += iprot->readString(this->part_vals[_i237]); } iprot->readListEnd(); } @@ -3954,10 +3954,10 @@ xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter176; - for (_iter176 = this->part_vals.begin(); _iter176 != this->part_vals.end(); ++_iter176) + std::vector ::const_iterator _iter238; + for (_iter238 = this->part_vals.begin(); _iter238 != this->part_vals.end(); ++_iter238) { - xfer += oprot->writeString((*_iter176)); + xfer += oprot->writeString((*_iter238)); } xfer += oprot->writeListEnd(); } @@ -3979,10 +3979,10 @@ xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter177; - for (_iter177 = (*(this->part_vals)).begin(); _iter177 != (*(this->part_vals)).end(); ++_iter177) + std::vector ::const_iterator _iter239; + for (_iter239 = (*(this->part_vals)).begin(); _iter239 != (*(this->part_vals)).end(); ++_iter239) { - xfer += oprot->writeString((*_iter177)); + xfer += oprot->writeString((*_iter239)); } xfer += oprot->writeListEnd(); } @@ -4434,14 +4434,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size178; - apache::thrift::protocol::TType _etype181; - iprot->readListBegin(_etype181, _size178); - this->part_vals.resize(_size178); - uint32_t _i182; - for (_i182 = 0; _i182 < _size178; ++_i182) + 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[_i182]); + xfer += iprot->readString(this->part_vals[_i244]); } iprot->readListEnd(); } @@ -4482,10 +4482,10 @@ xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter183; - for (_iter183 = this->part_vals.begin(); _iter183 != this->part_vals.end(); ++_iter183) + std::vector ::const_iterator _iter245; + for (_iter245 = this->part_vals.begin(); _iter245 != this->part_vals.end(); ++_iter245) { - xfer += oprot->writeString((*_iter183)); + xfer += oprot->writeString((*_iter245)); } xfer += oprot->writeListEnd(); } @@ -4510,10 +4510,10 @@ xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter184; - for (_iter184 = (*(this->part_vals)).begin(); _iter184 != (*(this->part_vals)).end(); ++_iter184) + std::vector ::const_iterator _iter246; + for (_iter246 = (*(this->part_vals)).begin(); _iter246 != (*(this->part_vals)).end(); ++_iter246) { - xfer += oprot->writeString((*_iter184)); + xfer += oprot->writeString((*_iter246)); } xfer += oprot->writeListEnd(); } @@ -4942,14 +4942,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); - uint32_t _size185; - apache::thrift::protocol::TType _etype188; - iprot->readListBegin(_etype188, _size185); - this->part_vals.resize(_size185); - uint32_t _i189; - for (_i189 = 0; _i189 < _size185; ++_i189) + uint32_t _size247; + apache::thrift::protocol::TType _etype250; + iprot->readListBegin(_etype250, _size247); + this->part_vals.resize(_size247); + uint32_t _i251; + for (_i251 = 0; _i251 < _size247; ++_i251) { - xfer += iprot->readString(this->part_vals[_i189]); + xfer += iprot->readString(this->part_vals[_i251]); } iprot->readListEnd(); } @@ -4982,10 +4982,10 @@ xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter190; - for (_iter190 = this->part_vals.begin(); _iter190 != this->part_vals.end(); ++_iter190) + std::vector ::const_iterator _iter252; + for (_iter252 = this->part_vals.begin(); _iter252 != this->part_vals.end(); ++_iter252) { - xfer += oprot->writeString((*_iter190)); + xfer += oprot->writeString((*_iter252)); } xfer += oprot->writeListEnd(); } @@ -5007,10 +5007,10 @@ xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter191; - for (_iter191 = (*(this->part_vals)).begin(); _iter191 != (*(this->part_vals)).end(); ++_iter191) + std::vector ::const_iterator _iter253; + for (_iter253 = (*(this->part_vals)).begin(); _iter253 != (*(this->part_vals)).end(); ++_iter253) { - xfer += oprot->writeString((*_iter191)); + xfer += oprot->writeString((*_iter253)); } xfer += oprot->writeListEnd(); } @@ -5156,7 +5156,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_with_auth_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5193,9 +5193,49 @@ } break; case 3: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size254; + apache::thrift::protocol::TType _etype257; + iprot->readListBegin(_etype257, _size254); + this->part_vals.resize(_size254); + uint32_t _i258; + for (_i258 = 0; _i258 < _size254; ++_i258) + { + xfer += iprot->readString(this->part_vals[_i258]); + } + 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 _size259; + apache::thrift::protocol::TType _etype262; + iprot->readListBegin(_etype262, _size259); + this->group_names.resize(_size259); + uint32_t _i263; + for (_i263 = 0; _i263 < _size259; ++_i263) + { + xfer += iprot->readString(this->group_names[_i263]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; } else { xfer += iprot->skip(ftype); } @@ -5212,41 +5252,85 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_with_auth_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_with_auth_args"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); + std::vector ::const_iterator _iter264; + for (_iter264 = this->part_vals.begin(); _iter264 != this->part_vals.end(); ++_iter264) + { + xfer += oprot->writeString((*_iter264)); + } + 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 _iter265; + for (_iter265 = this->group_names.begin(); _iter265 != this->group_names.end(); ++_iter265) + { + xfer += oprot->writeString((*_iter265)); + } + 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 _iter266; + for (_iter266 = (*(this->part_vals)).begin(); _iter266 != (*(this->part_vals)).end(); ++_iter266) + { + xfer += oprot->writeString((*_iter266)); + } + 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 _iter267; + for (_iter267 = (*(this->group_names)).begin(); _iter267 != (*(this->group_names)).end(); ++_iter267) + { + xfer += oprot->writeString((*_iter267)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_with_auth_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5302,11 +5386,11 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_with_auth_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_with_auth_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); @@ -5326,7 +5410,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_with_auth_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5382,7 +5466,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_by_name_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5419,9 +5503,9 @@ } break; case 3: - if (ftype == apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_parts); - this->__isset.max_parts = true; + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; } else { xfer += iprot->skip(ftype); } @@ -5438,41 +5522,41 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_by_name_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_args"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->max_parts); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_by_name_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_pargs"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16((*(this->max_parts))); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_by_name_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5493,20 +5577,8 @@ switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _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[_i196].read(iprot); - } - iprot->readListEnd(); - } + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -5540,23 +5612,15 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_by_name_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter197; - for (_iter197 = this->success.begin(); _iter197 != this->success.end(); ++_iter197) - { - xfer += (*_iter197).write(oprot); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); @@ -5572,7 +5636,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_by_name_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5593,20 +5657,8 @@ switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _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))[_i202].read(iprot); - } - iprot->readListEnd(); - } + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -5640,7 +5692,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5696,9 +5748,9 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_args"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); @@ -5713,9 +5765,9 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pargs"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); @@ -5730,7 +5782,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5754,14 +5806,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size203; - apache::thrift::protocol::TType _etype206; - iprot->readListBegin(_etype206, _size203); - this->success.resize(_size203); - uint32_t _i207; - for (_i207 = 0; _i207 < _size203; ++_i207) + uint32_t _size268; + apache::thrift::protocol::TType _etype271; + iprot->readListBegin(_etype271, _size268); + this->success.resize(_size268); + uint32_t _i272; + for (_i272 = 0; _i272 < _size268; ++_i272) { - xfer += iprot->readString(this->success[_i207]); + xfer += this->success[_i272].read(iprot); } iprot->readListEnd(); } @@ -5772,6 +5824,14 @@ break; case 1: if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5790,26 +5850,30 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter208; - for (_iter208 = this->success.begin(); _iter208 != this->success.end(); ++_iter208) + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter273; + for (_iter273 = this->success.begin(); _iter273 != this->success.end(); ++_iter273) { - xfer += oprot->writeString((*_iter208)); + xfer += (*_iter273).write(oprot); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -5818,7 +5882,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5842,14 +5906,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size209; - apache::thrift::protocol::TType _etype212; - iprot->readListBegin(_etype212, _size209); - (*(this->success)).resize(_size209); - uint32_t _i213; - for (_i213 = 0; _i213 < _size209; ++_i213) + uint32_t _size274; + apache::thrift::protocol::TType _etype277; + iprot->readListBegin(_etype277, _size274); + (*(this->success)).resize(_size274); + uint32_t _i278; + for (_i278 = 0; _i278 < _size274; ++_i278) { - xfer += iprot->readString((*(this->success))[_i213]); + xfer += (*(this->success))[_i278].read(iprot); } iprot->readListEnd(); } @@ -5860,6 +5924,14 @@ break; case 1: if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5878,7 +5950,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -5915,29 +5987,37 @@ } break; case 3: + if (ftype == apache::thrift::protocol::T_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 _size214; - apache::thrift::protocol::TType _etype217; - iprot->readListBegin(_etype217, _size214); - this->part_vals.resize(_size214); - uint32_t _i218; - for (_i218 = 0; _i218 < _size214; ++_i218) + this->group_names.clear(); + uint32_t _size279; + apache::thrift::protocol::TType _etype282; + iprot->readListBegin(_etype282, _size279); + this->group_names.resize(_size279); + uint32_t _i283; + for (_i283 = 0; _i283 < _size279; ++_i283) { - xfer += iprot->readString(this->part_vals[_i218]); + xfer += iprot->readString(this->group_names[_i283]); } 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); } @@ -5954,63 +6034,69 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_with_auth_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_with_auth_args"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeI16(this->max_parts); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", apache::thrift::protocol::T_LIST, 5); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter219; - for (_iter219 = this->part_vals.begin(); _iter219 != this->part_vals.end(); ++_iter219) + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter284; + for (_iter284 = this->group_names.begin(); _iter284 != this->group_names.end(); ++_iter284) { - xfer += oprot->writeString((*_iter219)); + xfer += oprot->writeString((*_iter284)); } 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 _iter220; - for (_iter220 = (*(this->part_vals)).begin(); _iter220 != (*(this->part_vals)).end(); ++_iter220) + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter285; + for (_iter285 = (*(this->group_names)).begin(); _iter285 != (*(this->group_names)).end(); ++_iter285) { - xfer += oprot->writeString((*_iter220)); + xfer += oprot->writeString((*_iter285)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); - xfer += oprot->writeI16((*(this->max_parts))); - xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6034,14 +6120,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size221; - apache::thrift::protocol::TType _etype224; - iprot->readListBegin(_etype224, _size221); - this->success.resize(_size221); - uint32_t _i225; - for (_i225 = 0; _i225 < _size221; ++_i225) + uint32_t _size286; + apache::thrift::protocol::TType _etype289; + iprot->readListBegin(_etype289, _size286); + this->success.resize(_size286); + uint32_t _i290; + for (_i290 = 0; _i290 < _size286; ++_i290) { - xfer += this->success[_i225].read(iprot); + xfer += this->success[_i290].read(iprot); } iprot->readListEnd(); } @@ -6058,6 +6144,14 @@ xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -6070,20 +6164,20 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_with_auth_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_with_auth_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter226; - for (_iter226 = this->success.begin(); _iter226 != this->success.end(); ++_iter226) + std::vector ::const_iterator _iter291; + for (_iter291 = this->success.begin(); _iter291 != this->success.end(); ++_iter291) { - xfer += (*_iter226).write(oprot); + xfer += (*_iter291).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6092,13 +6186,17 @@ xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_with_auth_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6122,14 +6220,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size227; - apache::thrift::protocol::TType _etype230; - iprot->readListBegin(_etype230, _size227); - (*(this->success)).resize(_size227); - uint32_t _i231; - for (_i231 = 0; _i231 < _size227; ++_i231) + uint32_t _size292; + apache::thrift::protocol::TType _etype295; + iprot->readListBegin(_etype295, _size292); + (*(this->success)).resize(_size292); + uint32_t _i296; + for (_i296 = 0; _i296 < _size292; ++_i296) { - xfer += (*(this->success))[_i231].read(iprot); + xfer += (*(this->success))[_i296].read(iprot); } iprot->readListEnd(); } @@ -6146,6 +6244,14 @@ xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -6158,7 +6264,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6195,26 +6301,6 @@ } break; case 3: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->part_vals.clear(); - uint32_t _size232; - apache::thrift::protocol::TType _etype235; - iprot->readListBegin(_etype235, _size232); - this->part_vals.resize(_size232); - uint32_t _i236; - for (_i236 = 0; _i236 < _size232; ++_i236) - { - xfer += iprot->readString(this->part_vals[_i236]); - } - iprot->readListEnd(); - } - this->__isset.part_vals = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: if (ftype == apache::thrift::protocol::T_I16) { xfer += iprot->readI16(this->max_parts); this->__isset.max_parts = true; @@ -6234,27 +6320,16 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_args"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); - std::vector ::const_iterator _iter237; - for (_iter237 = this->part_vals.begin(); _iter237 != this->part_vals.end(); ++_iter237) - { - xfer += oprot->writeString((*_iter237)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6262,27 +6337,16 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_pargs"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); - { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); - std::vector ::const_iterator _iter238; - for (_iter238 = (*(this->part_vals)).begin(); _iter238 != (*(this->part_vals)).end(); ++_iter238) - { - xfer += oprot->writeString((*_iter238)); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6290,7 +6354,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6314,14 +6378,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size239; - apache::thrift::protocol::TType _etype242; - iprot->readListBegin(_etype242, _size239); - this->success.resize(_size239); - uint32_t _i243; - for (_i243 = 0; _i243 < _size239; ++_i243) + uint32_t _size297; + apache::thrift::protocol::TType _etype300; + iprot->readListBegin(_etype300, _size297); + this->success.resize(_size297); + uint32_t _i301; + for (_i301 = 0; _i301 < _size297; ++_i301) { - xfer += iprot->readString(this->success[_i243]); + xfer += iprot->readString(this->success[_i301]); } iprot->readListEnd(); } @@ -6332,8 +6396,8 @@ break; case 1: if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; } else { xfer += iprot->skip(ftype); } @@ -6350,27 +6414,27 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter244; - for (_iter244 = this->success.begin(); _iter244 != this->success.end(); ++_iter244) + std::vector ::const_iterator _iter302; + for (_iter302 = this->success.begin(); _iter302 != this->success.end(); ++_iter302) { - xfer += oprot->writeString((*_iter244)); + xfer += oprot->writeString((*_iter302)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->o1.write(oprot); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); @@ -6378,7 +6442,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6402,14 +6466,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size245; - apache::thrift::protocol::TType _etype248; - iprot->readListBegin(_etype248, _size245); - (*(this->success)).resize(_size245); - uint32_t _i249; - for (_i249 = 0; _i249 < _size245; ++_i249) + uint32_t _size303; + apache::thrift::protocol::TType _etype306; + iprot->readListBegin(_etype306, _size303); + (*(this->success)).resize(_size303); + uint32_t _i307; + for (_i307 = 0; _i307 < _size303; ++_i307) { - xfer += iprot->readString((*(this->success))[_i249]); + xfer += iprot->readString((*(this->success))[_i307]); } iprot->readListEnd(); } @@ -6420,8 +6484,8 @@ break; case 1: if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; } else { xfer += iprot->skip(ftype); } @@ -6438,7 +6502,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6475,9 +6539,21 @@ } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->filter); - this->__isset.filter = true; + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size308; + apache::thrift::protocol::TType _etype311; + iprot->readListBegin(_etype311, _size308); + this->part_vals.resize(_size308); + uint32_t _i312; + for (_i312 = 0; _i312 < _size308; ++_i312) + { + xfer += iprot->readString(this->part_vals[_i312]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; } else { xfer += iprot->skip(ftype); } @@ -6502,17 +6578,25 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_args"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("filter", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->filter); + xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); + std::vector ::const_iterator _iter313; + for (_iter313 = this->part_vals.begin(); _iter313 != this->part_vals.end(); ++_iter313) + { + xfer += oprot->writeString((*_iter313)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); @@ -6522,17 +6606,25 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_pargs"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("filter", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->filter))); + xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); + std::vector ::const_iterator _iter314; + for (_iter314 = (*(this->part_vals)).begin(); _iter314 != (*(this->part_vals)).end(); ++_iter314) + { + xfer += oprot->writeString((*_iter314)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); @@ -6542,7 +6634,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6566,14 +6658,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size250; - apache::thrift::protocol::TType _etype253; - iprot->readListBegin(_etype253, _size250); - this->success.resize(_size250); - uint32_t _i254; - for (_i254 = 0; _i254 < _size250; ++_i254) + uint32_t _size315; + apache::thrift::protocol::TType _etype318; + iprot->readListBegin(_etype318, _size315); + this->success.resize(_size315); + uint32_t _i319; + for (_i319 = 0; _i319 < _size315; ++_i319) { - xfer += this->success[_i254].read(iprot); + xfer += this->success[_i319].read(iprot); } iprot->readListEnd(); } @@ -6590,14 +6682,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -6610,20 +6694,20 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); { xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter255; - for (_iter255 = this->success.begin(); _iter255 != this->success.end(); ++_iter255) + std::vector ::const_iterator _iter320; + for (_iter320 = this->success.begin(); _iter320 != this->success.end(); ++_iter320) { - xfer += (*_iter255).write(oprot); + xfer += (*_iter320).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6632,17 +6716,13 @@ xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6666,14 +6746,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size256; - apache::thrift::protocol::TType _etype259; - iprot->readListBegin(_etype259, _size256); - (*(this->success)).resize(_size256); - uint32_t _i260; - for (_i260 = 0; _i260 < _size256; ++_i260) + uint32_t _size321; + apache::thrift::protocol::TType _etype324; + iprot->readListBegin(_etype324, _size321); + (*(this->success)).resize(_size321); + uint32_t _i325; + for (_i325 = 0; _i325 < _size321; ++_i325) { - xfer += (*(this->success))[_i260].read(iprot); + xfer += (*(this->success))[_i325].read(iprot); } iprot->readListEnd(); } @@ -6690,14 +6770,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -6710,7 +6782,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6747,9 +6819,57 @@ } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->new_part.read(iprot); - this->__isset.new_part = true; + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size326; + apache::thrift::protocol::TType _etype329; + iprot->readListBegin(_etype329, _size326); + this->part_vals.resize(_size326); + uint32_t _i330; + for (_i330 = 0; _i330 < _size326; ++_i330) + { + xfer += iprot->readString(this->part_vals[_i330]); + } + 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 _size331; + apache::thrift::protocol::TType _etype334; + iprot->readListBegin(_etype334, _size331); + this->group_names.resize(_size331); + uint32_t _i335; + for (_i335 = 0; _i335 < _size331; ++_i335) + { + xfer += iprot->readString(this->group_names[_i335]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; } else { xfer += iprot->skip(ftype); } @@ -6766,41 +6886,91 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_with_auth_args"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_part", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->new_part.write(oprot); + xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); + std::vector ::const_iterator _iter336; + for (_iter336 = this->part_vals.begin(); _iter336 != this->part_vals.end(); ++_iter336) + { + xfer += oprot->writeString((*_iter336)); + } + 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 _iter337; + for (_iter337 = this->group_names.begin(); _iter337 != this->group_names.end(); ++_iter337) + { + xfer += oprot->writeString((*_iter337)); + } + 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 _iter338; + for (_iter338 = (*(this->part_vals)).begin(); _iter338 != (*(this->part_vals)).end(); ++_iter338) + { + xfer += oprot->writeString((*_iter338)); + } + 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 _iter339; + for (_iter339 = (*(this->group_names)).begin(); _iter339 != (*(this->group_names)).end(); ++_iter339) + { + xfer += oprot->writeString((*_iter339)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6820,6 +6990,26 @@ } switch (fid) { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size340; + apache::thrift::protocol::TType _etype343; + iprot->readListBegin(_etype343, _size340); + this->success.resize(_size340); + uint32_t _i344; + for (_i344 = 0; _i344 < _size340; ++_i344) + { + xfer += this->success[_i344].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; case 1: if (ftype == apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -6848,13 +7038,25 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_with_auth_result"); - if (this->__isset.o1) { + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter345; + for (_iter345 = this->success.begin(); _iter345 != this->success.end(); ++_iter345) + { + xfer += (*_iter345).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); @@ -6868,7 +7070,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_with_auth_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6888,6 +7090,26 @@ } switch (fid) { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size346; + apache::thrift::protocol::TType _etype349; + iprot->readListBegin(_etype349, _size346); + (*(this->success)).resize(_size346); + uint32_t _i350; + for (_i350 = 0; _i350 < _size346; ++_i350) + { + xfer += (*(this->success))[_i350].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; case 1: if (ftype == apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -6916,7 +7138,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -6938,16 +7160,44 @@ { case 1: if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->name); - this->__isset.name = true; + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; } else { xfer += iprot->skip(ftype); } break; case 2: if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->defaultValue); - this->__isset.defaultValue = true; + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->part_vals.clear(); + uint32_t _size351; + apache::thrift::protocol::TType _etype354; + iprot->readListBegin(_etype354, _size351); + this->part_vals.resize(_size351); + uint32_t _i355; + for (_i355 = 0; _i355 < _size351; ++_i355) + { + xfer += iprot->readString(this->part_vals[_i355]); + } + iprot->readListEnd(); + } + this->__isset.part_vals = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; } else { xfer += iprot->skip(ftype); } @@ -6964,35 +7214,63 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_args"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_args"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("defaultValue", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->defaultValue); + xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); + std::vector ::const_iterator _iter356; + for (_iter356 = this->part_vals.begin(); _iter356 != this->part_vals.end(); ++_iter356) + { + xfer += oprot->writeString((*_iter356)); + } + 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 _iter357; + for (_iter357 = (*(this->part_vals)).begin(); _iter357 != (*(this->part_vals)).end(); ++_iter357) + { + xfer += oprot->writeString((*_iter357)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7013,8 +7291,20 @@ switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size358; + apache::thrift::protocol::TType _etype361; + iprot->readListBegin(_etype361, _size358); + this->success.resize(_size358); + uint32_t _i362; + for (_i362 = 0; _i362 < _size358; ++_i362) + { + xfer += iprot->readString(this->success[_i362]); + } + iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -7040,15 +7330,23 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter363; + for (_iter363 = this->success.begin(); _iter363 != this->success.end(); ++_iter363) + { + xfer += oprot->writeString((*_iter363)); + } + xfer += oprot->writeListEnd(); + } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); @@ -7060,7 +7358,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7081,8 +7379,20 @@ switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); + if (ftype == apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size364; + apache::thrift::protocol::TType _etype367; + iprot->readListBegin(_etype367, _size364); + (*(this->success)).resize(_size364); + uint32_t _i368; + for (_i368 = 0; _i368 < _size364; ++_i368) + { + xfer += iprot->readString((*(this->success))[_i368]); + } + iprot->readListEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -7108,7 +7418,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7130,8 +7440,32 @@ { case 1: if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->filter); + this->__isset.filter = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_I16) { + xfer += iprot->readI16(this->max_parts); + this->__isset.max_parts = true; } else { xfer += iprot->skip(ftype); } @@ -7148,29 +7482,47 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_args"); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->part_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_args"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->filter); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_pargs"); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_pargs"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("filter", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->filter))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7194,14 +7546,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->success.clear(); - uint32_t _size261; - apache::thrift::protocol::TType _etype264; - iprot->readListBegin(_etype264, _size261); - this->success.resize(_size261); - uint32_t _i265; - for (_i265 = 0; _i265 < _size261; ++_i265) + uint32_t _size369; + apache::thrift::protocol::TType _etype372; + iprot->readListBegin(_etype372, _size369); + this->success.resize(_size369); + uint32_t _i373; + for (_i373 = 0; _i373 < _size369; ++_i373) { - xfer += iprot->readString(this->success[_i265]); + xfer += this->success[_i373].read(iprot); } iprot->readListEnd(); } @@ -7218,6 +7570,14 @@ xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -7230,20 +7590,20 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter266; - for (_iter266 = this->success.begin(); _iter266 != this->success.end(); ++_iter266) + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter374; + for (_iter374 = this->success.begin(); _iter374 != this->success.end(); ++_iter374) { - xfer += oprot->writeString((*_iter266)); + xfer += (*_iter374).write(oprot); } xfer += oprot->writeListEnd(); } @@ -7252,13 +7612,17 @@ xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7282,14 +7646,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); - uint32_t _size267; - apache::thrift::protocol::TType _etype270; - iprot->readListBegin(_etype270, _size267); - (*(this->success)).resize(_size267); - uint32_t _i271; - for (_i271 = 0; _i271 < _size267; ++_i271) + uint32_t _size375; + apache::thrift::protocol::TType _etype378; + iprot->readListBegin(_etype378, _size375); + (*(this->success)).resize(_size375); + uint32_t _i379; + for (_i379 = 0; _i379 < _size375; ++_i379) { - xfer += iprot->readString((*(this->success))[_i271]); + xfer += (*(this->success))[_i379].read(iprot); } iprot->readListEnd(); } @@ -7306,6 +7670,14 @@ xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -7318,7 +7690,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_partition_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7340,8 +7712,24 @@ { case 1: if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->part_name); - this->__isset.part_name = true; + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tbl_name); + this->__isset.tbl_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->new_part.read(iprot); + this->__isset.new_part = true; } else { xfer += iprot->skip(ftype); } @@ -7358,29 +7746,41 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_partition_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_args"); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->part_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_args"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", apache::thrift::protocol::T_STRUCT, 3); + xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_partition_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_pargs"); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_pargs"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_part", apache::thrift::protocol::T_STRUCT, 3); + xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_partition_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7400,33 +7800,18 @@ } switch (fid) { - case 0: - if (ftype == apache::thrift::protocol::T_MAP) { - { - this->success.clear(); - uint32_t _size272; - apache::thrift::protocol::TType _ktype273; - apache::thrift::protocol::TType _vtype274; - iprot->readMapBegin(_ktype273, _vtype274, _size272); - uint32_t _i276; - for (_i276 = 0; _i276 < _size272; ++_i276) - { - std::string _key277; - xfer += iprot->readString(_key277); - std::string& _val278 = this->success[_key277]; - xfer += iprot->readString(_val278); - } - iprot->readMapEnd(); - } - this->__isset.success = true; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } break; - case 1: + case 2: if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; } else { xfer += iprot->skip(ftype); } @@ -7443,36 +7828,27 @@ return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_partition_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_result"); - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_MAP, 0); - { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->success.size()); - std::map ::const_iterator _iter279; - for (_iter279 = this->success.begin(); _iter279 != this->success.end(); ++_iter279) - { - xfer += oprot->writeString(_iter279->first); - xfer += oprot->writeString(_iter279->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { + if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o2) { + xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); + xfer += this->o2.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_partition_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7492,33 +7868,18 @@ } switch (fid) { - case 0: - if (ftype == apache::thrift::protocol::T_MAP) { - { - (*(this->success)).clear(); - uint32_t _size280; - apache::thrift::protocol::TType _ktype281; - apache::thrift::protocol::TType _vtype282; - iprot->readMapBegin(_ktype281, _vtype282, _size280); - uint32_t _i284; - for (_i284 = 0; _i284 < _size280; ++_i284) - { - std::string _key285; - xfer += iprot->readString(_key285); - std::string& _val286 = (*(this->success))[_key285]; - xfer += iprot->readString(_val286); - } - iprot->readMapEnd(); - } - this->__isset.success = true; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } break; - case 1: + case 2: if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + xfer += this->o2.read(iprot); + this->__isset.o2 = true; } else { xfer += iprot->skip(ftype); } @@ -7535,7 +7896,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_add_index_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_config_value_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7556,17 +7917,17 @@ switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->new_index.read(iprot); - this->__isset.new_index = true; + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->name); + this->__isset.name = true; } else { xfer += iprot->skip(ftype); } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->index_table.read(iprot); - this->__isset.index_table = true; + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->defaultValue); + this->__isset.defaultValue = true; } else { xfer += iprot->skip(ftype); } @@ -7583,35 +7944,35 @@ return xfer; } -uint32_t ThriftHiveMetastore_add_index_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_config_value_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_args"); - xfer += oprot->writeFieldBegin("new_index", apache::thrift::protocol::T_STRUCT, 1); - xfer += this->new_index.write(oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_args"); + xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_table", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->index_table.write(oprot); + xfer += oprot->writeFieldBegin("defaultValue", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->defaultValue); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_add_index_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_config_value_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_pargs"); - xfer += oprot->writeFieldBegin("new_index", apache::thrift::protocol::T_STRUCT, 1); - xfer += (*(this->new_index)).write(oprot); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_pargs"); + xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_table", apache::thrift::protocol::T_STRUCT, 2); - xfer += (*(this->index_table)).write(oprot); + xfer += oprot->writeFieldBegin("defaultValue", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->defaultValue))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_add_index_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_config_value_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7632,8 +7993,8 @@ switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->success.read(iprot); + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->success); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -7647,22 +8008,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -7675,35 +8020,27 @@ return xfer; } -uint32_t ThriftHiveMetastore_add_index_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_config_value_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); - xfer += this->success.write(oprot); + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeString(this->success); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); - xfer += this->o3.write(oprot); - xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_add_index_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_config_value_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7724,8 +8061,8 @@ switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += (*(this->success)).read(iprot); + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString((*(this->success))); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -7739,22 +8076,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o3.read(iprot); - this->__isset.o3 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -7767,7 +8088,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_index_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_vals_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7789,32 +8110,8 @@ { case 1: if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->dbname); - this->__isset.dbname = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->base_tbl_name); - this->__isset.base_tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->idx_name); - this->__isset.idx_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->new_idx.read(iprot); - this->__isset.new_idx = true; + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; } else { xfer += iprot->skip(ftype); } @@ -7831,47 +8128,29 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_index_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_vals_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_args"); - xfer += oprot->writeFieldBegin("dbname", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->dbname); - xfer += oprot->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; @@ -7891,18 +8170,30 @@ } switch (fid) { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o1.read(iprot); - this->__isset.o1 = true; + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size380; + apache::thrift::protocol::TType _etype383; + iprot->readListBegin(_etype383, _size380); + this->success.resize(_size380); + uint32_t _i384; + for (_i384 = 0; _i384 < _size380; ++_i384) + { + xfer += iprot->readString(this->success[_i384]); + } + iprot->readListEnd(); + } + this->__isset.success = true; } else { xfer += iprot->skip(ftype); } break; - case 2: + case 1: if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; + xfer += this->o1.read(iprot); + this->__isset.o1 = true; } else { xfer += iprot->skip(ftype); } @@ -7919,27 +8210,35 @@ return xfer; } -uint32_t ThriftHiveMetastore_alter_index_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_result"); - if (this->__isset.o1) { + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + std::vector ::const_iterator _iter385; + for (_iter385 = this->success.begin(); _iter385 != this->success.end(); ++_iter385) + { + xfer += oprot->writeString((*_iter385)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_alter_index_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -7959,6 +8258,26 @@ } switch (fid) { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size386; + apache::thrift::protocol::TType _etype389; + iprot->readListBegin(_etype389, _size386); + (*(this->success)).resize(_size386); + uint32_t _i390; + for (_i390 = 0; _i390 < _size386; ++_i390) + { + xfer += iprot->readString((*(this->success))[_i390]); + } + 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); @@ -7967,14 +8286,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; @@ -7987,7 +8298,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_spec_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8009,32 +8320,8 @@ { case 1: if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->index_name); - this->__isset.index_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->deleteData); - this->__isset.deleteData = true; + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; } else { xfer += iprot->skip(ftype); } @@ -8051,47 +8338,29 @@ return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_spec_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->index_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool(this->deleteData); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_args"); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_spec_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->db_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString((*(this->index_name))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); - xfer += oprot->writeBool((*(this->deleteData))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_pargs"); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8112,8 +8381,23 @@ switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool(this->success); + if (ftype == apache::thrift::protocol::T_MAP) { + { + this->success.clear(); + uint32_t _size391; + apache::thrift::protocol::TType _ktype392; + apache::thrift::protocol::TType _vtype393; + iprot->readMapBegin(_ktype392, _vtype393, _size391); + uint32_t _i395; + for (_i395 = 0; _i395 < _size391; ++_i395) + { + std::string _key396; + xfer += iprot->readString(_key396); + std::string& _val397 = this->success[_key396]; + xfer += iprot->readString(_val397); + } + iprot->readMapEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -8127,14 +8411,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -8147,31 +8423,36 @@ return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); - xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_MAP, 0); + { + xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->success.size()); + std::map ::const_iterator _iter398; + for (_iter398 = this->success.begin(); _iter398 != this->success.end(); ++_iter398) + { + xfer += oprot->writeString(_iter398->first); + xfer += oprot->writeString(_iter398->second); + } + xfer += oprot->writeMapEnd(); + } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); - xfer += this->o2.write(oprot); - xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8192,8 +8473,23 @@ switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { - xfer += iprot->readBool((*(this->success))); + if (ftype == apache::thrift::protocol::T_MAP) { + { + (*(this->success)).clear(); + uint32_t _size399; + apache::thrift::protocol::TType _ktype400; + apache::thrift::protocol::TType _vtype401; + iprot->readMapBegin(_ktype400, _vtype401, _size399); + uint32_t _i403; + for (_i403 = 0; _i403 < _size399; ++_i403) + { + std::string _key404; + xfer += iprot->readString(_key404); + std::string& _val405 = (*(this->success))[_key404]; + xfer += iprot->readString(_val405); + } + iprot->readMapEnd(); + } this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -8207,14 +8503,6 @@ xfer += iprot->skip(ftype); } break; - case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->o2.read(iprot); - this->__isset.o2 = true; - } else { - xfer += iprot->skip(ftype); - } - break; default: xfer += iprot->skip(ftype); break; @@ -8227,7 +8515,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_add_index_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8248,25 +8536,17 @@ switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->new_index.read(iprot); + this->__isset.new_index = true; } else { xfer += iprot->skip(ftype); } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->index_name); - this->__isset.index_name = true; + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->index_table.read(iprot); + this->__isset.index_table = true; } else { xfer += iprot->skip(ftype); } @@ -8283,41 +8563,35 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_index_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->db_name); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_args"); + xfer += oprot->writeFieldBegin("new_index", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->new_index.write(oprot); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", apache::thrift::protocol::T_STRING, 3); - xfer += oprot->writeString(this->index_name); + xfer += oprot->writeFieldBegin("index_table", apache::thrift::protocol::T_STRUCT, 2); + xfer += this->index_table.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_index_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->db_name))); - xfer += oprot->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; @@ -8361,6 +8635,14 @@ xfer += iprot->skip(ftype); } break; + case 3: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -8373,11 +8655,11 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_index_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_result"); if (this->__isset.success) { xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); @@ -8391,13 +8673,17 @@ xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o3) { + xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 3); + xfer += this->o3.write(oprot); + xfer += oprot->writeFieldEnd(); } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_add_index_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8441,6 +8727,14 @@ xfer += iprot->skip(ftype); } break; + case 3: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o3.read(iprot); + this->__isset.o3 = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -8453,7 +8747,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_index_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8475,24 +8769,32 @@ { case 1: if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->db_name); - this->__isset.db_name = true; + xfer += iprot->readString(this->dbname); + this->__isset.dbname = true; } else { xfer += iprot->skip(ftype); } break; case 2: if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->tbl_name); - this->__isset.tbl_name = true; + xfer += iprot->readString(this->base_tbl_name); + this->__isset.base_tbl_name = true; } else { xfer += iprot->skip(ftype); } break; case 3: - if (ftype == apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_indexes); - this->__isset.max_indexes = true; + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->idx_name); + this->__isset.idx_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->new_idx.read(iprot); + this->__isset.new_idx = true; } else { xfer += iprot->skip(ftype); } @@ -8509,41 +8811,47 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_index_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->db_name); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_args"); + xfer += oprot->writeFieldBegin("dbname", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->tbl_name); + xfer += oprot->writeFieldBegin("base_tbl_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->base_tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->max_indexes); + xfer += oprot->writeFieldBegin("idx_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->idx_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_idx", apache::thrift::protocol::T_STRUCT, 4); + xfer += this->new_idx.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_index_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_pargs"); + xfer += oprot->writeFieldBegin("dbname", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->tbl_name))); + xfer += oprot->writeFieldBegin("base_tbl_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->base_tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16((*(this->max_indexes))); + xfer += oprot->writeFieldBegin("idx_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->idx_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("new_idx", apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->new_idx)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_index_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8563,26 +8871,6 @@ } switch (fid) { - case 0: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size287; - apache::thrift::protocol::TType _etype290; - iprot->readListBegin(_etype290, _size287); - this->success.resize(_size287); - uint32_t _i291; - for (_i291 = 0; _i291 < _size287; ++_i291) - { - xfer += this->success[_i291].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; case 1: if (ftype == apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -8611,25 +8899,13 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_index_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_index_result"); - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); - std::vector ::const_iterator _iter292; - for (_iter292 = this->success.begin(); _iter292 != this->success.end(); ++_iter292) - { - xfer += (*_iter292).write(oprot); - } - xfer += oprot->writeListEnd(); - } - xfer += oprot->writeFieldEnd(); - } else if (this->__isset.o1) { + if (this->__isset.o1) { xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); @@ -8643,7 +8919,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_index_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8663,26 +8939,6 @@ } switch (fid) { - case 0: - if (ftype == apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size293; - apache::thrift::protocol::TType _etype296; - iprot->readListBegin(_etype296, _size293); - (*(this->success)).resize(_size293); - uint32_t _i297; - for (_i297 = 0; _i297 < _size293; ++_i297) - { - xfer += (*(this->success))[_i297].read(iprot); - } - iprot->readListEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; case 1: if (ftype == apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); @@ -8711,7 +8967,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8748,9 +9004,17 @@ } break; case 3: - if (ftype == apache::thrift::protocol::T_I16) { - xfer += iprot->readI16(this->max_indexes); - this->__isset.max_indexes = true; + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->index_name); + this->__isset.index_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->deleteData); + this->__isset.deleteData = true; } else { xfer += iprot->skip(ftype); } @@ -8767,41 +9031,47 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_index_by_name_args::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_args"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_args"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16(this->max_indexes); + xfer += oprot->writeFieldBegin("index_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->index_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_index_by_name_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_pargs"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_pargs"); xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); - xfer += oprot->writeI16((*(this->max_indexes))); + xfer += oprot->writeFieldBegin("index_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->index_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_index_by_name_result::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8822,20 +9092,8 @@ switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size298; - apache::thrift::protocol::TType _etype301; - iprot->readListBegin(_etype301, _size298); - this->success.resize(_size298); - uint32_t _i302; - for (_i302 = 0; _i302 < _size298; ++_i302) - { - xfer += iprot->readString(this->success[_i302]); - } - iprot->readListEnd(); - } + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -8843,6 +9101,14 @@ break; case 1: if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -8861,26 +9127,22 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_index_by_name_result::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_result"); + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); - { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter303; - for (_iter303 = this->success.begin(); _iter303 != this->success.end(); ++_iter303) - { - xfer += oprot->writeString((*_iter303)); - } - xfer += oprot->writeListEnd(); - } + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -8889,7 +9151,7 @@ return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_index_by_name_presult::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -8910,20 +9172,8 @@ switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size304; - apache::thrift::protocol::TType _etype307; - iprot->readListBegin(_etype307, _size304); - (*(this->success)).resize(_size304); - uint32_t _i308; - for (_i308 = 0; _i308 < _size304; ++_i308) - { - xfer += iprot->readString((*(this->success))[_i308]); - } - iprot->readListEnd(); - } + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { xfer += iprot->skip(ftype); @@ -8931,6 +9181,14 @@ break; case 1: if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -8949,83 +9207,7042 @@ 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); +uint32_t ThriftHiveMetastore_get_index_by_name_args::read(apache::thrift::protocol::TProtocol* iprot) { - ThriftHiveMetastore_create_database_pargs args; - args.database = &database; - args.write(oprot_); + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} + xfer += iprot->readStructBegin(fname); -void ThriftHiveMetastoreClient::recv_create_database() -{ + using apache::thrift::protocol::TProtocolException; - 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); + 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(); } - 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; + 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 _size406; + apache::thrift::protocol::TType _etype409; + iprot->readListBegin(_etype409, _size406); + this->success.resize(_size406); + uint32_t _i410; + for (_i410 = 0; _i410 < _size406; ++_i410) + { + xfer += this->success[_i410].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 _iter411; + for (_iter411 = this->success.begin(); _iter411 != this->success.end(); ++_iter411) + { + xfer += (*_iter411).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 _size412; + apache::thrift::protocol::TType _etype415; + iprot->readListBegin(_etype415, _size412); + (*(this->success)).resize(_size412); + uint32_t _i416; + for (_i416 = 0; _i416 < _size412; ++_i416) + { + xfer += (*(this->success))[_i416].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 _size417; + apache::thrift::protocol::TType _etype420; + iprot->readListBegin(_etype420, _size417); + this->success.resize(_size417); + uint32_t _i421; + for (_i421 = 0; _i421 < _size417; ++_i421) + { + xfer += iprot->readString(this->success[_i421]); + } + 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 _iter422; + for (_iter422 = this->success.begin(); _iter422 != this->success.end(); ++_iter422) + { + xfer += oprot->writeString((*_iter422)); + } + 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 _size423; + apache::thrift::protocol::TType _etype426; + iprot->readListBegin(_etype426, _size423); + (*(this->success)).resize(_size423); + uint32_t _i427; + for (_i427 = 0; _i427 < _size423; ++_i427) + { + xfer += iprot->readString((*(this->success))[_i427]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o2.read(iprot); + this->__isset.o2 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_user_privilege_set_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size428; + apache::thrift::protocol::TType _etype431; + iprot->readListBegin(_etype431, _size428); + this->group_names.resize(_size428); + uint32_t _i432; + for (_i432 = 0; _i432 < _size428; ++_i432) + { + xfer += iprot->readString(this->group_names[_i432]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_user_privilege_set_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_user_privilege_set_args"); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter433; + for (_iter433 = this->group_names.begin(); _iter433 != this->group_names.end(); ++_iter433) + { + xfer += oprot->writeString((*_iter433)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_user_privilege_set_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_user_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter434; + for (_iter434 = (*(this->group_names)).begin(); _iter434 != (*(this->group_names)).end(); ++_iter434) + { + xfer += oprot->writeString((*_iter434)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_user_privilege_set_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_user_privilege_set_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_user_privilege_set_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_user_privilege_set_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_db_privilege_set_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size435; + apache::thrift::protocol::TType _etype438; + iprot->readListBegin(_etype438, _size435); + this->group_names.resize(_size435); + uint32_t _i439; + for (_i439 = 0; _i439 < _size435; ++_i439) + { + xfer += iprot->readString(this->group_names[_i439]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_db_privilege_set_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_db_privilege_set_args"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter440; + for (_iter440 = this->group_names.begin(); _iter440 != this->group_names.end(); ++_iter440) + { + xfer += oprot->writeString((*_iter440)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_db_privilege_set_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_db_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter441; + for (_iter441 = (*(this->group_names)).begin(); _iter441 != (*(this->group_names)).end(); ++_iter441) + { + xfer += oprot->writeString((*_iter441)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_db_privilege_set_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_db_privilege_set_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_db_privilege_set_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_db_privilege_set_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_privilege_set_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size442; + apache::thrift::protocol::TType _etype445; + iprot->readListBegin(_etype445, _size442); + this->group_names.resize(_size442); + uint32_t _i446; + for (_i446 = 0; _i446 < _size442; ++_i446) + { + xfer += iprot->readString(this->group_names[_i446]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_privilege_set_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_privilege_set_args"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter447; + for (_iter447 = this->group_names.begin(); _iter447 != this->group_names.end(); ++_iter447) + { + xfer += oprot->writeString((*_iter447)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_privilege_set_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter448; + for (_iter448 = (*(this->group_names)).begin(); _iter448 != (*(this->group_names)).end(); ++_iter448) + { + xfer += oprot->writeString((*_iter448)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_privilege_set_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_privilege_set_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_privilege_set_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_table_privilege_set_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_privilege_set_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size449; + apache::thrift::protocol::TType _etype452; + iprot->readListBegin(_etype452, _size449); + this->group_names.resize(_size449); + uint32_t _i453; + for (_i453 = 0; _i453 < _size449; ++_i453) + { + xfer += iprot->readString(this->group_names[_i453]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_privilege_set_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_privilege_set_args"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter454; + for (_iter454 = this->group_names.begin(); _iter454 != this->group_names.end(); ++_iter454) + { + xfer += oprot->writeString((*_iter454)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_privilege_set_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter455; + for (_iter455 = (*(this->group_names)).begin(); _iter455 != (*(this->group_names)).end(); ++_iter455) + { + xfer += oprot->writeString((*_iter455)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_privilege_set_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_privilege_set_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_privilege_set_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_partition_privilege_set_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_column_privilege_set_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->column_name); + this->__isset.column_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->group_names.clear(); + uint32_t _size456; + apache::thrift::protocol::TType _etype459; + iprot->readListBegin(_etype459, _size456); + this->group_names.resize(_size456); + uint32_t _i460; + for (_i460 = 0; _i460 < _size456; ++_i460) + { + xfer += iprot->readString(this->group_names[_i460]); + } + iprot->readListEnd(); + } + this->__isset.group_names = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_column_privilege_set_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_column_privilege_set_args"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->column_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->group_names.size()); + std::vector ::const_iterator _iter461; + for (_iter461 = this->group_names.begin(); _iter461 != this->group_names.end(); ++_iter461) + { + xfer += oprot->writeString((*_iter461)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_column_privilege_set_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_column_privilege_set_pargs"); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->column_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("group_names", apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->group_names)).size()); + std::vector ::const_iterator _iter462; + for (_iter462 = (*(this->group_names)).begin(); _iter462 != (*(this->group_names)).end(); ++_iter462) + { + xfer += oprot->writeString((*_iter462)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_column_privilege_set_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_get_column_privilege_set_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_column_privilege_set_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_get_column_privilege_set_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->owner_name); + this->__isset.owner_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_args"); + xfer += oprot->writeFieldBegin("role_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("owner_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->owner_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("owner_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->owner_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_args"); + xfer += oprot->writeFieldBegin("role_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_role_member_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_role_member_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_role_member_args"); + xfer += oprot->writeFieldBegin("role_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_add_role_member_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_role_member_pargs"); + xfer += oprot->writeFieldBegin("role_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_add_role_member_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_add_role_member_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_role_member_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_add_role_member_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_role_member_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_role_member_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_role_member_args"); + xfer += oprot->writeFieldBegin("role_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_role_member_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_role_member_pargs"); + xfer += oprot->writeFieldBegin("role_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_role_member_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_role_member_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_remove_role_member_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_remove_role_member_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_roles_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_roles_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_args"); + xfer += oprot->writeFieldBegin("principal_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_roles_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_roles_pargs"); + xfer += oprot->writeFieldBegin("principal_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_roles_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size463; + apache::thrift::protocol::TType _etype466; + iprot->readListBegin(_etype466, _size463); + this->success.resize(_size463); + uint32_t _i467; + for (_i467 = 0; _i467 < _size463; ++_i467) + { + xfer += this->success[_i467].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 _iter468; + for (_iter468 = this->success.begin(); _iter468 != this->success.end(); ++_iter468) + { + xfer += (*_iter468).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 _size469; + apache::thrift::protocol::TType _etype472; + iprot->readListBegin(_etype472, _size469); + (*(this->success)).resize(_size469); + uint32_t _i473; + for (_i473 = 0; _i473 < _size469; ++_i473) + { + xfer += (*(this->success))[_i473].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_user_grant_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principla_name); + this->__isset.principla_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_user_grant_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_user_grant_args"); + xfer += oprot->writeFieldBegin("principla_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principla_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_user_grant_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_user_grant_pargs"); + xfer += oprot->writeFieldBegin("principla_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principla_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_user_grant_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size474; + apache::thrift::protocol::TType _etype477; + iprot->readListBegin(_etype477, _size474); + this->success.resize(_size474); + uint32_t _i478; + for (_i478 = 0; _i478 < _size474; ++_i478) + { + xfer += this->success[_i478].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_user_grant_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_user_grant_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter479; + for (_iter479 = this->success.begin(); _iter479 != this->success.end(); ++_iter479) + { + xfer += (*_iter479).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_user_grant_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size480; + apache::thrift::protocol::TType _etype483; + iprot->readListBegin(_etype483, _size480); + (*(this->success)).resize(_size480); + uint32_t _i484; + for (_i484 = 0; _i484 < _size480; ++_i484) + { + xfer += (*(this->success))[_i484].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_db_grant_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_db_grant_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_db_grant_args"); + xfer += oprot->writeFieldBegin("principal_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_db_grant_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_db_grant_pargs"); + xfer += oprot->writeFieldBegin("principal_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_db_grant_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size485; + apache::thrift::protocol::TType _etype488; + iprot->readListBegin(_etype488, _size485); + this->success.resize(_size485); + uint32_t _i489; + for (_i489 = 0; _i489 < _size485; ++_i489) + { + xfer += this->success[_i489].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_db_grant_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_db_grant_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter490; + for (_iter490 = this->success.begin(); _iter490 != this->success.end(); ++_iter490) + { + xfer += (*_iter490).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_db_grant_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size491; + apache::thrift::protocol::TType _etype494; + iprot->readListBegin(_etype494, _size491); + (*(this->success)).resize(_size491); + uint32_t _i495; + for (_i495 = 0; _i495 < _size491; ++_i495) + { + xfer += (*(this->success))[_i495].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_table_grant_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_table_grant_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_table_grant_args"); + xfer += oprot->writeFieldBegin("principal_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_table_grant_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_table_grant_pargs"); + xfer += oprot->writeFieldBegin("principal_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_table_grant_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size496; + apache::thrift::protocol::TType _etype499; + iprot->readListBegin(_etype499, _size496); + this->success.resize(_size496); + uint32_t _i500; + for (_i500 = 0; _i500 < _size496; ++_i500) + { + xfer += this->success[_i500].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_table_grant_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_table_grant_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter501; + for (_iter501 = this->success.begin(); _iter501 != this->success.end(); ++_iter501) + { + xfer += (*_iter501).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_table_grant_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size502; + apache::thrift::protocol::TType _etype505; + iprot->readListBegin(_etype505, _size502); + (*(this->success)).resize(_size502); + uint32_t _i506; + for (_i506 = 0; _i506 < _size502; ++_i506) + { + xfer += (*(this->success))[_i506].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_partition_grant_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_partition_grant_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_partition_grant_args"); + xfer += oprot->writeFieldBegin("principal_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_partition_grant_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_partition_grant_pargs"); + xfer += oprot->writeFieldBegin("principal_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_partition_grant_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size507; + apache::thrift::protocol::TType _etype510; + iprot->readListBegin(_etype510, _size507); + this->success.resize(_size507); + uint32_t _i511; + for (_i511 = 0; _i511 < _size507; ++_i511) + { + xfer += this->success[_i511].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_partition_grant_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_partition_grant_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter512; + for (_iter512 = this->success.begin(); _iter512 != this->success.end(); ++_iter512) + { + xfer += (*_iter512).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_partition_grant_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size513; + apache::thrift::protocol::TType _etype516; + iprot->readListBegin(_etype516, _size513); + (*(this->success)).resize(_size513); + uint32_t _i517; + for (_i517 = 0; _i517 < _size513; ++_i517) + { + xfer += (*(this->success))[_i517].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_column_grant_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principal_name); + this->__isset.principal_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->db_name); + this->__isset.db_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->table_name); + this->__isset.table_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->part_name); + this->__isset.part_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->column_name); + this->__isset.column_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_column_grant_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_column_grant_args"); + xfer += oprot->writeFieldBegin("principal_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principal_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->db_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->table_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->part_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column_name", apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString(this->column_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_column_grant_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_column_grant_pargs"); + xfer += oprot->writeFieldBegin("principal_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->principal_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString((*(this->db_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->table_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString((*(this->part_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column_name", apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeString((*(this->column_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_column_grant_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size518; + apache::thrift::protocol::TType _etype521; + iprot->readListBegin(_etype521, _size518); + this->success.resize(_size518); + uint32_t _i522; + for (_i522 = 0; _i522 < _size518; ++_i522) + { + xfer += this->success[_i522].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_column_grant_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_list_security_column_grant_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + std::vector ::const_iterator _iter523; + for (_iter523 = this->success.begin(); _iter523 != this->success.end(); ++_iter523) + { + xfer += (*_iter523).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_list_security_column_grant_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size524; + apache::thrift::protocol::TType _etype527; + iprot->readListBegin(_etype527, _size524); + (*(this->success)).resize(_size524); + uint32_t _i528; + for (_i528 = 0; _i528 < _size524; ++_i528) + { + xfer += (*(this->success))[_i528].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_args"); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", apache::thrift::protocol::T_STRUCT, 4); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_pargs"); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->privileges)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString((*(this->grantor))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_grant_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_grant_privileges_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_args"); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", apache::thrift::protocol::T_STRUCT, 4); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_pargs"); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", apache::thrift::protocol::T_STRUCT, 4); + xfer += (*(this->privileges)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_privileges_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_all_privileges_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->user_name); + this->__isset.user_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_role); + this->__isset.is_role = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->is_group); + this->__isset.is_group = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->remove_user_priv); + this->__isset.remove_user_priv = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->dbs.clear(); + uint32_t _size529; + apache::thrift::protocol::TType _etype532; + iprot->readListBegin(_etype532, _size529); + this->dbs.resize(_size529); + uint32_t _i533; + for (_i533 = 0; _i533 < _size529; ++_i533) + { + xfer += this->dbs[_i533].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.dbs = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->tables.clear(); + uint32_t _size534; + apache::thrift::protocol::TType _etype537; + iprot->readListBegin(_etype537, _size534); + this->tables.resize(_size534); + uint32_t _i538; + for (_i538 = 0; _i538 < _size534; ++_i538) + { + xfer += this->tables[_i538].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.tables = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->parts.clear(); + uint32_t _size539; + apache::thrift::protocol::TType _etype542; + iprot->readListBegin(_etype542, _size539); + this->parts.resize(_size539); + uint32_t _i543; + for (_i543 = 0; _i543 < _size539; ++_i543) + { + xfer += this->parts[_i543].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.parts = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == apache::thrift::protocol::T_MAP) { + { + this->columns.clear(); + uint32_t _size544; + apache::thrift::protocol::TType _ktype545; + apache::thrift::protocol::TType _vtype546; + iprot->readMapBegin(_ktype545, _vtype546, _size544); + uint32_t _i548; + for (_i548 = 0; _i548 < _size544; ++_i548) + { + Table _key549; + xfer += _key549.read(iprot); + std::vector & _val550 = this->columns[_key549]; + { + _val550.clear(); + uint32_t _size551; + apache::thrift::protocol::TType _etype554; + iprot->readListBegin(_etype554, _size551); + _val550.resize(_size551); + uint32_t _i555; + for (_i555 = 0; _i555 < _size551; ++_i555) + { + xfer += iprot->readString(_val550[_i555]); + } + iprot->readListEnd(); + } + } + iprot->readMapEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_all_privileges_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_all_privileges_args"); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->user_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->is_role); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->is_group); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("remove_user_priv", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->remove_user_priv); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbs", apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->dbs.size()); + std::vector ::const_iterator _iter556; + for (_iter556 = this->dbs.begin(); _iter556 != this->dbs.end(); ++_iter556) + { + xfer += (*_iter556).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tables", apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->tables.size()); + std::vector
::const_iterator _iter557; + for (_iter557 = this->tables.begin(); _iter557 != this->tables.end(); ++_iter557) + { + xfer += (*_iter557).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parts", apache::thrift::protocol::T_LIST, 7); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->parts.size()); + std::vector ::const_iterator _iter558; + for (_iter558 = this->parts.begin(); _iter558 != this->parts.end(); ++_iter558) + { + xfer += (*_iter558).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", apache::thrift::protocol::T_MAP, 8); + { + xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRUCT, apache::thrift::protocol::T_LIST, this->columns.size()); + std::map > ::const_iterator _iter559; + for (_iter559 = this->columns.begin(); _iter559 != this->columns.end(); ++_iter559) + { + xfer += _iter559->first.write(oprot); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, _iter559->second.size()); + std::vector ::const_iterator _iter560; + for (_iter560 = _iter559->second.begin(); _iter560 != _iter559->second.end(); ++_iter560) + { + xfer += oprot->writeString((*_iter560)); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_all_privileges_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_all_privileges_pargs"); + xfer += oprot->writeFieldBegin("user_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->user_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_role", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool((*(this->is_role))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("is_group", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool((*(this->is_group))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("remove_user_priv", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool((*(this->remove_user_priv))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbs", apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, (*(this->dbs)).size()); + std::vector ::const_iterator _iter561; + for (_iter561 = (*(this->dbs)).begin(); _iter561 != (*(this->dbs)).end(); ++_iter561) + { + xfer += (*_iter561).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tables", apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, (*(this->tables)).size()); + std::vector
::const_iterator _iter562; + for (_iter562 = (*(this->tables)).begin(); _iter562 != (*(this->tables)).end(); ++_iter562) + { + xfer += (*_iter562).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("parts", apache::thrift::protocol::T_LIST, 7); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, (*(this->parts)).size()); + std::vector ::const_iterator _iter563; + for (_iter563 = (*(this->parts)).begin(); _iter563 != (*(this->parts)).end(); ++_iter563) + { + xfer += (*_iter563).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", apache::thrift::protocol::T_MAP, 8); + { + xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRUCT, apache::thrift::protocol::T_LIST, (*(this->columns)).size()); + std::map > ::const_iterator _iter564; + for (_iter564 = (*(this->columns)).begin(); _iter564 != (*(this->columns)).end(); ++_iter564) + { + xfer += _iter564->first.write(oprot); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, _iter564->second.size()); + std::vector ::const_iterator _iter565; + for (_iter565 = _iter564->second.begin(); _iter565 != _iter564->second.end(); ++_iter565) + { + xfer += oprot->writeString((*_iter565)); + } + xfer += oprot->writeListEnd(); + } + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_all_privileges_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_all_privileges_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_revoke_all_privileges_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_revoke_all_privileges_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +void ThriftHiveMetastoreClient::create_database(const Database& database) +{ + send_create_database(database); + recv_create_database(); +} + +void ThriftHiveMetastoreClient::send_create_database(const Database& database) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_database", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_database_pargs args; + args.database = &database; + 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); + send_get_database(name); + recv_get_database(_return); +} + +void ThriftHiveMetastoreClient::send_get_database(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_database", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_database_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_database(Database& _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_database") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_database_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); +} + +void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData) +{ + send_drop_database(name, deleteData); + recv_drop_database(); +} + +void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_database", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_database_pargs args; + args.name = &name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_drop_database() +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_database") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_drop_database_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +{ + send_get_databases(pattern); + recv_get_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_databases", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_databases_pargs args; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_databases") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +{ + send_get_all_databases(); + recv_get_all_databases(_return); +} + +void ThriftHiveMetastoreClient::send_get_all_databases() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_databases_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_all_databases") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_all_databases_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) +{ + send_get_type(name); + recv_get_type(_return); +} + +void ThriftHiveMetastoreClient::send_get_type(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_type", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_type_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_type(Type& _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_type") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::create_type(const Type& type) +{ + send_create_type(type); + return recv_create_type(); +} + +void ThriftHiveMetastoreClient::send_create_type(const Type& type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_type", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_create_type() +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("create_type") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_create_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_type(const std::string& type) +{ + send_drop_type(type); + return recv_drop_type(); +} + +void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_type", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_type_pargs args; + args.type = &type; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_drop_type() +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_type") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_drop_type_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) +{ + send_get_type_all(name); + recv_get_type_all(_return); +} + +void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_type_all", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_type_all_pargs args; + args.name = &name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_type_all") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_type_all_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) +{ + send_get_fields(db_name, table_name); + recv_get_fields(_return); +} + +void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_fields", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_fields_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_fields") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_fields_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) +{ + send_get_schema(db_name, table_name); + recv_get_schema(_return); +} + +void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_schema", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_schema_pargs args; + args.db_name = &db_name; + args.table_name = &table_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_schema") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_schema_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); +} + +void ThriftHiveMetastoreClient::create_table(const Table& tbl) +{ + send_create_table(tbl); + recv_create_table(); +} + +void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("create_table", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_create_table_pargs args; + args.tbl = &tbl; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_create_table() +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("create_table") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_create_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + if (result.__isset.o4) { + throw result.o4; + } + return; +} + +void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +{ + send_drop_table(dbname, name, deleteData); + recv_drop_table(); +} + +void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_table", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_table_pargs args; + args.dbname = &dbname; + args.name = &name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_drop_table() +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_table") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_drop_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o3) { + throw result.o3; + } + return; +} + +void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) +{ + send_get_tables(db_name, pattern); + recv_get_tables(_return); +} + +void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_tables", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_tables_pargs args; + args.db_name = &db_name; + args.pattern = &pattern; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_tables") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_tables_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) +{ + send_get_all_tables(db_name); + recv_get_all_tables(_return); +} + +void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_all_tables_pargs args; + args.db_name = &db_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_all_tables") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_all_tables_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) +{ + send_get_table(dbname, tbl_name); + recv_get_table(_return); +} + +void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_table", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_table(Table& _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_table") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_table_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +{ + send_alter_table(dbname, tbl_name, new_tbl); + recv_alter_table(); +} + +void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_table", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_table_pargs args; + args.dbname = &dbname; + args.tbl_name = &tbl_name; + args.new_tbl = &new_tbl; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_alter_table() +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("alter_table") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_alter_table_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + return; +} + +void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) +{ + send_add_partition(new_part); + recv_add_partition(_return); +} + +void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("add_partition", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_add_partition_pargs args; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("add_partition") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_add_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); +} + +void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + send_append_partition(db_name, tbl_name, part_vals); + recv_append_partition(_return); +} + +void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("append_partition", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("append_partition") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_append_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result"); +} + +void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + send_append_partition_by_name(db_name, tbl_name, part_name); + recv_append_partition_by_name(_return); +} + +void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("append_partition_by_name", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_append_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("append_partition_by_name") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_append_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + if (result.__isset.o3) { + throw result.o3; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +{ + send_drop_partition(db_name, tbl_name, part_vals, deleteData); + return recv_drop_partition(); +} + +void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_partition", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_drop_partition() +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_partition") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_drop_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); +} + +bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +{ + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); + return recv_drop_partition_by_name(); +} + +void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("drop_partition_by_name", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_drop_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.deleteData = &deleteData; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("drop_partition_by_name") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + bool _return; + ThriftHiveMetastore_drop_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + send_get_partition(db_name, tbl_name, part_vals); + recv_get_partition(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_partition") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partition_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) +{ + send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names); + recv_get_partition_with_auth(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition_with_auth", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_with_auth_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.user_name = &user_name; + args.group_names = &group_names; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_with_auth(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_partition_with_auth") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partition_with_auth_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_with_auth failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + send_get_partition_by_name(db_name, tbl_name, part_name); + recv_get_partition_by_name(_return); +} + +void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partition_by_name", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partition_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_name = &part_name; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("get_partition_by_name") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_get_partition_by_name_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); +} + +void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + send_get_partitions(db_name, tbl_name, max_parts); + recv_get_partitions(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get_partitions", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_get_partitions_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) +{ + + int32_t rseqid = 0; + 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_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_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; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); } -void ThriftHiveMetastoreClient::send_get_database(const std::string& name) +void ThriftHiveMetastoreClient::get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) +{ + send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names); + recv_get_partitions_with_auth(_return); +} + +void ThriftHiveMetastoreClient::send_get_partitions_with_auth(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_database", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_with_auth", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_database_pargs args; - args.name = &name; + ThriftHiveMetastore_get_partitions_with_auth_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9033,7 +16250,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_database(Database& _return) +void ThriftHiveMetastoreClient::recv_get_partitions_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -9054,13 +16271,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_database") != 0) { + if (fname.compare("get_partitions_with_auth") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_database_presult result; + ThriftHiveMetastore_get_partitions_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9076,23 +16293,24 @@ if (result.__isset.o2) { throw result.o2; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_database failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); } -void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - send_drop_database(name, deleteData); - recv_drop_database(); + send_get_partition_names(db_name, tbl_name, max_parts); + recv_get_partition_names(_return); } -void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_database", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_database_pargs args; - args.name = &name; - args.deleteData = &deleteData; + ThriftHiveMetastore_get_partition_names_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9100,7 +16318,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_drop_database() +void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) { int32_t rseqid = 0; @@ -9121,42 +16339,44 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_database") != 0) { + if (fname.compare("get_partition_names") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_drop_database_presult result; + ThriftHiveMetastore_get_partition_names_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - if (result.__isset.o1) { - throw result.o1; + if (result.__isset.success) { + // _return pointer has now been filled + return; } if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - return; + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); } -void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +void ThriftHiveMetastoreClient::get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { - send_get_databases(pattern); - recv_get_databases(_return); + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partitions_ps(_return); } -void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_databases", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_databases_pargs args; - args.pattern = &pattern; + ThriftHiveMetastore_get_partitions_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9164,7 +16384,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) { int32_t rseqid = 0; @@ -9185,13 +16405,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_databases") != 0) { + if (fname.compare("get_partitions_ps") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_databases_presult result; + ThriftHiveMetastore_get_partitions_ps_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9204,21 +16424,27 @@ if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); } -void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { - send_get_all_databases(); - recv_get_all_databases(_return); + send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names); + recv_get_partitions_ps_with_auth(_return); } -void ThriftHiveMetastoreClient::send_get_all_databases() +void ThriftHiveMetastoreClient::send_get_partitions_ps_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps_with_auth", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_databases_pargs args; + ThriftHiveMetastore_get_partitions_ps_with_auth_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9226,7 +16452,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partitions_ps_with_auth(std::vector & _return) { int32_t rseqid = 0; @@ -9247,13 +16473,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_all_databases") != 0) { + if (fname.compare("get_partitions_ps_with_auth") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_all_databases_presult result; + ThriftHiveMetastore_get_partitions_ps_with_auth_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9266,22 +16492,28 @@ if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); } -void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) +void ThriftHiveMetastoreClient::get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { - send_get_type(name); - recv_get_type(_return); + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partition_names_ps(_return); } -void ThriftHiveMetastoreClient::send_get_type(const std::string& name) +void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names_ps", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_pargs args; - args.name = &name; + ThriftHiveMetastore_get_partition_names_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9289,7 +16521,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_type(Type& _return) +void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) { int32_t rseqid = 0; @@ -9310,13 +16542,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_type") != 0) { + if (fname.compare("get_partition_names_ps") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_type_presult result; + ThriftHiveMetastore_get_partition_names_ps_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9329,25 +16561,25 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); } -bool ThriftHiveMetastoreClient::create_type(const Type& type) +void ThriftHiveMetastoreClient::get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { - send_create_type(type); - return recv_create_type(); + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); + recv_get_partitions_by_filter(_return); } -void ThriftHiveMetastoreClient::send_create_type(const Type& type) +void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_type", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_by_filter", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_type_pargs args; - args.type = &type; + ThriftHiveMetastore_get_partitions_by_filter_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.filter = &filter; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9355,7 +16587,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_create_type() +void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) { int32_t rseqid = 0; @@ -9376,21 +16608,21 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("create_type") != 0) { + if (fname.compare("get_partitions_by_filter") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - bool _return; - ThriftHiveMetastore_create_type_presult result; + ThriftHiveMetastore_get_partitions_by_filter_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; @@ -9398,25 +16630,86 @@ if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); +} + +void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +{ + send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(); +} + +void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("alter_partition", apache::thrift::protocol::T_CALL, cseqid); + + ThriftHiveMetastore_alter_partition_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.new_part = &new_part; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreClient::recv_alter_partition() +{ + + int32_t rseqid = 0; + std::string fname; + apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == apache::thrift::protocol::T_EXCEPTION) { + apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != apache::thrift::protocol::T_REPLY) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("alter_partition") != 0) { + iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHiveMetastore_alter_partition_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.o1) { + throw result.o1; + } + if (result.__isset.o2) { + throw result.o2; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); + return; } -bool ThriftHiveMetastoreClient::drop_type(const std::string& type) +void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { - send_drop_type(type); - return recv_drop_type(); + send_get_config_value(name, defaultValue); + recv_get_config_value(_return); } -void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_type", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_config_value", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_type_pargs args; - args.type = &type; + ThriftHiveMetastore_get_config_value_pargs args; + args.name = &name; + args.defaultValue = &defaultValue; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9424,7 +16717,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_type() +void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) { int32_t rseqid = 0; @@ -9445,44 +16738,41 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_type") != 0) { + if (fname.compare("get_config_value") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - bool _return; - ThriftHiveMetastore_drop_type_presult result; + ThriftHiveMetastore_get_config_value_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); } -void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) +void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) { - send_get_type_all(name); - recv_get_type_all(_return); + send_partition_name_to_vals(part_name); + recv_partition_name_to_vals(_return); } -void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) +void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type_all", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_vals", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_all_pargs args; - args.name = &name; + ThriftHiveMetastore_partition_name_to_vals_pargs args; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9490,7 +16780,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) +void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) { int32_t rseqid = 0; @@ -9511,13 +16801,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_type_all") != 0) { + if (fname.compare("partition_name_to_vals") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_type_all_presult result; + ThriftHiveMetastore_partition_name_to_vals_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9527,26 +16817,25 @@ // _return pointer has now been filled return; } - if (result.__isset.o2) { - throw result.o2; + if (result.__isset.o1) { + throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); } -void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) { - send_get_fields(db_name, table_name); - recv_get_fields(_return); + send_partition_name_to_spec(part_name); + recv_partition_name_to_spec(_return); } -void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_fields", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_spec", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_fields_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; + ThriftHiveMetastore_partition_name_to_spec_pargs args; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9554,7 +16843,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) +void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) { int32_t rseqid = 0; @@ -9575,13 +16864,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_fields") != 0) { + if (fname.compare("partition_name_to_spec") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_fields_presult result; + ThriftHiveMetastore_partition_name_to_spec_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9594,29 +16883,23 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_fields failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); } -void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) { - send_get_schema(db_name, table_name); - recv_get_schema(_return); + send_add_index(new_index, index_table); + recv_add_index(_return); } -void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_schema", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_index", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_schema_pargs args; - args.db_name = &db_name; - args.table_name = &table_name; + ThriftHiveMetastore_add_index_pargs args; + args.new_index = &new_index; + args.index_table = &index_table; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9624,7 +16907,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) +void ThriftHiveMetastoreClient::recv_add_index(Index& _return) { int32_t rseqid = 0; @@ -9645,13 +16928,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_schema") != 0) { + if (fname.compare("add_index") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_schema_presult result; + ThriftHiveMetastore_add_index_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9670,22 +16953,25 @@ if (result.__isset.o3) { throw result.o3; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_schema failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); } -void ThriftHiveMetastoreClient::create_table(const Table& tbl) +void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { - send_create_table(tbl); - recv_create_table(); + send_alter_index(dbname, base_tbl_name, idx_name, new_idx); + recv_alter_index(); } -void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_index", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_table_pargs args; - args.tbl = &tbl; + ThriftHiveMetastore_alter_index_pargs args; + args.dbname = &dbname; + args.base_tbl_name = &base_tbl_name; + args.idx_name = &idx_name; + args.new_idx = &new_idx; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9693,7 +16979,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_create_table() +void ThriftHiveMetastoreClient::recv_alter_index() { int32_t rseqid = 0; @@ -9714,13 +17000,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("create_table") != 0) { + if (fname.compare("alter_index") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_create_table_presult result; + ThriftHiveMetastore_alter_index_presult result; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); @@ -9731,29 +17017,24 @@ if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - if (result.__isset.o4) { - throw result.o4; - } return; } -void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { - send_drop_table(dbname, name, deleteData); - recv_drop_table(); + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); + return recv_drop_index_by_name(); } -void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) +void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_table", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_index_by_name", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_table_pargs args; - args.dbname = &dbname; - args.name = &name; + ThriftHiveMetastore_drop_index_by_name_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.index_name = &index_name; args.deleteData = &deleteData; args.write(oprot_); @@ -9762,7 +17043,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_drop_table() +bool ThriftHiveMetastoreClient::recv_drop_index_by_name() { int32_t rseqid = 0; @@ -9783,40 +17064,46 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_table") != 0) { + if (fname.compare("drop_index_by_name") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_drop_table_presult result; + bool _return; + ThriftHiveMetastore_drop_index_by_name_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + return _return; + } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o3) { - throw result.o3; + if (result.__isset.o2) { + throw result.o2; } - return; + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern) +void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { - send_get_tables(db_name, pattern); - recv_get_tables(_return); + send_get_index_by_name(db_name, tbl_name, index_name); + recv_get_index_by_name(_return); } -void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) +void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_tables", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_by_name", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_tables_pargs args; + ThriftHiveMetastore_get_index_by_name_pargs args; args.db_name = &db_name; - args.pattern = &pattern; + args.tbl_name = &tbl_name; + args.index_name = &index_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9824,7 +17111,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) { int32_t rseqid = 0; @@ -9845,13 +17132,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_tables") != 0) { + if (fname.compare("get_index_by_name") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_tables_presult result; + ThriftHiveMetastore_get_index_by_name_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9864,22 +17151,27 @@ if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name failed: unknown result"); } -void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) +void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - send_get_all_tables(db_name); - recv_get_all_tables(_return); + send_get_indexes(db_name, tbl_name, max_indexes); + recv_get_indexes(_return); } -void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) +void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_indexes", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_tables_pargs args; + ThriftHiveMetastore_get_indexes_pargs args; args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.max_indexes = &max_indexes; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9887,7 +17179,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) { int32_t rseqid = 0; @@ -9908,13 +17200,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_all_tables") != 0) { + if (fname.compare("get_indexes") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_all_tables_presult result; + ThriftHiveMetastore_get_indexes_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9927,23 +17219,27 @@ if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); + if (result.__isset.o2) { + throw result.o2; + } + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); } -void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) +void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { - send_get_table(dbname, tbl_name); - recv_get_table(_return); + send_get_index_names(db_name, tbl_name, max_indexes); + recv_get_index_names(_return); } -void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) +void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_names", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_table_pargs args; - args.dbname = &dbname; + ThriftHiveMetastore_get_index_names_pargs args; + args.db_name = &db_name; args.tbl_name = &tbl_name; + args.max_indexes = &max_indexes; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9951,7 +17247,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_table(Table& _return) +void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) { int32_t rseqid = 0; @@ -9972,13 +17268,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_table") != 0) { + if (fname.compare("get_index_names") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_table_presult result; + ThriftHiveMetastore_get_index_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9988,30 +17284,26 @@ // _return pointer has now been filled return; } - if (result.__isset.o1) { - throw result.o1; - } if (result.__isset.o2) { throw result.o2; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) -{ - send_alter_table(dbname, tbl_name, new_tbl); - recv_alter_table(); +void ThriftHiveMetastoreClient::get_user_privilege_set(PrincipalPrivilegeSet& _return, const std::string& user_name, const std::vector & group_names) +{ + send_get_user_privilege_set(user_name, group_names); + recv_get_user_privilege_set(_return); } -void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) +void ThriftHiveMetastoreClient::send_get_user_privilege_set(const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_table", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_user_privilege_set", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_table_pargs args; - args.dbname = &dbname; - args.tbl_name = &tbl_name; - args.new_tbl = &new_tbl; + ThriftHiveMetastore_get_user_privilege_set_pargs args; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10019,7 +17311,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_table() +void ThriftHiveMetastoreClient::recv_get_user_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -10040,39 +17332,43 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("alter_table") != 0) { + if (fname.compare("get_user_privilege_set") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_alter_table_presult result; + ThriftHiveMetastore_get_user_privilege_set_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - return; + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_user_privilege_set failed: unknown result"); } -void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partition& new_part) +void ThriftHiveMetastoreClient::get_db_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& user_name, const std::vector & group_names) { - send_add_partition(new_part); - recv_add_partition(_return); + send_get_db_privilege_set(db_name, user_name, group_names); + recv_get_db_privilege_set(_return); } -void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) +void ThriftHiveMetastoreClient::send_get_db_privilege_set(const std::string& db_name, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partition", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_db_privilege_set", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_partition_pargs args; - args.new_part = &new_part; + ThriftHiveMetastore_get_db_privilege_set_pargs args; + args.db_name = &db_name; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10080,7 +17376,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_db_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -10101,13 +17397,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("add_partition") != 0) { + if (fname.compare("get_db_privilege_set") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_add_partition_presult result; + ThriftHiveMetastore_get_db_privilege_set_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10120,30 +17416,25 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "add_partition failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_db_privilege_set failed: unknown result"); } -void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::get_table_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names) { - send_append_partition(db_name, tbl_name, part_vals); - recv_append_partition(_return); + send_get_table_privilege_set(db_name, table_name, user_name, group_names); + recv_get_table_privilege_set(_return); } -void ThriftHiveMetastoreClient::send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::send_get_table_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table_privilege_set", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_pargs args; + ThriftHiveMetastore_get_table_privilege_set_pargs args; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; + args.table_name = &table_name; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10151,7 +17442,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_table_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -10172,13 +17463,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("append_partition") != 0) { + if (fname.compare("get_table_privilege_set") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_append_partition_presult result; + ThriftHiveMetastore_get_table_privilege_set_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10191,30 +17482,26 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "append_partition failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_table_privilege_set failed: unknown result"); } -void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::get_partition_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names) { - send_append_partition_by_name(db_name, tbl_name, part_name); - recv_append_partition_by_name(_return); + send_get_partition_privilege_set(db_name, table_name, part_name, user_name, group_names); + recv_get_partition_privilege_set(_return); } -void ThriftHiveMetastoreClient::send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::send_get_partition_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("append_partition_by_name", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_privilege_set", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_append_partition_by_name_pargs args; + ThriftHiveMetastore_get_partition_privilege_set_pargs args; args.db_name = &db_name; - args.tbl_name = &tbl_name; + args.table_name = &table_name; args.part_name = &part_name; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10222,7 +17509,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_partition_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -10243,13 +17530,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("append_partition_by_name") != 0) { + if (fname.compare("get_partition_privilege_set") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_append_partition_by_name_presult result; + ThriftHiveMetastore_get_partition_privilege_set_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10262,31 +17549,27 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "append_partition_by_name failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_privilege_set failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +void ThriftHiveMetastoreClient::get_column_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names) { - send_drop_partition(db_name, tbl_name, part_vals, deleteData); - return recv_drop_partition(); + send_get_column_privilege_set(db_name, table_name, part_name, column_name, user_name, group_names); + recv_get_column_privilege_set(_return); } -void ThriftHiveMetastoreClient::send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) +void ThriftHiveMetastoreClient::send_get_column_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_column_privilege_set", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_pargs args; + ThriftHiveMetastore_get_column_privilege_set_pargs args; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.deleteData = &deleteData; + args.table_name = &table_name; + args.part_name = &part_name; + args.column_name = &column_name; + args.user_name = &user_name; + args.group_names = &group_names; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10294,7 +17577,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_partition() +void ThriftHiveMetastoreClient::recv_get_column_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -10315,47 +17598,43 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_partition") != 0) { + if (fname.compare("get_column_privilege_set") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - bool _return; - ThriftHiveMetastore_drop_partition_presult result; + ThriftHiveMetastore_get_column_privilege_set_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - return _return; + // _return pointer has now been filled + return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_column_privilege_set failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +bool ThriftHiveMetastoreClient::create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name) { - send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData); - return recv_drop_partition_by_name(); + send_create_role(role_name, owner_name, db_name); + return recv_create_role(); } -void ThriftHiveMetastoreClient::send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) +void ThriftHiveMetastoreClient::send_create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_partition_by_name", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_role", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_partition_by_name_pargs args; + ThriftHiveMetastore_create_role_pargs args; + args.role_name = &role_name; + args.owner_name = &owner_name; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.deleteData = &deleteData; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10363,7 +17642,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() +bool ThriftHiveMetastoreClient::recv_create_role() { int32_t rseqid = 0; @@ -10384,14 +17663,14 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_partition_by_name") != 0) { + if (fname.compare("create_role") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } bool _return; - ThriftHiveMetastore_drop_partition_by_name_presult result; + ThriftHiveMetastore_create_role_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10403,27 +17682,23 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_partition_by_name failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "create_role failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +bool ThriftHiveMetastoreClient::drop_role(const std::string& role_name, const std::string& db_name) { - send_get_partition(db_name, tbl_name, part_vals); - recv_get_partition(_return); + send_drop_role(role_name, db_name); + return recv_drop_role(); } -void ThriftHiveMetastoreClient::send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) +void ThriftHiveMetastoreClient::send_drop_role(const std::string& role_name, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_role", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_pargs args; + ThriftHiveMetastore_drop_role_pargs args; + args.role_name = &role_name; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10431,7 +17706,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) +bool ThriftHiveMetastoreClient::recv_drop_role() { int32_t rseqid = 0; @@ -10452,46 +17727,45 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partition") != 0) { + if (fname.compare("drop_role") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partition_presult result; + bool _return; + ThriftHiveMetastore_drop_role_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_role failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +bool ThriftHiveMetastoreClient::add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { - send_get_partition_by_name(db_name, tbl_name, part_name); - recv_get_partition_by_name(_return); + send_add_role_member(role_name, user_name, is_role, is_group, db_name); + return recv_add_role_member(); } -void ThriftHiveMetastoreClient::send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name) +void ThriftHiveMetastoreClient::send_add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_by_name", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_role_member", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_by_name_pargs args; + ThriftHiveMetastore_add_role_member_pargs args; + args.role_name = &role_name; + args.user_name = &user_name; + args.is_role = &is_role; + args.is_group = &is_group; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10499,7 +17773,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) +bool ThriftHiveMetastoreClient::recv_add_role_member() { int32_t rseqid = 0; @@ -10520,46 +17794,45 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partition_by_name") != 0) { + if (fname.compare("add_role_member") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partition_by_name_presult result; + bool _return; + ThriftHiveMetastore_add_role_member_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "add_role_member failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +bool ThriftHiveMetastoreClient::remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { - send_get_partitions(db_name, tbl_name, max_parts); - recv_get_partitions(_return); + send_remove_role_member(role_name, user_name, is_role, is_group, db_name); + return recv_remove_role_member(); } -void ThriftHiveMetastoreClient::send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("remove_role_member", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_pargs args; + ThriftHiveMetastore_remove_role_member_pargs args; + args.role_name = &role_name; + args.user_name = &user_name; + args.is_role = &is_role; + args.is_group = &is_group; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10567,7 +17840,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_remove_role_member() { int32_t rseqid = 0; @@ -10588,46 +17861,44 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partitions") != 0) { + if (fname.compare("remove_role_member") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partitions_presult result; + bool _return; + ThriftHiveMetastore_remove_role_member_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "remove_role_member failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::list_roles(std::vector & _return, const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name) { - send_get_partition_names(db_name, tbl_name, max_parts); - recv_get_partition_names(_return); + send_list_roles(principal_name, is_role, is_group, db_name); + recv_list_roles(_return); } -void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_list_roles(const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_roles", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_pargs args; + ThriftHiveMetastore_list_roles_pargs args; + args.principal_name = &principal_name; + args.is_role = &is_role; + args.is_group = &is_group; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10635,7 +17906,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_roles(std::vector & _return) { int32_t rseqid = 0; @@ -10656,13 +17927,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partition_names") != 0) { + if (fname.compare("list_roles") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partition_names_presult result; + ThriftHiveMetastore_list_roles_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10672,28 +17943,27 @@ // _return pointer has now been filled return; } - if (result.__isset.o2) { - throw result.o2; + if (result.__isset.o1) { + throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "list_roles failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::list_security_user_grant(std::vector & _return, const std::string& principla_name, const bool is_role, const bool is_group) { - send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partitions_ps(_return); + send_list_security_user_grant(principla_name, is_role, is_group); + recv_list_security_user_grant(_return); } -void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_list_security_user_grant(const std::string& principla_name, const bool is_role, const bool is_group) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_ps", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_user_grant", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_ps_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; + ThriftHiveMetastore_list_security_user_grant_pargs args; + args.principla_name = &principla_name; + args.is_role = &is_role; + args.is_group = &is_group; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10701,7 +17971,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_security_user_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10722,13 +17992,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partitions_ps") != 0) { + if (fname.compare("list_security_user_grant") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partitions_ps_presult result; + ThriftHiveMetastore_list_security_user_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10741,25 +18011,25 @@ if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "list_security_user_grant failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::list_security_db_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name) { - send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partition_names_ps(_return); + send_list_security_db_grant(principal_name, is_group, is_role, db_name); + recv_list_security_db_grant(_return); } -void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_list_security_db_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names_ps", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_db_grant", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_ps_pargs args; + ThriftHiveMetastore_list_security_db_grant_pargs args; + args.principal_name = &principal_name; + args.is_group = &is_group; + args.is_role = &is_role; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; - args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10767,7 +18037,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_security_db_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10788,13 +18058,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partition_names_ps") != 0) { + if (fname.compare("list_security_db_grant") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partition_names_ps_presult result; + ThriftHiveMetastore_list_security_db_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10807,25 +18077,26 @@ if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names_ps failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "list_security_db_grant failed: unknown result"); } -void ThriftHiveMetastoreClient::get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) +void ThriftHiveMetastoreClient::list_security_table_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name) { - send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); - recv_get_partitions_by_filter(_return); + send_list_security_table_grant(principal_name, is_group, is_role, db_name, table_name); + recv_list_security_table_grant(_return); } -void ThriftHiveMetastoreClient::send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) +void ThriftHiveMetastoreClient::send_list_security_table_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partitions_by_filter", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_table_grant", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_by_filter_pargs args; + ThriftHiveMetastore_list_security_table_grant_pargs args; + args.principal_name = &principal_name; + args.is_group = &is_group; + args.is_role = &is_role; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.filter = &filter; - args.max_parts = &max_parts; + args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10833,7 +18104,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_security_table_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10854,13 +18125,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_partitions_by_filter") != 0) { + if (fname.compare("list_security_table_grant") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_partitions_by_filter_presult result; + ThriftHiveMetastore_list_security_table_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10873,27 +18144,27 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "list_security_table_grant failed: unknown result"); } -void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +void ThriftHiveMetastoreClient::list_security_partition_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name) { - send_alter_partition(db_name, tbl_name, new_part); - recv_alter_partition(); + send_list_security_partition_grant(principal_name, is_group, is_role, db_name, table_name, part_name); + recv_list_security_partition_grant(_return); } -void ThriftHiveMetastoreClient::send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) +void ThriftHiveMetastoreClient::send_list_security_partition_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partition", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_partition_grant", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_partition_pargs args; + ThriftHiveMetastore_list_security_partition_grant_pargs args; + args.principal_name = &principal_name; + args.is_group = &is_group; + args.is_role = &is_role; args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.new_part = &new_part; + args.table_name = &table_name; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10901,7 +18172,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_partition() +void ThriftHiveMetastoreClient::recv_list_security_partition_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10922,40 +18193,47 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("alter_partition") != 0) { + if (fname.compare("list_security_partition_grant") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_alter_partition_presult result; + ThriftHiveMetastore_list_security_partition_grant_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - return; + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "list_security_partition_grant failed: unknown result"); } -void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) +void ThriftHiveMetastoreClient::list_security_column_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name) { - send_get_config_value(name, defaultValue); - recv_get_config_value(_return); + send_list_security_column_grant(principal_name, is_group, is_role, db_name, table_name, part_name, column_name); + recv_list_security_column_grant(_return); } -void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) +void ThriftHiveMetastoreClient::send_list_security_column_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_config_value", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_column_grant", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_config_value_pargs args; - args.name = &name; - args.defaultValue = &defaultValue; + ThriftHiveMetastore_list_security_column_grant_pargs args; + args.principal_name = &principal_name; + args.is_group = &is_group; + args.is_role = &is_role; + args.db_name = &db_name; + args.table_name = &table_name; + args.part_name = &part_name; + args.column_name = &column_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10963,7 +18241,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) +void ThriftHiveMetastoreClient::recv_list_security_column_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10984,13 +18262,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_config_value") != 0) { + if (fname.compare("list_security_column_grant") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_config_value_presult result; + ThriftHiveMetastore_list_security_column_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -11003,22 +18281,26 @@ if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "list_security_column_grant failed: unknown result"); } -void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) +bool ThriftHiveMetastoreClient::grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor) { - send_partition_name_to_vals(part_name); - recv_partition_name_to_vals(_return); + send_grant_privileges(user_name, is_role, is_group, privileges, grantor); + return recv_grant_privileges(); } -void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) +void ThriftHiveMetastoreClient::send_grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_vals", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("grant_privileges", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_vals_pargs args; - args.part_name = &part_name; + ThriftHiveMetastore_grant_privileges_pargs args; + args.user_name = &user_name; + args.is_role = &is_role; + args.is_group = &is_group; + args.privileges = &privileges; + args.grantor = &grantor; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11026,7 +18308,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_grant_privileges() { int32_t rseqid = 0; @@ -11047,41 +18329,44 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("partition_name_to_vals") != 0) { + if (fname.compare("grant_privileges") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_partition_name_to_vals_presult result; + bool _return; + ThriftHiveMetastore_grant_privileges_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_vals failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result"); } -void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) +bool ThriftHiveMetastoreClient::revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges) { - send_partition_name_to_spec(part_name); - recv_partition_name_to_spec(_return); + send_revoke_privileges(user_name, is_role, is_group, privileges); + return recv_revoke_privileges(); } -void ThriftHiveMetastoreClient::send_partition_name_to_spec(const std::string& part_name) +void ThriftHiveMetastoreClient::send_revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_spec", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("revoke_privileges", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_spec_pargs args; - args.part_name = &part_name; + ThriftHiveMetastore_revoke_privileges_pargs args; + args.user_name = &user_name; + args.is_role = &is_role; + args.is_group = &is_group; + args.privileges = &privileges; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11089,7 +18374,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) +bool ThriftHiveMetastoreClient::recv_revoke_privileges() { int32_t rseqid = 0; @@ -11110,42 +18395,48 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("partition_name_to_spec") != 0) { + if (fname.compare("revoke_privileges") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_partition_name_to_spec_presult result; + bool _return; + ThriftHiveMetastore_revoke_privileges_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result"); } -void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) +bool ThriftHiveMetastoreClient::revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns) { - send_add_index(new_index, index_table); - recv_add_index(_return); + send_revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns); + return recv_revoke_all_privileges(); } -void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) +void ThriftHiveMetastoreClient::send_revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_index", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("revoke_all_privileges", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_add_index_pargs args; - args.new_index = &new_index; - args.index_table = &index_table; + ThriftHiveMetastore_revoke_all_privileges_pargs args; + args.user_name = &user_name; + args.is_role = &is_role; + args.is_group = &is_group; + args.remove_user_priv = &remove_user_priv; + args.dbs = &dbs; + args.tables = &tables; + args.parts = &parts; + args.columns = &columns; args.write(oprot_); oprot_->writeMessageEnd(); @@ -11153,7 +18444,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_add_index(Index& _return) +bool ThriftHiveMetastoreClient::recv_revoke_all_privileges() { int32_t rseqid = 0; @@ -11174,426 +18465,808 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("add_index") != 0) { + if (fname.compare("revoke_all_privileges") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_add_index_presult result; + bool _return; + ThriftHiveMetastore_revoke_all_privileges_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); if (result.__isset.success) { - // _return pointer has now been filled - return; + return _return; } if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "revoke_all_privileges failed: unknown result"); +} + +bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr piprot, boost::shared_ptr poprot) { + + apache::thrift::protocol::TProtocol* iprot = piprot.get(); + apache::thrift::protocol::TProtocol* oprot = poprot.get(); + std::string fname; + apache::thrift::protocol::TMessageType mtype; + int32_t seqid; + + iprot->readMessageBegin(fname, mtype, seqid); + + if (mtype != apache::thrift::protocol::T_CALL && mtype != apache::thrift::protocol::T_ONEWAY) { + iprot->skip(apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + apache::thrift::TApplicationException x(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return true; } - if (result.__isset.o3) { - throw result.o3; + + return process_fn(iprot, oprot, fname, seqid); +} + +bool ThriftHiveMetastoreProcessor::process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) { + std::map::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + return facebook::fb303::FacebookServiceProcessor::process_fn(iprot, oprot, fname, seqid); } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); + (this->*(pfn->second))(seqid, iprot, oprot); + return true; } -void ThriftHiveMetastoreClient::alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - send_alter_index(dbname, base_tbl_name, idx_name, new_idx); - recv_alter_index(); + ThriftHiveMetastore_create_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_create_database_result result; + try { + iface_->create_database(args.database); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_database", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("create_database", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_database_result result; + try { + iface_->get_database(result.success, args.name); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_database", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_database", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_drop_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_database_result result; + try { + iface_->drop_database(args.name, args.deleteData); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidOperationException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_database", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("drop_database", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_databases_result result; + try { + iface_->get_databases(result.success, args.pattern); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_databases", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_databases", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_all_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_all_databases_result result; + try { + iface_->get_all_databases(result.success); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx) +void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_index", apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_get_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_index_pargs args; - args.dbname = &dbname; - args.base_tbl_name = &base_tbl_name; - args.idx_name = &idx_name; - args.new_idx = &new_idx; - args.write(oprot_); + ThriftHiveMetastore_get_type_result result; + try { + iface_->get_type(result.success, args.name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_type", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("get_type", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_index() +void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; + ThriftHiveMetastore_create_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("alter_index") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + ThriftHiveMetastore_create_type_result result; + try { + result.success = iface_->create_type(args.type); + result.__isset.success = true; + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_type", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; } - ThriftHiveMetastore_alter_index_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - return; + oprot->writeMessageBegin("create_type", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - send_drop_index_by_name(db_name, tbl_name, index_name, deleteData); - return recv_drop_index_by_name(); + ThriftHiveMetastore_drop_type_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_type_result result; + try { + result.success = iface_->drop_type(args.type); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_type", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("drop_type", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData) +void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_index_by_name", apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_get_type_all_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_index_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.deleteData = &deleteData; - args.write(oprot_); + ThriftHiveMetastore_get_type_all_result result; + try { + iface_->get_type_all(result.success, args.name); + result.__isset.success = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_type_all", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("get_type_all", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_index_by_name() +void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; + ThriftHiveMetastore_get_fields_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("drop_index_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + ThriftHiveMetastore_get_fields_result result; + try { + iface_->get_fields(result.success, args.db_name, args.table_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_fields", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; } - bool _return; - ThriftHiveMetastore_drop_index_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - return _return; - } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name failed: unknown result"); + oprot->writeMessageBegin("get_fields", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - send_get_index_by_name(db_name, tbl_name, index_name); - recv_get_index_by_name(_return); + ThriftHiveMetastore_get_schema_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_schema_result result; + try { + iface_->get_schema(result.success, args.db_name, args.table_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (UnknownTableException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (UnknownDBException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_schema", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("get_schema", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_index_by_name", apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_create_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_index_by_name_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.index_name = &index_name; - args.write(oprot_); + ThriftHiveMetastore_create_table_result result; + try { + iface_->create_table(args.tbl); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (NoSuchObjectException &o4) { + result.o4 = o4; + result.__isset.o4 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_table", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("create_table", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) +void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("get_index_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_index_by_name_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ThriftHiveMetastore_drop_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + ThriftHiveMetastore_drop_table_result result; + try { + iface_->drop_table(args.dbname, args.name, args.deleteData); + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_table", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); return; } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name failed: unknown result"); -} -void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - send_get_indexes(db_name, tbl_name, max_indexes); - recv_get_indexes(_return); + oprot->writeMessageBegin("drop_table", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_indexes", apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_get_tables_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_indexes_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; - args.write(oprot_); + ThriftHiveMetastore_get_tables_result result; + try { + iface_->get_tables(result.success, args.db_name, args.pattern); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_tables", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("get_tables", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) +void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; + ThriftHiveMetastore_get_all_tables_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("get_indexes") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + ThriftHiveMetastore_get_all_tables_result result; + try { + iface_->get_all_tables(result.success, args.db_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; } - ThriftHiveMetastore_get_indexes_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + oprot->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_table_result result; + try { + iface_->get_table(result.success, args.dbname, args.tbl_name); + result.__isset.success = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); return; } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes failed: unknown result"); -} -void ThriftHiveMetastoreClient::get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) -{ - send_get_index_names(db_name, tbl_name, max_indexes); - recv_get_index_names(_return); + oprot->writeMessageBegin("get_table", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) +void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_index_names", apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_alter_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_index_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_indexes = &max_indexes; - args.write(oprot_); + ThriftHiveMetastore_alter_table_result result; + try { + iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_table", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("alter_table", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) +void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("get_index_names") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_index_names_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ThriftHiveMetastore_add_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + ThriftHiveMetastore_add_partition_result result; + try { + iface_->add_partition(result.success, args.new_part); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); return; } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); + + oprot->writeMessageBegin("add_partition", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr piprot, boost::shared_ptr poprot) { +void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_append_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - apache::thrift::protocol::TProtocol* iprot = piprot.get(); - apache::thrift::protocol::TProtocol* oprot = poprot.get(); - std::string fname; - apache::thrift::protocol::TMessageType mtype; - int32_t seqid; + ThriftHiveMetastore_append_partition_result result; + try { + iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("append_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } - iprot->readMessageBegin(fname, mtype, seqid); + oprot->writeMessageBegin("append_partition", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} - if (mtype != apache::thrift::protocol::T_CALL && mtype != apache::thrift::protocol::T_ONEWAY) { - iprot->skip(apache::thrift::protocol::T_STRUCT); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - apache::thrift::TApplicationException x(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid); +void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_append_partition_by_name_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_append_partition_by_name_result result; + try { + iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (AlreadyExistsException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("append_partition_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); - return true; + return; } - return process_fn(iprot, oprot, fname, seqid); + oprot->writeMessageBegin("append_partition_by_name", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreProcessor::process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) { - std::map::iterator pfn; - pfn = processMap_.find(fname); - if (pfn == processMap_.end()) { - return facebook::fb303::FacebookServiceProcessor::process_fn(iprot, oprot, fname, seqid); +void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_drop_partition_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_drop_partition_result result; + try { + result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; } - (this->*(pfn->second))(seqid, iprot, oprot); - return true; + + oprot->writeMessageBegin("drop_partition", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_create_database_args args; + ThriftHiveMetastore_drop_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_database_result result; + ThriftHiveMetastore_drop_partition_by_name_result result; try { - iface_->create_database(args.database); - } catch (AlreadyExistsException &o1) { + result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_database", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_partition_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11601,33 +19274,33 @@ return; } - oprot->writeMessageBegin("create_database", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition_by_name", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_database_args args; + ThriftHiveMetastore_get_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_database_result result; + ThriftHiveMetastore_get_partition_result result; try { - iface_->get_database(result.success, args.name); + iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_database", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11635,35 +19308,33 @@ return; } - oprot->writeMessageBegin("get_database", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_with_auth(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_database_args args; + ThriftHiveMetastore_get_partition_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_database_result result; + ThriftHiveMetastore_get_partition_with_auth_result result; try { - iface_->drop_database(args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { + iface_->get_partition_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidOperationException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_database", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_with_auth", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11671,30 +19342,33 @@ return; } - oprot->writeMessageBegin("drop_database", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_with_auth", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_databases_args args; + ThriftHiveMetastore_get_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_databases_result result; + ThriftHiveMetastore_get_partition_by_name_result result; try { - iface_->get_databases(result.success, args.pattern); + iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (NoSuchObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_databases", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11702,30 +19376,33 @@ return; } - oprot->writeMessageBegin("get_databases", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_by_name", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_all_databases_args args; + ThriftHiveMetastore_get_partitions_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_all_databases_result result; + ThriftHiveMetastore_get_partitions_result result; try { - iface_->get_all_databases(result.success); + iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11733,33 +19410,33 @@ return; } - oprot->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions_with_auth(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_type_args args; + ThriftHiveMetastore_get_partitions_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_type_result result; + ThriftHiveMetastore_get_partitions_with_auth_result result; try { - iface_->get_type(result.success, args.name); + iface_->get_partitions_with_auth(result.success, args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_with_auth", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11767,36 +19444,30 @@ return; } - oprot->writeMessageBegin("get_type", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_with_auth", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_create_type_args args; + ThriftHiveMetastore_get_partition_names_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_type_result result; + ThriftHiveMetastore_get_partition_names_result result; try { - result.success = iface_->create_type(args.type); + iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); result.__isset.success = true; - } catch (AlreadyExistsException &o1) { - result.o1 = o1; - result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_type", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_names", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11804,33 +19475,30 @@ return; } - oprot->writeMessageBegin("create_type", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_names", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_type_args args; + ThriftHiveMetastore_get_partitions_ps_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_type_result result; + ThriftHiveMetastore_get_partitions_ps_result result; try { - result.success = iface_->drop_type(args.type); + iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_type", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_ps", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11838,30 +19506,33 @@ return; } - oprot->writeMessageBegin("drop_type", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_ps", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions_ps_with_auth(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_type_all_args args; + ThriftHiveMetastore_get_partitions_ps_with_auth_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_type_all_result result; + ThriftHiveMetastore_get_partitions_ps_with_auth_result result; try { - iface_->get_type_all(result.success, args.name); + iface_->get_partitions_ps_with_auth(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type_all", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_ps_with_auth", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11869,36 +19540,30 @@ return; } - oprot->writeMessageBegin("get_type_all", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_ps_with_auth", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_fields_args args; + ThriftHiveMetastore_get_partition_names_ps_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_fields_result result; + ThriftHiveMetastore_get_partition_names_ps_result result; try { - iface_->get_fields(result.success, args.db_name, args.table_name); + iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (UnknownTableException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_fields", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_names_ps", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11906,36 +19571,33 @@ return; } - oprot->writeMessageBegin("get_fields", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_names_ps", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_schema_args args; + ThriftHiveMetastore_get_partitions_by_filter_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_schema_result result; + ThriftHiveMetastore_get_partitions_by_filter_result result; try { - iface_->get_schema(result.success, args.db_name, args.table_name); + iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (UnknownTableException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (UnknownDBException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_schema", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_by_filter", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11943,38 +19605,32 @@ return; } - oprot->writeMessageBegin("get_schema", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_by_filter", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_create_table_args args; + ThriftHiveMetastore_alter_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_table_result result; + ThriftHiveMetastore_alter_partition_result result; try { - iface_->create_table(args.tbl); - } catch (AlreadyExistsException &o1) { + iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_table", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_partition", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11982,32 +19638,30 @@ return; } - oprot->writeMessageBegin("create_table", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_partition", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_table_args args; + ThriftHiveMetastore_get_config_value_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_table_result result; + ThriftHiveMetastore_get_config_value_result result; try { - iface_->drop_table(args.dbname, args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { + iface_->get_config_value(result.success, args.name, args.defaultValue); + result.__isset.success = true; + } catch (ConfigValSecurityException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_table", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_config_value", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12015,30 +19669,30 @@ return; } - oprot->writeMessageBegin("drop_table", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_config_value", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_tables_args args; + ThriftHiveMetastore_partition_name_to_vals_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_tables_result result; + ThriftHiveMetastore_partition_name_to_vals_result result; try { - iface_->get_tables(result.success, args.db_name, args.pattern); + iface_->partition_name_to_vals(result.success, args.part_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_tables", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("partition_name_to_vals", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12046,30 +19700,30 @@ return; } - oprot->writeMessageBegin("get_tables", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("partition_name_to_vals", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_all_tables_args args; + ThriftHiveMetastore_partition_name_to_spec_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_all_tables_result result; + ThriftHiveMetastore_partition_name_to_spec_result result; try { - iface_->get_all_tables(result.success, args.db_name); + iface_->partition_name_to_spec(result.success, args.part_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("partition_name_to_spec", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12077,33 +19731,36 @@ return; } - oprot->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("partition_name_to_spec", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_table_args args; + ThriftHiveMetastore_add_index_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_table_result result; + ThriftHiveMetastore_add_index_result result; try { - iface_->get_table(result.success, args.dbname, args.tbl_name); + iface_->add_index(result.success, args.new_index, args.index_table); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_index", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12111,23 +19768,23 @@ return; } - oprot->writeMessageBegin("get_table", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_index", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_alter_table_args args; + ThriftHiveMetastore_alter_index_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_table_result result; + ThriftHiveMetastore_alter_index_result result; try { - iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); + iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; @@ -12136,7 +19793,7 @@ result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_table", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("alter_index", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12144,36 +19801,33 @@ return; } - oprot->writeMessageBegin("alter_table", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_index", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_add_partition_args args; + ThriftHiveMetastore_drop_index_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_add_partition_result result; + ThriftHiveMetastore_drop_index_by_name_result result; try { - iface_->add_partition(result.success, args.new_part); + result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_index_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12181,36 +19835,33 @@ return; } - oprot->writeMessageBegin("add_partition", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_index_by_name", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_append_partition_args args; + ThriftHiveMetastore_get_index_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_append_partition_result result; + ThriftHiveMetastore_get_index_by_name_result result; try { - iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_index_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12218,36 +19869,33 @@ return; } - oprot->writeMessageBegin("append_partition", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_index_by_name", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_append_partition_by_name_args args; + ThriftHiveMetastore_get_indexes_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_append_partition_by_name_result result; + ThriftHiveMetastore_get_indexes_result result; try { - iface_->append_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { + } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_indexes", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12255,33 +19903,30 @@ return; } - oprot->writeMessageBegin("append_partition_by_name", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_indexes", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_partition_args args; + ThriftHiveMetastore_get_index_names_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_partition_result result; + ThriftHiveMetastore_get_index_names_result result; try { - result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); + iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { - result.o1 = o1; - result.__isset.o1 = true; } catch (MetaException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_index_names", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12289,33 +19934,30 @@ return; } - oprot->writeMessageBegin("drop_partition", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_index_names", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_user_privilege_set(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_partition_by_name_args args; + ThriftHiveMetastore_get_user_privilege_set_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_partition_by_name_result result; + ThriftHiveMetastore_get_user_privilege_set_result result; try { - result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); + iface_->get_user_privilege_set(result.success, args.user_name, args.group_names); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_user_privilege_set", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12323,33 +19965,30 @@ return; } - oprot->writeMessageBegin("drop_partition_by_name", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_user_privilege_set", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_db_privilege_set(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partition_args args; + ThriftHiveMetastore_get_db_privilege_set_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_result result; + ThriftHiveMetastore_get_db_privilege_set_result result; try { - iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); + iface_->get_db_privilege_set(result.success, args.db_name, args.user_name, args.group_names); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_db_privilege_set", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12357,33 +19996,30 @@ return; } - oprot->writeMessageBegin("get_partition", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_db_privilege_set", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_table_privilege_set(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partition_by_name_args args; + ThriftHiveMetastore_get_table_privilege_set_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_by_name_result result; + ThriftHiveMetastore_get_table_privilege_set_result result; try { - iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); + iface_->get_table_privilege_set(result.success, args.db_name, args.table_name, args.user_name, args.group_names); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_table_privilege_set", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12391,33 +20027,30 @@ return; } - oprot->writeMessageBegin("get_partition_by_name", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table_privilege_set", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_privilege_set(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partitions_args args; + ThriftHiveMetastore_get_partition_privilege_set_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partitions_result result; + ThriftHiveMetastore_get_partition_privilege_set_result result; try { - iface_->get_partitions(result.success, args.db_name, args.tbl_name, args.max_parts); + iface_->get_partition_privilege_set(result.success, args.db_name, args.table_name, args.part_name, args.user_name, args.group_names); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partition_privilege_set", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12425,30 +20058,30 @@ return; } - oprot->writeMessageBegin("get_partitions", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_privilege_set", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_column_privilege_set(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partition_names_args args; + ThriftHiveMetastore_get_column_privilege_set_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_names_result result; + ThriftHiveMetastore_get_column_privilege_set_result result; try { - iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); + iface_->get_column_privilege_set(result.success, args.db_name, args.table_name, args.part_name, args.column_name, args.user_name, args.group_names); result.__isset.success = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_column_privilege_set", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12456,30 +20089,30 @@ return; } - oprot->writeMessageBegin("get_partition_names", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_column_privilege_set", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_create_role(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partitions_ps_args args; + ThriftHiveMetastore_create_role_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partitions_ps_result result; + ThriftHiveMetastore_create_role_result result; try { - iface_->get_partitions_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); + result.success = iface_->create_role(args.role_name, args.owner_name, args.db_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_ps", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("create_role", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12487,30 +20120,30 @@ return; } - oprot->writeMessageBegin("get_partitions_ps", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_role", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_role(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partition_names_ps_args args; + ThriftHiveMetastore_drop_role_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partition_names_ps_result result; + ThriftHiveMetastore_drop_role_result result; try { - iface_->get_partition_names_ps(result.success, args.db_name, args.tbl_name, args.part_vals, args.max_parts); + result.success = iface_->drop_role(args.role_name, args.db_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names_ps", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_role", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12518,33 +20151,30 @@ return; } - oprot->writeMessageBegin("get_partition_names_ps", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_role", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_add_role_member(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_partitions_by_filter_args args; + ThriftHiveMetastore_add_role_member_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_partitions_by_filter_result result; + ThriftHiveMetastore_add_role_member_result result; try { - iface_->get_partitions_by_filter(result.success, args.db_name, args.tbl_name, args.filter, args.max_parts); + result.success = iface_->add_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_by_filter", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("add_role_member", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12552,32 +20182,30 @@ return; } - oprot->writeMessageBegin("get_partitions_by_filter", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_role_member", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_remove_role_member(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_alter_partition_args args; + ThriftHiveMetastore_remove_role_member_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_partition_result result; + ThriftHiveMetastore_remove_role_member_result result; try { - iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); - } catch (InvalidOperationException &o1) { + result.success = iface_->remove_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("remove_role_member", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12585,30 +20213,30 @@ return; } - oprot->writeMessageBegin("alter_partition", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("remove_role_member", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_roles(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_config_value_args args; + ThriftHiveMetastore_list_roles_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_config_value_result result; + ThriftHiveMetastore_list_roles_result result; try { - iface_->get_config_value(result.success, args.name, args.defaultValue); + iface_->list_roles(result.success, args.principal_name, args.is_role, args.is_group, args.db_name); result.__isset.success = true; - } catch (ConfigValSecurityException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_config_value", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_roles", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12616,30 +20244,30 @@ return; } - oprot->writeMessageBegin("get_config_value", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_roles", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_security_user_grant(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_partition_name_to_vals_args args; + ThriftHiveMetastore_list_security_user_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_partition_name_to_vals_result result; + ThriftHiveMetastore_list_security_user_grant_result result; try { - iface_->partition_name_to_vals(result.success, args.part_name); + iface_->list_security_user_grant(result.success, args.principla_name, args.is_role, args.is_group); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_vals", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_security_user_grant", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12647,30 +20275,30 @@ return; } - oprot->writeMessageBegin("partition_name_to_vals", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_security_user_grant", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_security_db_grant(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_partition_name_to_spec_args args; + ThriftHiveMetastore_list_security_db_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_partition_name_to_spec_result result; + ThriftHiveMetastore_list_security_db_grant_result result; try { - iface_->partition_name_to_spec(result.success, args.part_name); + iface_->list_security_db_grant(result.success, args.principal_name, args.is_group, args.is_role, args.db_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_spec", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_security_db_grant", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12678,36 +20306,30 @@ return; } - oprot->writeMessageBegin("partition_name_to_spec", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_security_db_grant", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_security_table_grant(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_add_index_args args; + ThriftHiveMetastore_list_security_table_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_add_index_result result; + ThriftHiveMetastore_list_security_table_grant_result result; try { - iface_->add_index(result.success, args.new_index, args.index_table); + iface_->list_security_table_grant(result.success, args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name); result.__isset.success = true; - } catch (InvalidObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (AlreadyExistsException &o2) { - result.o2 = o2; - result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_index", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_security_table_grant", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12715,32 +20337,30 @@ return; } - oprot->writeMessageBegin("add_index", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_security_table_grant", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_alter_index(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_security_partition_grant(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_alter_index_args args; + ThriftHiveMetastore_list_security_partition_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_index_result result; + ThriftHiveMetastore_list_security_partition_grant_result result; try { - iface_->alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); - } catch (InvalidOperationException &o1) { + iface_->list_security_partition_grant(result.success, args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name); + result.__isset.success = true; + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_index", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_security_partition_grant", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12748,33 +20368,30 @@ return; } - oprot->writeMessageBegin("alter_index", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_security_partition_grant", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_list_security_column_grant(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_index_by_name_args args; + ThriftHiveMetastore_list_security_column_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_index_by_name_result result; + ThriftHiveMetastore_list_security_column_grant_result result; try { - result.success = iface_->drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); + iface_->list_security_column_grant(result.success, args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name, args.column_name); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_index_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("list_security_column_grant", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12782,33 +20399,30 @@ return; } - oprot->writeMessageBegin("drop_index_by_name", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("list_security_column_grant", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_grant_privileges(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_index_by_name_args args; + ThriftHiveMetastore_grant_privileges_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_index_by_name_result result; + ThriftHiveMetastore_grant_privileges_result result; try { - iface_->get_index_by_name(result.success, args.db_name, args.tbl_name, args.index_name); + result.success = iface_->grant_privileges(args.user_name, args.is_role, args.is_group, args.privileges, args.grantor); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("grant_privileges", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12816,33 +20430,30 @@ return; } - oprot->writeMessageBegin("get_index_by_name", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("grant_privileges", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_revoke_privileges(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_indexes_args args; + ThriftHiveMetastore_revoke_privileges_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_indexes_result result; + ThriftHiveMetastore_revoke_privileges_result result; try { - iface_->get_indexes(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.success = iface_->revoke_privileges(args.user_name, args.is_role, args.is_group, args.privileges); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_indexes", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("revoke_privileges", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12850,30 +20461,30 @@ return; } - oprot->writeMessageBegin("get_indexes", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("revoke_privileges", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_revoke_all_privileges(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_index_names_args args; + ThriftHiveMetastore_revoke_all_privileges_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_index_names_result result; + ThriftHiveMetastore_revoke_all_privileges_result result; try { - iface_->get_index_names(result.success, args.db_name, args.tbl_name, args.max_indexes); + result.success = iface_->revoke_all_privileges(args.user_name, args.is_role, args.is_group, args.remove_user_priv, args.dbs, args.tables, args.parts, args.columns); result.__isset.success = true; - } catch (MetaException &o2) { - result.o2 = o2; - result.__isset.o2 = true; + } catch (MetaException &o1) { + result.o1 = o1; + result.__isset.o1 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_names", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("revoke_all_privileges", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12881,7 +20492,7 @@ return; } - oprot->writeMessageBegin("get_index_names", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("revoke_all_privileges", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); Index: metastore/src/gen-cpp/ThriftHiveMetastore.h =================================================================== --- metastore/src/gen-cpp/ThriftHiveMetastore.h (revision 1037574) +++ metastore/src/gen-cpp/ThriftHiveMetastore.h (working copy) @@ -38,10 +38,13 @@ virtual bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData) = 0; virtual bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData) = 0; virtual void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) = 0; + virtual void get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) = 0; virtual void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) = 0; virtual void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; + virtual void get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) = 0; virtual void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) = 0; virtual void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) = 0; + virtual void get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) = 0; virtual void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) = 0; virtual void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) = 0; virtual void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) = 0; @@ -54,6 +57,24 @@ virtual void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name) = 0; virtual void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; virtual void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes) = 0; + virtual void get_user_privilege_set(PrincipalPrivilegeSet& _return, const std::string& user_name, const std::vector & group_names) = 0; + virtual void get_db_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& user_name, const std::vector & group_names) = 0; + virtual void get_table_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names) = 0; + virtual void get_partition_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names) = 0; + virtual void get_column_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names) = 0; + virtual bool create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name) = 0; + virtual bool drop_role(const std::string& role_name, const std::string& db_name) = 0; + virtual bool add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) = 0; + virtual bool remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) = 0; + virtual void list_roles(std::vector & _return, const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name) = 0; + virtual void list_security_user_grant(std::vector & _return, const std::string& principla_name, const bool is_role, const bool is_group) = 0; + virtual void list_security_db_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name) = 0; + virtual void list_security_table_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name) = 0; + virtual void list_security_partition_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name) = 0; + virtual void list_security_column_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name) = 0; + virtual bool grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor) = 0; + virtual bool revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges) = 0; + virtual bool revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns) = 0; }; class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual public facebook::fb303::FacebookServiceNull { @@ -132,18 +153,27 @@ void get_partition(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */) { return; } + void get_partition_with_auth(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } void get_partition_by_name(Partition& /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::string& /* part_name */) { return; } void get_partitions(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_parts */) { return; } + void get_partitions_with_auth(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_parts */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } void get_partition_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_parts */) { return; } void get_partitions_ps(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const int16_t /* max_parts */) { return; } + void get_partitions_ps_with_auth(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const int16_t /* max_parts */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } void get_partition_names_ps(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const std::vector & /* part_vals */, const int16_t /* max_parts */) { return; } @@ -181,6 +211,67 @@ void get_index_names(std::vector & /* _return */, const std::string& /* db_name */, const std::string& /* tbl_name */, const int16_t /* max_indexes */) { return; } + void get_user_privilege_set(PrincipalPrivilegeSet& /* _return */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + void get_db_privilege_set(PrincipalPrivilegeSet& /* _return */, const std::string& /* db_name */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + void get_table_privilege_set(PrincipalPrivilegeSet& /* _return */, const std::string& /* db_name */, const std::string& /* table_name */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + void get_partition_privilege_set(PrincipalPrivilegeSet& /* _return */, const std::string& /* db_name */, const std::string& /* table_name */, const std::string& /* part_name */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + void get_column_privilege_set(PrincipalPrivilegeSet& /* _return */, const std::string& /* db_name */, const std::string& /* table_name */, const std::string& /* part_name */, const std::string& /* column_name */, const std::string& /* user_name */, const std::vector & /* group_names */) { + return; + } + bool create_role(const std::string& /* role_name */, const std::string& /* owner_name */, const std::string& /* db_name */) { + bool _return = false; + return _return; + } + bool drop_role(const std::string& /* role_name */, const std::string& /* db_name */) { + bool _return = false; + return _return; + } + bool add_role_member(const std::string& /* role_name */, const std::string& /* user_name */, const bool /* is_role */, const bool /* is_group */, const std::string& /* db_name */) { + bool _return = false; + return _return; + } + bool remove_role_member(const std::string& /* role_name */, const std::string& /* user_name */, const bool /* is_role */, const bool /* is_group */, const std::string& /* db_name */) { + bool _return = false; + return _return; + } + void list_roles(std::vector & /* _return */, const std::string& /* principal_name */, const bool /* is_role */, const bool /* is_group */, const std::string& /* db_name */) { + return; + } + void list_security_user_grant(std::vector & /* _return */, const std::string& /* principla_name */, const bool /* is_role */, const bool /* is_group */) { + return; + } + void list_security_db_grant(std::vector & /* _return */, const std::string& /* principal_name */, const bool /* is_group */, const bool /* is_role */, const std::string& /* db_name */) { + return; + } + void list_security_table_grant(std::vector & /* _return */, const std::string& /* principal_name */, const bool /* is_group */, const bool /* is_role */, const std::string& /* db_name */, const std::string& /* table_name */) { + return; + } + void list_security_partition_grant(std::vector & /* _return */, const std::string& /* principal_name */, const bool /* is_group */, const bool /* is_role */, const std::string& /* db_name */, const std::string& /* table_name */, const std::string& /* part_name */) { + return; + } + void list_security_column_grant(std::vector & /* _return */, const std::string& /* principal_name */, const bool /* is_group */, const bool /* is_role */, const std::string& /* db_name */, const std::string& /* table_name */, const std::string& /* part_name */, const std::string& /* column_name */) { + return; + } + bool grant_privileges(const std::string& /* user_name */, const bool /* is_role */, const bool /* is_group */, const PrivilegeBag& /* privileges */, const std::string& /* grantor */) { + bool _return = false; + return _return; + } + bool revoke_privileges(const std::string& /* user_name */, const bool /* is_role */, const bool /* is_group */, const PrivilegeBag& /* privileges */) { + bool _return = false; + return _return; + } + bool revoke_all_privileges(const std::string& /* user_name */, const bool /* is_role */, const bool /* is_group */, const bool /* remove_user_priv */, const std::vector & /* dbs */, const std::vector
& /* tables */, const std::vector & /* parts */, const std::map > & /* columns */) { + bool _return = false; + return _return; + } }; class ThriftHiveMetastore_create_database_args { @@ -2694,6 +2785,131 @@ }; +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; + + struct __isset { + __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; + } __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; + +}; + +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; + + struct __isset { + __isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; + } __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; + +}; + +class ThriftHiveMetastore_get_partition_with_auth_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partition_with_auth_presult() throw() {} + + Partition* success; + MetaException o1; + NoSuchObjectException o2; + + struct __isset { + __isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + class ThriftHiveMetastore_get_partition_by_name_args { public: @@ -2924,6 +3140,131 @@ }; +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; + + struct __isset { + __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; + } __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; + +}; + +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; + + struct __isset { + __isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; + } __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; + +}; + +class ThriftHiveMetastore_get_partitions_with_auth_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partitions_with_auth_presult() throw() {} + + std::vector * success; + NoSuchObjectException o1; + MetaException o2; + + struct __isset { + __isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + class ThriftHiveMetastore_get_partition_names_args { public: @@ -3147,28 +3488,32 @@ }; -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; struct __isset { - __isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false) {} + __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; + bool user_name; + bool group_names; } __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; @@ -3178,6 +3523,132 @@ 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_ps_with_auth_args &rhs) const { + return !(*this == rhs); + } + + 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; + +}; + +class ThriftHiveMetastore_get_partitions_ps_with_auth_pargs { + public: + + + 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; + +}; + +class ThriftHiveMetastore_get_partitions_ps_with_auth_result { + public: + + ThriftHiveMetastore_get_partitions_ps_with_auth_result() { + } + + virtual ~ThriftHiveMetastore_get_partitions_ps_with_auth_result() throw() {} + + std::vector success; + NoSuchObjectException o1; + MetaException o2; + + struct __isset { + __isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; + } __isset; + + bool operator == (const ThriftHiveMetastore_get_partitions_ps_with_auth_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + if (!(o2 == rhs.o2)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partitions_ps_with_auth_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partitions_ps_with_auth_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +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; + + struct __isset { + __isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +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; + + struct __isset { + __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; + } __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 { @@ -4481,137 +4952,2297 @@ }; -class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceClient { +class ThriftHiveMetastore_get_user_privilege_set_args { public: - ThriftHiveMetastoreClient(boost::shared_ptr prot) : - facebook::fb303::FacebookServiceClient(prot, prot) {} - ThriftHiveMetastoreClient(boost::shared_ptr iprot, boost::shared_ptr oprot) : - facebook::fb303::FacebookServiceClient(iprot, oprot) {} - boost::shared_ptr getInputProtocol() { - return piprot_; + + ThriftHiveMetastore_get_user_privilege_set_args() : user_name("") { } - boost::shared_ptr getOutputProtocol() { - return poprot_; + + virtual ~ThriftHiveMetastore_get_user_privilege_set_args() throw() {} + + std::string user_name; + std::vector group_names; + + struct __isset { + __isset() : user_name(false), group_names(false) {} + bool user_name; + bool group_names; + } __isset; + + bool operator == (const ThriftHiveMetastore_get_user_privilege_set_args & rhs) const + { + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; } - void create_database(const Database& database); - void send_create_database(const Database& database); - void recv_create_database(); - void get_database(Database& _return, const std::string& name); - void send_get_database(const std::string& name); - void recv_get_database(Database& _return); - void drop_database(const std::string& name, const bool deleteData); - void send_drop_database(const std::string& name, const bool deleteData); - void recv_drop_database(); - void get_databases(std::vector & _return, const std::string& pattern); - void send_get_databases(const std::string& pattern); - void recv_get_databases(std::vector & _return); - void get_all_databases(std::vector & _return); - void send_get_all_databases(); - void recv_get_all_databases(std::vector & _return); - void get_type(Type& _return, const std::string& name); - void send_get_type(const std::string& name); - void recv_get_type(Type& _return); - bool create_type(const Type& type); - void send_create_type(const Type& type); - bool recv_create_type(); - bool drop_type(const std::string& type); - void send_drop_type(const std::string& type); - bool recv_drop_type(); - void get_type_all(std::map & _return, const std::string& name); - void send_get_type_all(const std::string& name); - void recv_get_type_all(std::map & _return); - void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name); - void send_get_fields(const std::string& db_name, const std::string& table_name); - void recv_get_fields(std::vector & _return); - void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name); - void send_get_schema(const std::string& db_name, const std::string& table_name); - void recv_get_schema(std::vector & _return); - void create_table(const Table& tbl); - void send_create_table(const Table& tbl); - void recv_create_table(); - void drop_table(const std::string& dbname, const std::string& name, const bool deleteData); - void send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData); - void recv_drop_table(); - void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern); - void send_get_tables(const std::string& db_name, const std::string& pattern); - void recv_get_tables(std::vector & _return); - void get_all_tables(std::vector & _return, const std::string& db_name); - void send_get_all_tables(const std::string& db_name); - void recv_get_all_tables(std::vector & _return); - void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name); - void send_get_table(const std::string& dbname, const std::string& tbl_name); - void recv_get_table(Table& _return); - void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); - void send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); - void recv_alter_table(); - void add_partition(Partition& _return, const Partition& new_part); - void send_add_partition(const Partition& new_part); - void recv_add_partition(Partition& _return); - void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void recv_append_partition(Partition& _return); - void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void recv_append_partition_by_name(Partition& _return); - bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); - void send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); - bool recv_drop_partition(); - bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); - void send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); - bool recv_drop_partition_by_name(); - void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); - void recv_get_partition(Partition& _return); - void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); - void recv_get_partition_by_name(Partition& _return); - void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void recv_get_partitions(std::vector & _return); - void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); - void recv_get_partition_names(std::vector & _return); - void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void recv_get_partitions_ps(std::vector & _return); - void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); - void recv_get_partition_names_ps(std::vector & _return); - void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); - void send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); - void recv_get_partitions_by_filter(std::vector & _return); - void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); - void send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); - void recv_alter_partition(); - void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue); - void send_get_config_value(const std::string& name, const std::string& defaultValue); - void recv_get_config_value(std::string& _return); - void partition_name_to_vals(std::vector & _return, const std::string& part_name); - void send_partition_name_to_vals(const std::string& part_name); - void recv_partition_name_to_vals(std::vector & _return); - void partition_name_to_spec(std::map & _return, const std::string& part_name); - void send_partition_name_to_spec(const std::string& part_name); - void recv_partition_name_to_spec(std::map & _return); - void add_index(Index& _return, const Index& new_index, const Table& index_table); - void send_add_index(const Index& new_index, const Table& index_table); - void recv_add_index(Index& _return); - void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); - void send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); - void recv_alter_index(); - bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); - void send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); - bool recv_drop_index_by_name(); - void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name); - void send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name); - void recv_get_index_by_name(Index& _return); - void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void recv_get_indexes(std::vector & _return); - void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); - void recv_get_index_names(std::vector & _return); + bool operator != (const ThriftHiveMetastore_get_user_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_user_privilege_set_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + }; +class ThriftHiveMetastore_get_user_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_user_privilege_set_pargs() throw() {} + + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_user_privilege_set_result { + public: + + ThriftHiveMetastore_get_user_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_user_privilege_set_result() throw() {} + + PrincipalPrivilegeSet success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_get_user_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_user_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_user_privilege_set_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_user_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_user_privilege_set_presult() throw() {} + + PrincipalPrivilegeSet* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_get_db_privilege_set_args { + public: + + ThriftHiveMetastore_get_db_privilege_set_args() : db_name(""), user_name("") { + } + + virtual ~ThriftHiveMetastore_get_db_privilege_set_args() throw() {} + + std::string db_name; + std::string user_name; + std::vector group_names; + + struct __isset { + __isset() : db_name(false), user_name(false), group_names(false) {} + bool db_name; + bool user_name; + bool group_names; + } __isset; + + bool operator == (const ThriftHiveMetastore_get_db_privilege_set_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_db_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_db_privilege_set_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_db_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_db_privilege_set_pargs() throw() {} + + const std::string* db_name; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_db_privilege_set_result { + public: + + ThriftHiveMetastore_get_db_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_db_privilege_set_result() throw() {} + + PrincipalPrivilegeSet success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_get_db_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_db_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_db_privilege_set_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_db_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_db_privilege_set_presult() throw() {} + + PrincipalPrivilegeSet* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_get_table_privilege_set_args { + public: + + ThriftHiveMetastore_get_table_privilege_set_args() : db_name(""), table_name(""), user_name("") { + } + + virtual ~ThriftHiveMetastore_get_table_privilege_set_args() throw() {} + + std::string db_name; + std::string table_name; + std::string user_name; + std::vector group_names; + + struct __isset { + __isset() : db_name(false), table_name(false), user_name(false), group_names(false) {} + bool db_name; + bool table_name; + bool user_name; + bool group_names; + } __isset; + + bool operator == (const ThriftHiveMetastore_get_table_privilege_set_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_privilege_set_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_table_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_table_privilege_set_pargs() throw() {} + + const std::string* db_name; + const std::string* table_name; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_table_privilege_set_result { + public: + + ThriftHiveMetastore_get_table_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_table_privilege_set_result() throw() {} + + PrincipalPrivilegeSet success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_get_table_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_table_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_table_privilege_set_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_table_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_table_privilege_set_presult() throw() {} + + PrincipalPrivilegeSet* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_get_partition_privilege_set_args { + public: + + ThriftHiveMetastore_get_partition_privilege_set_args() : db_name(""), table_name(""), part_name(""), user_name("") { + } + + virtual ~ThriftHiveMetastore_get_partition_privilege_set_args() throw() {} + + std::string db_name; + std::string table_name; + std::string part_name; + std::string user_name; + std::vector group_names; + + struct __isset { + __isset() : db_name(false), table_name(false), part_name(false), user_name(false), group_names(false) {} + bool db_name; + bool table_name; + bool part_name; + bool user_name; + bool group_names; + } __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_privilege_set_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_privilege_set_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_partition_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_partition_privilege_set_pargs() throw() {} + + const std::string* db_name; + const std::string* table_name; + const std::string* part_name; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_partition_privilege_set_result { + public: + + ThriftHiveMetastore_get_partition_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_partition_privilege_set_result() throw() {} + + PrincipalPrivilegeSet success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_get_partition_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_partition_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_partition_privilege_set_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_partition_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_partition_privilege_set_presult() throw() {} + + PrincipalPrivilegeSet* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_get_column_privilege_set_args { + public: + + ThriftHiveMetastore_get_column_privilege_set_args() : db_name(""), table_name(""), part_name(""), column_name(""), user_name("") { + } + + virtual ~ThriftHiveMetastore_get_column_privilege_set_args() throw() {} + + std::string db_name; + std::string table_name; + std::string part_name; + std::string column_name; + std::string user_name; + std::vector group_names; + + struct __isset { + __isset() : db_name(false), table_name(false), part_name(false), column_name(false), user_name(false), group_names(false) {} + bool db_name; + bool table_name; + bool part_name; + bool column_name; + bool user_name; + bool group_names; + } __isset; + + bool operator == (const ThriftHiveMetastore_get_column_privilege_set_args & rhs) const + { + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(column_name == rhs.column_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(group_names == rhs.group_names)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_column_privilege_set_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_column_privilege_set_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_column_privilege_set_pargs { + public: + + + virtual ~ThriftHiveMetastore_get_column_privilege_set_pargs() throw() {} + + const std::string* db_name; + const std::string* table_name; + const std::string* part_name; + const std::string* column_name; + const std::string* user_name; + const std::vector * group_names; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_column_privilege_set_result { + public: + + ThriftHiveMetastore_get_column_privilege_set_result() { + } + + virtual ~ThriftHiveMetastore_get_column_privilege_set_result() throw() {} + + PrincipalPrivilegeSet success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_get_column_privilege_set_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_get_column_privilege_set_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_get_column_privilege_set_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_get_column_privilege_set_presult { + public: + + + virtual ~ThriftHiveMetastore_get_column_privilege_set_presult() throw() {} + + PrincipalPrivilegeSet* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_create_role_args { + public: + + ThriftHiveMetastore_create_role_args() : role_name(""), owner_name(""), db_name("") { + } + + virtual ~ThriftHiveMetastore_create_role_args() throw() {} + + std::string role_name; + std::string owner_name; + std::string db_name; + + struct __isset { + __isset() : role_name(false), owner_name(false), db_name(false) {} + bool role_name; + bool owner_name; + bool db_name; + } __isset; + + bool operator == (const ThriftHiveMetastore_create_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(owner_name == rhs.owner_name)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_create_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_create_role_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_create_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_create_role_pargs() throw() {} + + const std::string* role_name; + const std::string* owner_name; + const std::string* db_name; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_create_role_result { + public: + + ThriftHiveMetastore_create_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_create_role_result() throw() {} + + bool success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __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; + +}; + +class ThriftHiveMetastore_create_role_presult { + public: + + + virtual ~ThriftHiveMetastore_create_role_presult() throw() {} + + bool* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_drop_role_args { + public: + + ThriftHiveMetastore_drop_role_args() : role_name(""), db_name("") { + } + + virtual ~ThriftHiveMetastore_drop_role_args() throw() {} + + std::string role_name; + std::string db_name; + + struct __isset { + __isset() : role_name(false), db_name(false) {} + bool role_name; + bool db_name; + } __isset; + + bool operator == (const ThriftHiveMetastore_drop_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_role_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_drop_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_role_pargs() throw() {} + + const std::string* role_name; + const std::string* db_name; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_drop_role_result { + public: + + ThriftHiveMetastore_drop_role_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_drop_role_result() throw() {} + + bool success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __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; + +}; + +class ThriftHiveMetastore_drop_role_presult { + public: + + + virtual ~ThriftHiveMetastore_drop_role_presult() throw() {} + + bool* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_add_role_member_args { + public: + + ThriftHiveMetastore_add_role_member_args() : role_name(""), user_name(""), is_role(0), is_group(0), db_name("") { + } + + virtual ~ThriftHiveMetastore_add_role_member_args() throw() {} + + std::string role_name; + std::string user_name; + bool is_role; + bool is_group; + std::string db_name; + + struct __isset { + __isset() : role_name(false), user_name(false), is_role(false), is_group(false), db_name(false) {} + bool role_name; + bool user_name; + bool is_role; + bool is_group; + bool db_name; + } __isset; + + bool operator == (const ThriftHiveMetastore_add_role_member_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_role_member_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_role_member_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_add_role_member_pargs { + public: + + + virtual ~ThriftHiveMetastore_add_role_member_pargs() throw() {} + + const std::string* role_name; + const std::string* user_name; + const bool* is_role; + const bool* is_group; + const std::string* db_name; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_add_role_member_result { + public: + + ThriftHiveMetastore_add_role_member_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_add_role_member_result() throw() {} + + bool success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_add_role_member_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_add_role_member_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_add_role_member_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_add_role_member_presult { + public: + + + virtual ~ThriftHiveMetastore_add_role_member_presult() throw() {} + + bool* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_remove_role_member_args { + public: + + ThriftHiveMetastore_remove_role_member_args() : role_name(""), user_name(""), is_role(0), is_group(0), db_name("") { + } + + virtual ~ThriftHiveMetastore_remove_role_member_args() throw() {} + + std::string role_name; + std::string user_name; + bool is_role; + bool is_group; + std::string db_name; + + struct __isset { + __isset() : role_name(false), user_name(false), is_role(false), is_group(false), db_name(false) {} + bool role_name; + bool user_name; + bool is_role; + bool is_group; + bool db_name; + } __isset; + + bool operator == (const ThriftHiveMetastore_remove_role_member_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + if (!(user_name == rhs.user_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_remove_role_member_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_remove_role_member_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_remove_role_member_pargs { + public: + + + virtual ~ThriftHiveMetastore_remove_role_member_pargs() throw() {} + + const std::string* role_name; + const std::string* user_name; + const bool* is_role; + const bool* is_group; + const std::string* db_name; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_remove_role_member_result { + public: + + ThriftHiveMetastore_remove_role_member_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_remove_role_member_result() throw() {} + + bool success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_remove_role_member_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_remove_role_member_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_remove_role_member_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_remove_role_member_presult { + public: + + + virtual ~ThriftHiveMetastore_remove_role_member_presult() throw() {} + + bool* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_list_roles_args { + public: + + ThriftHiveMetastore_list_roles_args() : principal_name(""), is_role(0), is_group(0), db_name("") { + } + + virtual ~ThriftHiveMetastore_list_roles_args() throw() {} + + std::string principal_name; + bool is_role; + bool is_group; + std::string db_name; + + struct __isset { + __isset() : principal_name(false), is_role(false), is_group(false), db_name(false) {} + bool principal_name; + bool is_role; + bool is_group; + bool db_name; + } __isset; + + bool operator == (const ThriftHiveMetastore_list_roles_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_roles_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_roles_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_roles_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_roles_pargs() throw() {} + + const std::string* principal_name; + const bool* is_role; + const bool* is_group; + const std::string* db_name; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_roles_result { + public: + + ThriftHiveMetastore_list_roles_result() { + } + + virtual ~ThriftHiveMetastore_list_roles_result() throw() {} + + std::vector success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __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; + +}; + +class ThriftHiveMetastore_list_roles_presult { + public: + + + virtual ~ThriftHiveMetastore_list_roles_presult() throw() {} + + std::vector * success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_list_security_user_grant_args { + public: + + ThriftHiveMetastore_list_security_user_grant_args() : principla_name(""), is_role(0), is_group(0) { + } + + virtual ~ThriftHiveMetastore_list_security_user_grant_args() throw() {} + + std::string principla_name; + bool is_role; + bool is_group; + + struct __isset { + __isset() : principla_name(false), is_role(false), is_group(false) {} + bool principla_name; + bool is_role; + bool is_group; + } __isset; + + bool operator == (const ThriftHiveMetastore_list_security_user_grant_args & rhs) const + { + if (!(principla_name == rhs.principla_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_user_grant_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_user_grant_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_user_grant_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_security_user_grant_pargs() throw() {} + + const std::string* principla_name; + const bool* is_role; + const bool* is_group; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_user_grant_result { + public: + + ThriftHiveMetastore_list_security_user_grant_result() { + } + + virtual ~ThriftHiveMetastore_list_security_user_grant_result() throw() {} + + std::vector success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_list_security_user_grant_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_user_grant_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_user_grant_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_user_grant_presult { + public: + + + virtual ~ThriftHiveMetastore_list_security_user_grant_presult() throw() {} + + std::vector * success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_list_security_db_grant_args { + public: + + ThriftHiveMetastore_list_security_db_grant_args() : principal_name(""), is_group(0), is_role(0), db_name("") { + } + + virtual ~ThriftHiveMetastore_list_security_db_grant_args() throw() {} + + std::string principal_name; + bool is_group; + bool is_role; + std::string db_name; + + struct __isset { + __isset() : principal_name(false), is_group(false), is_role(false), db_name(false) {} + bool principal_name; + bool is_group; + bool is_role; + bool db_name; + } __isset; + + bool operator == (const ThriftHiveMetastore_list_security_db_grant_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(db_name == rhs.db_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_db_grant_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_db_grant_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_db_grant_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_security_db_grant_pargs() throw() {} + + const std::string* principal_name; + const bool* is_group; + const bool* is_role; + const std::string* db_name; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_db_grant_result { + public: + + ThriftHiveMetastore_list_security_db_grant_result() { + } + + virtual ~ThriftHiveMetastore_list_security_db_grant_result() throw() {} + + std::vector success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_list_security_db_grant_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_db_grant_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_db_grant_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_db_grant_presult { + public: + + + virtual ~ThriftHiveMetastore_list_security_db_grant_presult() throw() {} + + std::vector * success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_list_security_table_grant_args { + public: + + ThriftHiveMetastore_list_security_table_grant_args() : principal_name(""), is_group(0), is_role(0), db_name(""), table_name("") { + } + + virtual ~ThriftHiveMetastore_list_security_table_grant_args() throw() {} + + std::string principal_name; + bool is_group; + bool is_role; + std::string db_name; + std::string table_name; + + struct __isset { + __isset() : principal_name(false), is_group(false), is_role(false), db_name(false), table_name(false) {} + bool principal_name; + bool is_group; + bool is_role; + bool db_name; + bool table_name; + } __isset; + + bool operator == (const ThriftHiveMetastore_list_security_table_grant_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_table_grant_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_table_grant_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_table_grant_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_security_table_grant_pargs() throw() {} + + const std::string* principal_name; + const bool* is_group; + const bool* is_role; + const std::string* db_name; + const std::string* table_name; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_table_grant_result { + public: + + ThriftHiveMetastore_list_security_table_grant_result() { + } + + virtual ~ThriftHiveMetastore_list_security_table_grant_result() throw() {} + + std::vector success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_list_security_table_grant_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_table_grant_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_table_grant_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_table_grant_presult { + public: + + + virtual ~ThriftHiveMetastore_list_security_table_grant_presult() throw() {} + + std::vector * success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_list_security_partition_grant_args { + public: + + ThriftHiveMetastore_list_security_partition_grant_args() : principal_name(""), is_group(0), is_role(0), db_name(""), table_name(""), part_name("") { + } + + virtual ~ThriftHiveMetastore_list_security_partition_grant_args() throw() {} + + std::string principal_name; + bool is_group; + bool is_role; + std::string db_name; + std::string table_name; + std::string part_name; + + struct __isset { + __isset() : principal_name(false), is_group(false), is_role(false), db_name(false), table_name(false), part_name(false) {} + bool principal_name; + bool is_group; + bool is_role; + bool db_name; + bool table_name; + bool part_name; + } __isset; + + bool operator == (const ThriftHiveMetastore_list_security_partition_grant_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_partition_grant_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_partition_grant_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_partition_grant_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_security_partition_grant_pargs() throw() {} + + const std::string* principal_name; + const bool* is_group; + const bool* is_role; + const std::string* db_name; + const std::string* table_name; + const std::string* part_name; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_partition_grant_result { + public: + + ThriftHiveMetastore_list_security_partition_grant_result() { + } + + virtual ~ThriftHiveMetastore_list_security_partition_grant_result() throw() {} + + std::vector success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_list_security_partition_grant_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_partition_grant_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_partition_grant_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_partition_grant_presult { + public: + + + virtual ~ThriftHiveMetastore_list_security_partition_grant_presult() throw() {} + + std::vector * success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_list_security_column_grant_args { + public: + + ThriftHiveMetastore_list_security_column_grant_args() : principal_name(""), is_group(0), is_role(0), db_name(""), table_name(""), part_name(""), column_name("") { + } + + virtual ~ThriftHiveMetastore_list_security_column_grant_args() throw() {} + + std::string principal_name; + bool is_group; + bool is_role; + std::string db_name; + std::string table_name; + std::string part_name; + std::string column_name; + + struct __isset { + __isset() : principal_name(false), is_group(false), is_role(false), db_name(false), table_name(false), part_name(false), column_name(false) {} + bool principal_name; + bool is_group; + bool is_role; + bool db_name; + bool table_name; + bool part_name; + bool column_name; + } __isset; + + bool operator == (const ThriftHiveMetastore_list_security_column_grant_args & rhs) const + { + if (!(principal_name == rhs.principal_name)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(db_name == rhs.db_name)) + return false; + if (!(table_name == rhs.table_name)) + return false; + if (!(part_name == rhs.part_name)) + return false; + if (!(column_name == rhs.column_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_column_grant_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_column_grant_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_column_grant_pargs { + public: + + + virtual ~ThriftHiveMetastore_list_security_column_grant_pargs() throw() {} + + const std::string* principal_name; + const bool* is_group; + const bool* is_role; + const std::string* db_name; + const std::string* table_name; + const std::string* part_name; + const std::string* column_name; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_column_grant_result { + public: + + ThriftHiveMetastore_list_security_column_grant_result() { + } + + virtual ~ThriftHiveMetastore_list_security_column_grant_result() throw() {} + + std::vector success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_list_security_column_grant_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_list_security_column_grant_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_list_security_column_grant_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_list_security_column_grant_presult { + public: + + + virtual ~ThriftHiveMetastore_list_security_column_grant_presult() throw() {} + + std::vector * success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_grant_privileges_args { + public: + + ThriftHiveMetastore_grant_privileges_args() : user_name(""), is_role(0), is_group(0), grantor("") { + } + + virtual ~ThriftHiveMetastore_grant_privileges_args() throw() {} + + std::string user_name; + bool is_role; + bool is_group; + PrivilegeBag privileges; + std::string grantor; + + struct __isset { + __isset() : user_name(false), is_role(false), is_group(false), privileges(false), grantor(false) {} + bool user_name; + bool is_role; + bool is_group; + bool privileges; + bool grantor; + } __isset; + + bool operator == (const ThriftHiveMetastore_grant_privileges_args & rhs) const + { + if (!(user_name == rhs.user_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (!(grantor == rhs.grantor)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_grant_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_grant_privileges_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_grant_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_grant_privileges_pargs() throw() {} + + const std::string* user_name; + const bool* is_role; + const bool* is_group; + const PrivilegeBag* privileges; + const std::string* grantor; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_grant_privileges_result { + public: + + ThriftHiveMetastore_grant_privileges_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_grant_privileges_result() throw() {} + + bool success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __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; + +}; + +class ThriftHiveMetastore_grant_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_grant_privileges_presult() throw() {} + + bool* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_revoke_privileges_args { + public: + + ThriftHiveMetastore_revoke_privileges_args() : user_name(""), is_role(0), is_group(0) { + } + + virtual ~ThriftHiveMetastore_revoke_privileges_args() throw() {} + + std::string user_name; + bool is_role; + bool is_group; + PrivilegeBag privileges; + + struct __isset { + __isset() : user_name(false), is_role(false), is_group(false), privileges(false) {} + bool user_name; + bool is_role; + bool is_group; + bool privileges; + } __isset; + + bool operator == (const ThriftHiveMetastore_revoke_privileges_args & rhs) const + { + if (!(user_name == rhs.user_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(privileges == rhs.privileges)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_privileges_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_revoke_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_revoke_privileges_pargs() throw() {} + + const std::string* user_name; + const bool* is_role; + const bool* is_group; + const PrivilegeBag* privileges; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_revoke_privileges_result { + public: + + ThriftHiveMetastore_revoke_privileges_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_revoke_privileges_result() throw() {} + + bool success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __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; + +}; + +class ThriftHiveMetastore_revoke_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_revoke_privileges_presult() throw() {} + + bool* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastore_revoke_all_privileges_args { + public: + + ThriftHiveMetastore_revoke_all_privileges_args() : user_name(""), is_role(0), is_group(0), remove_user_priv(0) { + } + + virtual ~ThriftHiveMetastore_revoke_all_privileges_args() throw() {} + + std::string user_name; + bool is_role; + bool is_group; + bool remove_user_priv; + std::vector dbs; + std::vector
tables; + std::vector parts; + std::map > columns; + + struct __isset { + __isset() : user_name(false), is_role(false), is_group(false), remove_user_priv(false), dbs(false), tables(false), parts(false), columns(false) {} + bool user_name; + bool is_role; + bool is_group; + bool remove_user_priv; + bool dbs; + bool tables; + bool parts; + bool columns; + } __isset; + + bool operator == (const ThriftHiveMetastore_revoke_all_privileges_args & rhs) const + { + if (!(user_name == rhs.user_name)) + return false; + if (!(is_role == rhs.is_role)) + return false; + if (!(is_group == rhs.is_group)) + return false; + if (!(remove_user_priv == rhs.remove_user_priv)) + return false; + if (!(dbs == rhs.dbs)) + return false; + if (!(tables == rhs.tables)) + return false; + if (!(parts == rhs.parts)) + return false; + if (!(columns == rhs.columns)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_all_privileges_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_all_privileges_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_revoke_all_privileges_pargs { + public: + + + virtual ~ThriftHiveMetastore_revoke_all_privileges_pargs() throw() {} + + const std::string* user_name; + const bool* is_role; + const bool* is_group; + const bool* remove_user_priv; + const std::vector * dbs; + const std::vector
* tables; + const std::vector * parts; + const std::map > * columns; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_revoke_all_privileges_result { + public: + + ThriftHiveMetastore_revoke_all_privileges_result() : success(0) { + } + + virtual ~ThriftHiveMetastore_revoke_all_privileges_result() throw() {} + + bool success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + bool operator == (const ThriftHiveMetastore_revoke_all_privileges_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(o1 == rhs.o1)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_revoke_all_privileges_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_revoke_all_privileges_result & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_revoke_all_privileges_presult { + public: + + + virtual ~ThriftHiveMetastore_revoke_all_privileges_presult() throw() {} + + bool* success; + MetaException o1; + + struct __isset { + __isset() : success(false), o1(false) {} + bool success; + bool o1; + } __isset; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + +}; + +class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceClient { + public: + ThriftHiveMetastoreClient(boost::shared_ptr prot) : + facebook::fb303::FacebookServiceClient(prot, prot) {} + ThriftHiveMetastoreClient(boost::shared_ptr iprot, boost::shared_ptr oprot) : + facebook::fb303::FacebookServiceClient(iprot, oprot) {} + boost::shared_ptr getInputProtocol() { + return piprot_; + } + boost::shared_ptr getOutputProtocol() { + return poprot_; + } + void create_database(const Database& database); + void send_create_database(const Database& database); + void recv_create_database(); + void get_database(Database& _return, const std::string& name); + void send_get_database(const std::string& name); + void recv_get_database(Database& _return); + void drop_database(const std::string& name, const bool deleteData); + void send_drop_database(const std::string& name, const bool deleteData); + void recv_drop_database(); + void get_databases(std::vector & _return, const std::string& pattern); + void send_get_databases(const std::string& pattern); + void recv_get_databases(std::vector & _return); + void get_all_databases(std::vector & _return); + void send_get_all_databases(); + void recv_get_all_databases(std::vector & _return); + void get_type(Type& _return, const std::string& name); + void send_get_type(const std::string& name); + void recv_get_type(Type& _return); + bool create_type(const Type& type); + void send_create_type(const Type& type); + bool recv_create_type(); + bool drop_type(const std::string& type); + void send_drop_type(const std::string& type); + bool recv_drop_type(); + void get_type_all(std::map & _return, const std::string& name); + void send_get_type_all(const std::string& name); + void recv_get_type_all(std::map & _return); + void get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name); + void send_get_fields(const std::string& db_name, const std::string& table_name); + void recv_get_fields(std::vector & _return); + void get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name); + void send_get_schema(const std::string& db_name, const std::string& table_name); + void recv_get_schema(std::vector & _return); + void create_table(const Table& tbl); + void send_create_table(const Table& tbl); + void recv_create_table(); + void drop_table(const std::string& dbname, const std::string& name, const bool deleteData); + void send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData); + void recv_drop_table(); + void get_tables(std::vector & _return, const std::string& db_name, const std::string& pattern); + void send_get_tables(const std::string& db_name, const std::string& pattern); + void recv_get_tables(std::vector & _return); + void get_all_tables(std::vector & _return, const std::string& db_name); + void send_get_all_tables(const std::string& db_name); + void recv_get_all_tables(std::vector & _return); + void get_table(Table& _return, const std::string& dbname, const std::string& tbl_name); + void send_get_table(const std::string& dbname, const std::string& tbl_name); + void recv_get_table(Table& _return); + void alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); + void send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl); + void recv_alter_table(); + void add_partition(Partition& _return, const Partition& new_part); + void send_add_partition(const Partition& new_part); + void recv_add_partition(Partition& _return); + void append_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void send_append_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void recv_append_partition(Partition& _return); + void append_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void send_append_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void recv_append_partition_by_name(Partition& _return); + bool drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); + void send_drop_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const bool deleteData); + bool recv_drop_partition(); + bool drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); + void send_drop_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name, const bool deleteData); + bool recv_drop_partition_by_name(); + void get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void send_get_partition(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals); + void recv_get_partition(Partition& _return); + void get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names); + void send_get_partition_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names); + void recv_get_partition_with_auth(Partition& _return); + void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void send_get_partition_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& part_name); + void recv_get_partition_by_name(Partition& _return); + void get_partitions(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void send_get_partitions(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void recv_get_partitions(std::vector & _return); + void get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names); + void send_get_partitions_with_auth(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names); + void recv_get_partitions_with_auth(std::vector & _return); + void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts); + void recv_get_partition_names(std::vector & _return); + void get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void recv_get_partitions_ps(std::vector & _return); + void get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names); + void send_get_partitions_ps_with_auth(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names); + void recv_get_partitions_ps_with_auth(std::vector & _return); + void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts); + void recv_get_partition_names_ps(std::vector & _return); + void get_partitions_by_filter(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); + void send_get_partitions_by_filter(const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts); + void recv_get_partitions_by_filter(std::vector & _return); + void alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); + void send_alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part); + void recv_alter_partition(); + void get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue); + void send_get_config_value(const std::string& name, const std::string& defaultValue); + void recv_get_config_value(std::string& _return); + void partition_name_to_vals(std::vector & _return, const std::string& part_name); + void send_partition_name_to_vals(const std::string& part_name); + void recv_partition_name_to_vals(std::vector & _return); + void partition_name_to_spec(std::map & _return, const std::string& part_name); + void send_partition_name_to_spec(const std::string& part_name); + void recv_partition_name_to_spec(std::map & _return); + void add_index(Index& _return, const Index& new_index, const Table& index_table); + void send_add_index(const Index& new_index, const Table& index_table); + void recv_add_index(Index& _return); + void alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); + void send_alter_index(const std::string& dbname, const std::string& base_tbl_name, const std::string& idx_name, const Index& new_idx); + void recv_alter_index(); + bool drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); + void send_drop_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name, const bool deleteData); + bool recv_drop_index_by_name(); + void get_index_by_name(Index& _return, const std::string& db_name, const std::string& tbl_name, const std::string& index_name); + void send_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name); + void recv_get_index_by_name(Index& _return); + void get_indexes(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void send_get_indexes(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void recv_get_indexes(std::vector & _return); + void get_index_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void send_get_index_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_indexes); + void recv_get_index_names(std::vector & _return); + void get_user_privilege_set(PrincipalPrivilegeSet& _return, const std::string& user_name, const std::vector & group_names); + void send_get_user_privilege_set(const std::string& user_name, const std::vector & group_names); + void recv_get_user_privilege_set(PrincipalPrivilegeSet& _return); + void get_db_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& user_name, const std::vector & group_names); + void send_get_db_privilege_set(const std::string& db_name, const std::string& user_name, const std::vector & group_names); + void recv_get_db_privilege_set(PrincipalPrivilegeSet& _return); + void get_table_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names); + void send_get_table_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names); + void recv_get_table_privilege_set(PrincipalPrivilegeSet& _return); + void get_partition_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names); + void send_get_partition_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names); + void recv_get_partition_privilege_set(PrincipalPrivilegeSet& _return); + void get_column_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names); + void send_get_column_privilege_set(const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names); + void recv_get_column_privilege_set(PrincipalPrivilegeSet& _return); + bool create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name); + void send_create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name); + bool recv_create_role(); + bool drop_role(const std::string& role_name, const std::string& db_name); + void send_drop_role(const std::string& role_name, const std::string& db_name); + bool recv_drop_role(); + bool add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name); + void send_add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name); + bool recv_add_role_member(); + bool remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name); + void send_remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name); + bool recv_remove_role_member(); + void list_roles(std::vector & _return, const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name); + void send_list_roles(const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name); + void recv_list_roles(std::vector & _return); + void list_security_user_grant(std::vector & _return, const std::string& principla_name, const bool is_role, const bool is_group); + void send_list_security_user_grant(const std::string& principla_name, const bool is_role, const bool is_group); + void recv_list_security_user_grant(std::vector & _return); + void list_security_db_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name); + void send_list_security_db_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name); + void recv_list_security_db_grant(std::vector & _return); + void list_security_table_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name); + void send_list_security_table_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name); + void recv_list_security_table_grant(std::vector & _return); + void list_security_partition_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name); + void send_list_security_partition_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name); + void recv_list_security_partition_grant(std::vector & _return); + void list_security_column_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name); + void send_list_security_column_grant(const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name); + void recv_list_security_column_grant(std::vector & _return); + bool grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor); + void send_grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor); + bool recv_grant_privileges(); + bool revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges); + void send_revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges); + bool recv_revoke_privileges(); + bool revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns); + void send_revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns); + bool recv_revoke_all_privileges(); +}; + class ThriftHiveMetastoreProcessor : virtual public apache::thrift::TProcessor, public facebook::fb303::FacebookServiceProcessor { protected: boost::shared_ptr iface_; @@ -4641,10 +7272,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); @@ -4657,6 +7291,24 @@ void process_get_index_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); void process_get_indexes(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); void process_get_index_names(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_user_privilege_set(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_db_privilege_set(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_table_privilege_set(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_partition_privilege_set(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_column_privilege_set(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_create_role(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_drop_role(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_add_role_member(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_remove_role_member(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_list_roles(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_list_security_user_grant(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_list_security_db_grant(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_list_security_table_grant(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_list_security_partition_grant(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_list_security_column_grant(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_grant_privileges(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_revoke_privileges(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_revoke_all_privileges(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); public: ThriftHiveMetastoreProcessor(boost::shared_ptr iface) : facebook::fb303::FacebookServiceProcessor(iface), @@ -4684,10 +7336,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; @@ -4700,6 +7355,24 @@ processMap_["get_index_by_name"] = &ThriftHiveMetastoreProcessor::process_get_index_by_name; processMap_["get_indexes"] = &ThriftHiveMetastoreProcessor::process_get_indexes; processMap_["get_index_names"] = &ThriftHiveMetastoreProcessor::process_get_index_names; + processMap_["get_user_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_user_privilege_set; + processMap_["get_db_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_db_privilege_set; + processMap_["get_table_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_table_privilege_set; + processMap_["get_partition_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_partition_privilege_set; + processMap_["get_column_privilege_set"] = &ThriftHiveMetastoreProcessor::process_get_column_privilege_set; + processMap_["create_role"] = &ThriftHiveMetastoreProcessor::process_create_role; + processMap_["drop_role"] = &ThriftHiveMetastoreProcessor::process_drop_role; + processMap_["add_role_member"] = &ThriftHiveMetastoreProcessor::process_add_role_member; + processMap_["remove_role_member"] = &ThriftHiveMetastoreProcessor::process_remove_role_member; + processMap_["list_roles"] = &ThriftHiveMetastoreProcessor::process_list_roles; + processMap_["list_security_user_grant"] = &ThriftHiveMetastoreProcessor::process_list_security_user_grant; + processMap_["list_security_db_grant"] = &ThriftHiveMetastoreProcessor::process_list_security_db_grant; + processMap_["list_security_table_grant"] = &ThriftHiveMetastoreProcessor::process_list_security_table_grant; + processMap_["list_security_partition_grant"] = &ThriftHiveMetastoreProcessor::process_list_security_partition_grant; + processMap_["list_security_column_grant"] = &ThriftHiveMetastoreProcessor::process_list_security_column_grant; + processMap_["grant_privileges"] = &ThriftHiveMetastoreProcessor::process_grant_privileges; + processMap_["revoke_privileges"] = &ThriftHiveMetastoreProcessor::process_revoke_privileges; + processMap_["revoke_all_privileges"] = &ThriftHiveMetastoreProcessor::process_revoke_all_privileges; } virtual bool process(boost::shared_ptr piprot, boost::shared_ptr poprot); @@ -4970,6 +7643,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) { @@ -4994,6 +7679,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) { @@ -5018,6 +7715,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) { @@ -5151,6 +7860,215 @@ } } + void get_user_privilege_set(PrincipalPrivilegeSet& _return, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_user_privilege_set(_return, user_name, group_names); + return; + } else { + ifaces_[i]->get_user_privilege_set(_return, user_name, group_names); + } + } + } + + void get_db_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_db_privilege_set(_return, db_name, user_name, group_names); + return; + } else { + ifaces_[i]->get_db_privilege_set(_return, db_name, user_name, group_names); + } + } + } + + void get_table_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_table_privilege_set(_return, db_name, table_name, user_name, group_names); + return; + } else { + ifaces_[i]->get_table_privilege_set(_return, db_name, table_name, user_name, group_names); + } + } + } + + void get_partition_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_partition_privilege_set(_return, db_name, table_name, part_name, user_name, group_names); + return; + } else { + ifaces_[i]->get_partition_privilege_set(_return, db_name, table_name, part_name, user_name, group_names); + } + } + } + + void get_column_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get_column_privilege_set(_return, db_name, table_name, part_name, column_name, user_name, group_names); + return; + } else { + ifaces_[i]->get_column_privilege_set(_return, db_name, table_name, part_name, column_name, user_name, group_names); + } + } + } + + bool create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->create_role(role_name, owner_name, db_name); + } else { + ifaces_[i]->create_role(role_name, owner_name, db_name); + } + } + } + + bool drop_role(const std::string& role_name, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->drop_role(role_name, db_name); + } else { + ifaces_[i]->drop_role(role_name, db_name); + } + } + } + + bool add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->add_role_member(role_name, user_name, is_role, is_group, db_name); + } else { + ifaces_[i]->add_role_member(role_name, user_name, is_role, is_group, db_name); + } + } + } + + bool remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->remove_role_member(role_name, user_name, is_role, is_group, db_name); + } else { + ifaces_[i]->remove_role_member(role_name, user_name, is_role, is_group, db_name); + } + } + } + + void list_roles(std::vector & _return, const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_roles(_return, principal_name, is_role, is_group, db_name); + return; + } else { + ifaces_[i]->list_roles(_return, principal_name, is_role, is_group, db_name); + } + } + } + + void list_security_user_grant(std::vector & _return, const std::string& principla_name, const bool is_role, const bool is_group) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_security_user_grant(_return, principla_name, is_role, is_group); + return; + } else { + ifaces_[i]->list_security_user_grant(_return, principla_name, is_role, is_group); + } + } + } + + void list_security_db_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_security_db_grant(_return, principal_name, is_group, is_role, db_name); + return; + } else { + ifaces_[i]->list_security_db_grant(_return, principal_name, is_group, is_role, db_name); + } + } + } + + void list_security_table_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_security_table_grant(_return, principal_name, is_group, is_role, db_name, table_name); + return; + } else { + ifaces_[i]->list_security_table_grant(_return, principal_name, is_group, is_role, db_name, table_name); + } + } + } + + void list_security_partition_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_security_partition_grant(_return, principal_name, is_group, is_role, db_name, table_name, part_name); + return; + } else { + ifaces_[i]->list_security_partition_grant(_return, principal_name, is_group, is_role, db_name, table_name, part_name); + } + } + } + + void list_security_column_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->list_security_column_grant(_return, principal_name, is_group, is_role, db_name, table_name, part_name, column_name); + return; + } else { + ifaces_[i]->list_security_column_grant(_return, principal_name, is_group, is_role, db_name, table_name, part_name, column_name); + } + } + } + + bool grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->grant_privileges(user_name, is_role, is_group, privileges, grantor); + } else { + ifaces_[i]->grant_privileges(user_name, is_role, is_group, privileges, grantor); + } + } + } + + bool revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->revoke_privileges(user_name, is_role, is_group, privileges); + } else { + ifaces_[i]->revoke_privileges(user_name, is_role, is_group, privileges); + } + } + } + + bool revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns); + } else { + ifaces_[i]->revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns); + } + } + } + }; }}} // namespace Index: metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp =================================================================== --- metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (revision 1037574) +++ metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (working copy) @@ -137,6 +137,11 @@ printf("get_partition\n"); } + void get_partition_with_auth(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_partition_with_auth\n"); + } + void get_partition_by_name(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::string& part_name) { // Your implementation goes here printf("get_partition_by_name\n"); @@ -147,6 +152,11 @@ printf("get_partitions\n"); } + void get_partitions_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_partitions_with_auth\n"); + } + void get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { // Your implementation goes here printf("get_partition_names\n"); @@ -157,6 +167,11 @@ printf("get_partitions_ps\n"); } + void get_partitions_ps_with_auth(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_partitions_ps_with_auth\n"); + } + void get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { // Your implementation goes here printf("get_partition_names_ps\n"); @@ -217,6 +232,96 @@ printf("get_index_names\n"); } + void get_user_privilege_set(PrincipalPrivilegeSet& _return, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_user_privilege_set\n"); + } + + void get_db_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_db_privilege_set\n"); + } + + void get_table_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_table_privilege_set\n"); + } + + void get_partition_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_partition_privilege_set\n"); + } + + void get_column_privilege_set(PrincipalPrivilegeSet& _return, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name, const std::string& user_name, const std::vector & group_names) { + // Your implementation goes here + printf("get_column_privilege_set\n"); + } + + bool create_role(const std::string& role_name, const std::string& owner_name, const std::string& db_name) { + // Your implementation goes here + printf("create_role\n"); + } + + bool drop_role(const std::string& role_name, const std::string& db_name) { + // Your implementation goes here + printf("drop_role\n"); + } + + bool add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { + // Your implementation goes here + printf("add_role_member\n"); + } + + bool remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group, const std::string& db_name) { + // Your implementation goes here + printf("remove_role_member\n"); + } + + void list_roles(std::vector & _return, const std::string& principal_name, const bool is_role, const bool is_group, const std::string& db_name) { + // Your implementation goes here + printf("list_roles\n"); + } + + void list_security_user_grant(std::vector & _return, const std::string& principla_name, const bool is_role, const bool is_group) { + // Your implementation goes here + printf("list_security_user_grant\n"); + } + + void list_security_db_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name) { + // Your implementation goes here + printf("list_security_db_grant\n"); + } + + void list_security_table_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name) { + // Your implementation goes here + printf("list_security_table_grant\n"); + } + + void list_security_partition_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name) { + // Your implementation goes here + printf("list_security_partition_grant\n"); + } + + void list_security_column_grant(std::vector & _return, const std::string& principal_name, const bool is_group, const bool is_role, const std::string& db_name, const std::string& table_name, const std::string& part_name, const std::string& column_name) { + // Your implementation goes here + printf("list_security_column_grant\n"); + } + + bool grant_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges, const std::string& grantor) { + // Your implementation goes here + printf("grant_privileges\n"); + } + + bool revoke_privileges(const std::string& user_name, const bool is_role, const bool is_group, const PrivilegeBag& privileges) { + // Your implementation goes here + printf("revoke_privileges\n"); + } + + bool revoke_all_privileges(const std::string& user_name, const bool is_role, const bool is_group, const bool remove_user_priv, const std::vector & dbs, const std::vector
& tables, const std::vector & parts, const std::map > & columns) { + // Your implementation goes here + printf("revoke_all_privileges\n"); + } + }; int main(int argc, char **argv) { Index: metastore/src/gen-cpp/hive_metastore_types.cpp =================================================================== --- metastore/src/gen-cpp/hive_metastore_types.cpp (revision 1037574) +++ metastore/src/gen-cpp/hive_metastore_types.cpp (working copy) @@ -261,8 +261,156 @@ return xfer; } -const char* Database::ascii_fingerprint = "AB879940BD15B6B25691265F7384B271"; -const uint8_t Database::binary_fingerprint[16] = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; +const char* PrincipalPrivilegeSet::ascii_fingerprint = "690D0C3B9BE6244BBC25229B4C7ED166"; +const uint8_t PrincipalPrivilegeSet::binary_fingerprint[16] = {0x69,0x0D,0x0C,0x3B,0x9B,0xE6,0x24,0x4B,0xBC,0x25,0x22,0x9B,0x4C,0x7E,0xD1,0x66}; + +uint32_t PrincipalPrivilegeSet::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_MAP) { + { + this->userPrivileges.clear(); + uint32_t _size6; + apache::thrift::protocol::TType _ktype7; + apache::thrift::protocol::TType _vtype8; + iprot->readMapBegin(_ktype7, _vtype8, _size6); + uint32_t _i10; + for (_i10 = 0; _i10 < _size6; ++_i10) + { + std::string _key11; + xfer += iprot->readString(_key11); + std::string& _val12 = this->userPrivileges[_key11]; + xfer += iprot->readString(_val12); + } + iprot->readMapEnd(); + } + this->__isset.userPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_MAP) { + { + this->groupPrivileges.clear(); + uint32_t _size13; + apache::thrift::protocol::TType _ktype14; + apache::thrift::protocol::TType _vtype15; + iprot->readMapBegin(_ktype14, _vtype15, _size13); + uint32_t _i17; + for (_i17 = 0; _i17 < _size13; ++_i17) + { + std::string _key18; + xfer += iprot->readString(_key18); + std::string& _val19 = this->groupPrivileges[_key18]; + xfer += iprot->readString(_val19); + } + iprot->readMapEnd(); + } + this->__isset.groupPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_MAP) { + { + this->rolePrivileges.clear(); + uint32_t _size20; + apache::thrift::protocol::TType _ktype21; + apache::thrift::protocol::TType _vtype22; + iprot->readMapBegin(_ktype21, _vtype22, _size20); + uint32_t _i24; + for (_i24 = 0; _i24 < _size20; ++_i24) + { + std::string _key25; + xfer += iprot->readString(_key25); + std::string& _val26 = this->rolePrivileges[_key25]; + xfer += iprot->readString(_val26); + } + iprot->readMapEnd(); + } + this->__isset.rolePrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PrincipalPrivilegeSet::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("PrincipalPrivilegeSet"); + xfer += oprot->writeFieldBegin("userPrivileges", apache::thrift::protocol::T_MAP, 1); + { + xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->userPrivileges.size()); + std::map ::const_iterator _iter27; + for (_iter27 = this->userPrivileges.begin(); _iter27 != this->userPrivileges.end(); ++_iter27) + { + xfer += oprot->writeString(_iter27->first); + xfer += oprot->writeString(_iter27->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("groupPrivileges", apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->groupPrivileges.size()); + std::map ::const_iterator _iter28; + for (_iter28 = this->groupPrivileges.begin(); _iter28 != this->groupPrivileges.end(); ++_iter28) + { + xfer += oprot->writeString(_iter28->first); + xfer += oprot->writeString(_iter28->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rolePrivileges", apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->rolePrivileges.size()); + std::map ::const_iterator _iter29; + for (_iter29 = this->rolePrivileges.begin(); _iter29 != this->rolePrivileges.end(); ++_iter29) + { + xfer += oprot->writeString(_iter29->first); + xfer += oprot->writeString(_iter29->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Database::ascii_fingerprint = "066D6767197F4DB4B82153D36D781573"; +const uint8_t Database::binary_fingerprint[16] = {0x06,0x6D,0x67,0x67,0x19,0x7F,0x4D,0xB4,0xB8,0x21,0x53,0xD3,0x6D,0x78,0x15,0x73}; uint32_t Database::read(apache::thrift::protocol::TProtocol* iprot) { @@ -308,6 +456,14 @@ xfer += iprot->skip(ftype); } break; + case 4: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->privileges.read(iprot); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -332,6 +488,98 @@ xfer += oprot->writeFieldBegin("locationUri", apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->locationUri); xfer += oprot->writeFieldEnd(); + if (this->__isset.privileges) { + xfer += oprot->writeFieldBegin("privileges", apache::thrift::protocol::T_STRUCT, 4); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Role::ascii_fingerprint = "AA49315100A59050D4090571DA62AF38"; +const uint8_t Role::binary_fingerprint[16] = {0xAA,0x49,0x31,0x51,0x00,0xA5,0x90,0x50,0xD4,0x09,0x05,0x71,0xDA,0x62,0xAF,0x38}; + +uint32_t Role::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->roleName); + this->__isset.roleName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->database.read(iprot); + this->__isset.database = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ownerName); + this->__isset.ownerName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Role::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Role"); + xfer += oprot->writeFieldBegin("roleName", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->roleName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("database", apache::thrift::protocol::T_STRUCT, 2); + xfer += this->database.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ownerName", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->ownerName); + xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -380,17 +628,17 @@ if (ftype == apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size6; - apache::thrift::protocol::TType _ktype7; - apache::thrift::protocol::TType _vtype8; - iprot->readMapBegin(_ktype7, _vtype8, _size6); - uint32_t _i10; - for (_i10 = 0; _i10 < _size6; ++_i10) + uint32_t _size30; + apache::thrift::protocol::TType _ktype31; + apache::thrift::protocol::TType _vtype32; + iprot->readMapBegin(_ktype31, _vtype32, _size30); + uint32_t _i34; + for (_i34 = 0; _i34 < _size30; ++_i34) { - std::string _key11; - xfer += iprot->readString(_key11); - std::string& _val12 = this->parameters[_key11]; - xfer += iprot->readString(_val12); + std::string _key35; + xfer += iprot->readString(_key35); + std::string& _val36 = this->parameters[_key35]; + xfer += iprot->readString(_val36); } iprot->readMapEnd(); } @@ -423,11 +671,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 _iter13; - for (_iter13 = this->parameters.begin(); _iter13 != this->parameters.end(); ++_iter13) + std::map ::const_iterator _iter37; + for (_iter37 = this->parameters.begin(); _iter37 != this->parameters.end(); ++_iter37) { - xfer += oprot->writeString(_iter13->first); - xfer += oprot->writeString(_iter13->second); + xfer += oprot->writeString(_iter37->first); + xfer += oprot->writeString(_iter37->second); } xfer += oprot->writeMapEnd(); } @@ -529,14 +777,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->cols.clear(); - uint32_t _size14; - apache::thrift::protocol::TType _etype17; - iprot->readListBegin(_etype17, _size14); - this->cols.resize(_size14); - uint32_t _i18; - for (_i18 = 0; _i18 < _size14; ++_i18) + uint32_t _size38; + apache::thrift::protocol::TType _etype41; + iprot->readListBegin(_etype41, _size38); + this->cols.resize(_size38); + uint32_t _i42; + for (_i42 = 0; _i42 < _size38; ++_i42) { - xfer += this->cols[_i18].read(iprot); + xfer += this->cols[_i42].read(iprot); } iprot->readListEnd(); } @@ -597,14 +845,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->bucketCols.clear(); - uint32_t _size19; - apache::thrift::protocol::TType _etype22; - iprot->readListBegin(_etype22, _size19); - this->bucketCols.resize(_size19); - uint32_t _i23; - for (_i23 = 0; _i23 < _size19; ++_i23) + uint32_t _size43; + apache::thrift::protocol::TType _etype46; + iprot->readListBegin(_etype46, _size43); + this->bucketCols.resize(_size43); + uint32_t _i47; + for (_i47 = 0; _i47 < _size43; ++_i47) { - xfer += iprot->readString(this->bucketCols[_i23]); + xfer += iprot->readString(this->bucketCols[_i47]); } iprot->readListEnd(); } @@ -617,14 +865,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->sortCols.clear(); - uint32_t _size24; - apache::thrift::protocol::TType _etype27; - iprot->readListBegin(_etype27, _size24); - this->sortCols.resize(_size24); - uint32_t _i28; - for (_i28 = 0; _i28 < _size24; ++_i28) + uint32_t _size48; + apache::thrift::protocol::TType _etype51; + iprot->readListBegin(_etype51, _size48); + this->sortCols.resize(_size48); + uint32_t _i52; + for (_i52 = 0; _i52 < _size48; ++_i52) { - xfer += this->sortCols[_i28].read(iprot); + xfer += this->sortCols[_i52].read(iprot); } iprot->readListEnd(); } @@ -637,17 +885,17 @@ if (ftype == apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size29; - apache::thrift::protocol::TType _ktype30; - apache::thrift::protocol::TType _vtype31; - iprot->readMapBegin(_ktype30, _vtype31, _size29); - uint32_t _i33; - for (_i33 = 0; _i33 < _size29; ++_i33) + 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) { - std::string _key34; - xfer += iprot->readString(_key34); - std::string& _val35 = this->parameters[_key34]; - xfer += iprot->readString(_val35); + std::string _key58; + xfer += iprot->readString(_key58); + std::string& _val59 = this->parameters[_key58]; + xfer += iprot->readString(_val59); } iprot->readMapEnd(); } @@ -674,10 +922,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 _iter36; - for (_iter36 = this->cols.begin(); _iter36 != this->cols.end(); ++_iter36) + std::vector ::const_iterator _iter60; + for (_iter60 = this->cols.begin(); _iter60 != this->cols.end(); ++_iter60) { - xfer += (*_iter36).write(oprot); + xfer += (*_iter60).write(oprot); } xfer += oprot->writeListEnd(); } @@ -703,10 +951,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 _iter37; - for (_iter37 = this->bucketCols.begin(); _iter37 != this->bucketCols.end(); ++_iter37) + std::vector ::const_iterator _iter61; + for (_iter61 = this->bucketCols.begin(); _iter61 != this->bucketCols.end(); ++_iter61) { - xfer += oprot->writeString((*_iter37)); + xfer += oprot->writeString((*_iter61)); } xfer += oprot->writeListEnd(); } @@ -714,10 +962,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 _iter38; - for (_iter38 = this->sortCols.begin(); _iter38 != this->sortCols.end(); ++_iter38) + std::vector ::const_iterator _iter62; + for (_iter62 = this->sortCols.begin(); _iter62 != this->sortCols.end(); ++_iter62) { - xfer += (*_iter38).write(oprot); + xfer += (*_iter62).write(oprot); } xfer += oprot->writeListEnd(); } @@ -725,11 +973,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 _iter39; - for (_iter39 = this->parameters.begin(); _iter39 != this->parameters.end(); ++_iter39) + std::map ::const_iterator _iter63; + for (_iter63 = this->parameters.begin(); _iter63 != this->parameters.end(); ++_iter63) { - xfer += oprot->writeString(_iter39->first); - xfer += oprot->writeString(_iter39->second); + xfer += oprot->writeString(_iter63->first); + xfer += oprot->writeString(_iter63->second); } xfer += oprot->writeMapEnd(); } @@ -739,8 +987,8 @@ return xfer; } -const char* Table::ascii_fingerprint = "F709D087CEEE7C49380296E3B423FF76"; -const uint8_t Table::binary_fingerprint[16] = {0xF7,0x09,0xD0,0x87,0xCE,0xEE,0x7C,0x49,0x38,0x02,0x96,0xE3,0xB4,0x23,0xFF,0x76}; +const char* Table::ascii_fingerprint = "E44C9688A4F33F1009F68AA63B2A80B2"; +const uint8_t Table::binary_fingerprint[16] = {0xE4,0x4C,0x96,0x88,0xA4,0xF3,0x3F,0x10,0x09,0xF6,0x8A,0xA6,0x3B,0x2A,0x80,0xB2}; uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { @@ -822,14 +1070,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->partitionKeys.clear(); - uint32_t _size40; - apache::thrift::protocol::TType _etype43; - iprot->readListBegin(_etype43, _size40); - this->partitionKeys.resize(_size40); - uint32_t _i44; - for (_i44 = 0; _i44 < _size40; ++_i44) + uint32_t _size64; + apache::thrift::protocol::TType _etype67; + iprot->readListBegin(_etype67, _size64); + this->partitionKeys.resize(_size64); + uint32_t _i68; + for (_i68 = 0; _i68 < _size64; ++_i68) { - xfer += this->partitionKeys[_i44].read(iprot); + xfer += this->partitionKeys[_i68].read(iprot); } iprot->readListEnd(); } @@ -842,17 +1090,17 @@ if (ftype == apache::thrift::protocol::T_MAP) { { this->parameters.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) + uint32_t _size69; + apache::thrift::protocol::TType _ktype70; + apache::thrift::protocol::TType _vtype71; + iprot->readMapBegin(_ktype70, _vtype71, _size69); + uint32_t _i73; + for (_i73 = 0; _i73 < _size69; ++_i73) { - std::string _key50; - xfer += iprot->readString(_key50); - std::string& _val51 = this->parameters[_key50]; - xfer += iprot->readString(_val51); + std::string _key74; + xfer += iprot->readString(_key74); + std::string& _val75 = this->parameters[_key74]; + xfer += iprot->readString(_val75); } iprot->readMapEnd(); } @@ -885,6 +1133,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; @@ -924,10 +1180,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 _iter52; - for (_iter52 = this->partitionKeys.begin(); _iter52 != this->partitionKeys.end(); ++_iter52) + std::vector ::const_iterator _iter76; + for (_iter76 = this->partitionKeys.begin(); _iter76 != this->partitionKeys.end(); ++_iter76) { - xfer += (*_iter52).write(oprot); + xfer += (*_iter76).write(oprot); } xfer += oprot->writeListEnd(); } @@ -935,11 +1191,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 _iter53; - for (_iter53 = this->parameters.begin(); _iter53 != this->parameters.end(); ++_iter53) + std::map ::const_iterator _iter77; + for (_iter77 = this->parameters.begin(); _iter77 != this->parameters.end(); ++_iter77) { - xfer += oprot->writeString(_iter53->first); - xfer += oprot->writeString(_iter53->second); + xfer += oprot->writeString(_iter77->first); + xfer += oprot->writeString(_iter77->second); } xfer += oprot->writeMapEnd(); } @@ -953,13 +1209,18 @@ xfer += oprot->writeFieldBegin("tableType", apache::thrift::protocol::T_STRING, 12); xfer += oprot->writeString(this->tableType); xfer += oprot->writeFieldEnd(); + if (this->__isset.privileges) { + xfer += oprot->writeFieldBegin("privileges", apache::thrift::protocol::T_STRUCT, 13); + xfer += this->privileges.write(oprot); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -const char* Partition::ascii_fingerprint = "E5EDC507CBBC5F6F81AAC4845B38F51B"; -const uint8_t Partition::binary_fingerprint[16] = {0xE5,0xED,0xC5,0x07,0xCB,0xBC,0x5F,0x6F,0x81,0xAA,0xC4,0x84,0x5B,0x38,0xF5,0x1B}; +const char* Partition::ascii_fingerprint = "7CEC6C72B8BFA98B78CDA30BF9200E2B"; +const uint8_t Partition::binary_fingerprint[16] = {0x7C,0xEC,0x6C,0x72,0xB8,0xBF,0xA9,0x8B,0x78,0xCD,0xA3,0x0B,0xF9,0x20,0x0E,0x2B}; uint32_t Partition::read(apache::thrift::protocol::TProtocol* iprot) { @@ -985,14 +1246,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->values.clear(); - uint32_t _size54; - apache::thrift::protocol::TType _etype57; - iprot->readListBegin(_etype57, _size54); - this->values.resize(_size54); - uint32_t _i58; - for (_i58 = 0; _i58 < _size54; ++_i58) + uint32_t _size78; + apache::thrift::protocol::TType _etype81; + iprot->readListBegin(_etype81, _size78); + this->values.resize(_size78); + uint32_t _i82; + for (_i82 = 0; _i82 < _size78; ++_i82) { - xfer += iprot->readString(this->values[_i58]); + xfer += iprot->readString(this->values[_i82]); } iprot->readListEnd(); } @@ -1045,17 +1306,17 @@ if (ftype == apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size59; - apache::thrift::protocol::TType _ktype60; - apache::thrift::protocol::TType _vtype61; - iprot->readMapBegin(_ktype60, _vtype61, _size59); - uint32_t _i63; - for (_i63 = 0; _i63 < _size59; ++_i63) + uint32_t _size83; + apache::thrift::protocol::TType _ktype84; + apache::thrift::protocol::TType _vtype85; + iprot->readMapBegin(_ktype84, _vtype85, _size83); + uint32_t _i87; + for (_i87 = 0; _i87 < _size83; ++_i87) { - std::string _key64; - xfer += iprot->readString(_key64); - std::string& _val65 = this->parameters[_key64]; - xfer += iprot->readString(_val65); + std::string _key88; + xfer += iprot->readString(_key88); + std::string& _val89 = this->parameters[_key88]; + xfer += iprot->readString(_val89); } iprot->readMapEnd(); } @@ -1064,6 +1325,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; @@ -1082,10 +1351,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 _iter66; - for (_iter66 = this->values.begin(); _iter66 != this->values.end(); ++_iter66) + std::vector ::const_iterator _iter90; + for (_iter90 = this->values.begin(); _iter90 != this->values.end(); ++_iter90) { - xfer += oprot->writeString((*_iter66)); + xfer += oprot->writeString((*_iter90)); } xfer += oprot->writeListEnd(); } @@ -1108,15 +1377,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 _iter67; - for (_iter67 = this->parameters.begin(); _iter67 != this->parameters.end(); ++_iter67) + std::map ::const_iterator _iter91; + for (_iter91 = this->parameters.begin(); _iter91 != this->parameters.end(); ++_iter91) { - xfer += oprot->writeString(_iter67->first); - xfer += oprot->writeString(_iter67->second); + xfer += oprot->writeString(_iter91->first); + xfer += oprot->writeString(_iter91->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; @@ -1213,17 +1487,17 @@ if (ftype == apache::thrift::protocol::T_MAP) { { this->parameters.clear(); - uint32_t _size68; - apache::thrift::protocol::TType _ktype69; - apache::thrift::protocol::TType _vtype70; - iprot->readMapBegin(_ktype69, _vtype70, _size68); - uint32_t _i72; - for (_i72 = 0; _i72 < _size68; ++_i72) + uint32_t _size92; + apache::thrift::protocol::TType _ktype93; + apache::thrift::protocol::TType _vtype94; + iprot->readMapBegin(_ktype93, _vtype94, _size92); + uint32_t _i96; + for (_i96 = 0; _i96 < _size92; ++_i96) { - std::string _key73; - xfer += iprot->readString(_key73); - std::string& _val74 = this->parameters[_key73]; - xfer += iprot->readString(_val74); + std::string _key97; + xfer += iprot->readString(_key97); + std::string& _val98 = this->parameters[_key97]; + xfer += iprot->readString(_val98); } iprot->readMapEnd(); } @@ -1282,11 +1556,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 _iter75; - for (_iter75 = this->parameters.begin(); _iter75 != this->parameters.end(); ++_iter75) + std::map ::const_iterator _iter99; + for (_iter99 = this->parameters.begin(); _iter99 != this->parameters.end(); ++_iter99) { - xfer += oprot->writeString(_iter75->first); - xfer += oprot->writeString(_iter75->second); + xfer += oprot->writeString(_iter99->first); + xfer += oprot->writeString(_iter99->second); } xfer += oprot->writeMapEnd(); } @@ -1326,14 +1600,14 @@ if (ftype == apache::thrift::protocol::T_LIST) { { this->fieldSchemas.clear(); - uint32_t _size76; - apache::thrift::protocol::TType _etype79; - iprot->readListBegin(_etype79, _size76); - this->fieldSchemas.resize(_size76); - uint32_t _i80; - for (_i80 = 0; _i80 < _size76; ++_i80) + uint32_t _size100; + apache::thrift::protocol::TType _etype103; + iprot->readListBegin(_etype103, _size100); + this->fieldSchemas.resize(_size100); + uint32_t _i104; + for (_i104 = 0; _i104 < _size100; ++_i104) { - xfer += this->fieldSchemas[_i80].read(iprot); + xfer += this->fieldSchemas[_i104].read(iprot); } iprot->readListEnd(); } @@ -1346,17 +1620,17 @@ if (ftype == apache::thrift::protocol::T_MAP) { { this->properties.clear(); - uint32_t _size81; - apache::thrift::protocol::TType _ktype82; - apache::thrift::protocol::TType _vtype83; - iprot->readMapBegin(_ktype82, _vtype83, _size81); - uint32_t _i85; - for (_i85 = 0; _i85 < _size81; ++_i85) + uint32_t _size105; + apache::thrift::protocol::TType _ktype106; + apache::thrift::protocol::TType _vtype107; + iprot->readMapBegin(_ktype106, _vtype107, _size105); + uint32_t _i109; + for (_i109 = 0; _i109 < _size105; ++_i109) { - std::string _key86; - xfer += iprot->readString(_key86); - std::string& _val87 = this->properties[_key86]; - xfer += iprot->readString(_val87); + std::string _key110; + xfer += iprot->readString(_key110); + std::string& _val111 = this->properties[_key110]; + xfer += iprot->readString(_val111); } iprot->readMapEnd(); } @@ -1383,10 +1657,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 _iter88; - for (_iter88 = this->fieldSchemas.begin(); _iter88 != this->fieldSchemas.end(); ++_iter88) + std::vector ::const_iterator _iter112; + for (_iter112 = this->fieldSchemas.begin(); _iter112 != this->fieldSchemas.end(); ++_iter112) { - xfer += (*_iter88).write(oprot); + xfer += (*_iter112).write(oprot); } xfer += oprot->writeListEnd(); } @@ -1394,11 +1668,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 _iter89; - for (_iter89 = this->properties.begin(); _iter89 != this->properties.end(); ++_iter89) + std::map ::const_iterator _iter113; + for (_iter113 = this->properties.begin(); _iter113 != this->properties.end(); ++_iter113) { - xfer += oprot->writeString(_iter89->first); - xfer += oprot->writeString(_iter89->second); + xfer += oprot->writeString(_iter113->first); + xfer += oprot->writeString(_iter113->second); } xfer += oprot->writeMapEnd(); } @@ -1408,10 +1682,10 @@ return xfer; } -const char* MetaException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; -const uint8_t MetaException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; +const char* ColumnPrivilegeBag::ascii_fingerprint = "DD4B1A6F6F2E9C90B0A41B314EF1753F"; +const uint8_t ColumnPrivilegeBag::binary_fingerprint[16] = {0xDD,0x4B,0x1A,0x6F,0x6F,0x2E,0x9C,0x90,0xB0,0xA4,0x1B,0x31,0x4E,0xF1,0x75,0x3F}; -uint32_t MetaException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ColumnPrivilegeBag::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -1433,8 +1707,47 @@ { case 1: if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; + xfer += iprot->readString(this->dbName); + this->__isset.dbName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->partitionName); + this->__isset.partitionName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_MAP) { + { + this->columnPrivileges.clear(); + uint32_t _size114; + apache::thrift::protocol::TType _ktype115; + apache::thrift::protocol::TType _vtype116; + iprot->readMapBegin(_ktype115, _vtype116, _size114); + uint32_t _i118; + for (_i118 = 0; _i118 < _size114; ++_i118) + { + std::string _key119; + xfer += iprot->readString(_key119); + std::string& _val120 = this->columnPrivileges[_key119]; + xfer += iprot->readString(_val120); + } + iprot->readMapEnd(); + } + this->__isset.columnPrivileges = true; } else { xfer += iprot->skip(ftype); } @@ -1451,21 +1764,39 @@ return xfer; } -uint32_t MetaException::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ColumnPrivilegeBag::write(apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - xfer += oprot->writeStructBegin("MetaException"); - xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->message); + xfer += oprot->writeStructBegin("ColumnPrivilegeBag"); + xfer += oprot->writeFieldBegin("dbName", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->dbName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tableName", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partitionName", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->partitionName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columnPrivileges", apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->columnPrivileges.size()); + std::map ::const_iterator _iter121; + for (_iter121 = this->columnPrivileges.begin(); _iter121 != this->columnPrivileges.end(); ++_iter121) + { + xfer += oprot->writeString(_iter121->first); + xfer += oprot->writeString(_iter121->second); + } + xfer += oprot->writeMapEnd(); + } xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; } -const char* UnknownTableException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; -const uint8_t UnknownTableException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; +const char* PrivilegeBag::ascii_fingerprint = "0B2E75D9339C4ABB61DA7C91635AA1DD"; +const uint8_t PrivilegeBag::binary_fingerprint[16] = {0x0B,0x2E,0x75,0xD9,0x33,0x9C,0x4A,0xBB,0x61,0xDA,0x7C,0x91,0x63,0x5A,0xA1,0xDD}; -uint32_t UnknownTableException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t PrivilegeBag::read(apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; @@ -1487,8 +1818,754 @@ { case 1: if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; + xfer += iprot->readString(this->userPrivileges); + this->__isset.userPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_MAP) { + { + this->dbPrivileges.clear(); + uint32_t _size122; + apache::thrift::protocol::TType _ktype123; + apache::thrift::protocol::TType _vtype124; + iprot->readMapBegin(_ktype123, _vtype124, _size122); + uint32_t _i126; + for (_i126 = 0; _i126 < _size122; ++_i126) + { + Database _key127; + xfer += _key127.read(iprot); + std::string& _val128 = this->dbPrivileges[_key127]; + xfer += iprot->readString(_val128); + } + iprot->readMapEnd(); + } + this->__isset.dbPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_MAP) { + { + this->tablePrivileges.clear(); + uint32_t _size129; + apache::thrift::protocol::TType _ktype130; + apache::thrift::protocol::TType _vtype131; + iprot->readMapBegin(_ktype130, _vtype131, _size129); + uint32_t _i133; + for (_i133 = 0; _i133 < _size129; ++_i133) + { + Table _key134; + xfer += _key134.read(iprot); + std::string& _val135 = this->tablePrivileges[_key134]; + xfer += iprot->readString(_val135); + } + iprot->readMapEnd(); + } + this->__isset.tablePrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_MAP) { + { + this->partitionPrivileges.clear(); + uint32_t _size136; + apache::thrift::protocol::TType _ktype137; + apache::thrift::protocol::TType _vtype138; + iprot->readMapBegin(_ktype137, _vtype138, _size136); + uint32_t _i140; + for (_i140 = 0; _i140 < _size136; ++_i140) + { + Partition _key141; + xfer += _key141.read(iprot); + std::string& _val142 = this->partitionPrivileges[_key141]; + xfer += iprot->readString(_val142); + } + iprot->readMapEnd(); + } + this->__isset.partitionPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_LIST) { + { + this->columnPrivileges.clear(); + uint32_t _size143; + apache::thrift::protocol::TType _etype146; + iprot->readListBegin(_etype146, _size143); + this->columnPrivileges.resize(_size143); + uint32_t _i147; + for (_i147 = 0; _i147 < _size143; ++_i147) + { + xfer += this->columnPrivileges[_i147].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.columnPrivileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t PrivilegeBag::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("PrivilegeBag"); + xfer += oprot->writeFieldBegin("userPrivileges", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->userPrivileges); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("dbPrivileges", apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRUCT, apache::thrift::protocol::T_STRING, this->dbPrivileges.size()); + std::map ::const_iterator _iter148; + for (_iter148 = this->dbPrivileges.begin(); _iter148 != this->dbPrivileges.end(); ++_iter148) + { + xfer += _iter148->first.write(oprot); + xfer += oprot->writeString(_iter148->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("tablePrivileges", apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRUCT, apache::thrift::protocol::T_STRING, this->tablePrivileges.size()); + std::map ::const_iterator _iter149; + for (_iter149 = this->tablePrivileges.begin(); _iter149 != this->tablePrivileges.end(); ++_iter149) + { + xfer += _iter149->first.write(oprot); + xfer += oprot->writeString(_iter149->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partitionPrivileges", apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRUCT, apache::thrift::protocol::T_STRING, this->partitionPrivileges.size()); + std::map ::const_iterator _iter150; + for (_iter150 = this->partitionPrivileges.begin(); _iter150 != this->partitionPrivileges.end(); ++_iter150) + { + xfer += _iter150->first.write(oprot); + xfer += oprot->writeString(_iter150->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columnPrivileges", apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->columnPrivileges.size()); + std::vector ::const_iterator _iter151; + for (_iter151 = this->columnPrivileges.begin(); _iter151 != this->columnPrivileges.end(); ++_iter151) + { + xfer += (*_iter151).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* SecurityUser::ascii_fingerprint = "B11DF433B5FE0219667D916D487E926C"; +const uint8_t SecurityUser::binary_fingerprint[16] = {0xB1,0x1D,0xF4,0x33,0xB5,0xFE,0x02,0x19,0x66,0x7D,0x91,0x6D,0x48,0x7E,0x92,0x6C}; + +uint32_t SecurityUser::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isRole); + this->__isset.isRole = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isGroup); + this->__isset.isGroup = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->privileges); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SecurityUser::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("SecurityUser"); + xfer += oprot->writeFieldBegin("principalName", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principalName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isRole", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->isRole); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isGroup", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->isGroup); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->privileges); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* SecurityDB::ascii_fingerprint = "62DE2336EF2104E2CB5045B70AC05354"; +const uint8_t SecurityDB::binary_fingerprint[16] = {0x62,0xDE,0x23,0x36,0xEF,0x21,0x04,0xE2,0xCB,0x50,0x45,0xB7,0x0A,0xC0,0x53,0x54}; + +uint32_t SecurityDB::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isRole); + this->__isset.isRole = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isGroup); + this->__isset.isGroup = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->privileges); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->db.read(iprot); + this->__isset.db = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SecurityDB::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("SecurityDB"); + xfer += oprot->writeFieldBegin("principalName", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principalName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isRole", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->isRole); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isGroup", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->isGroup); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->privileges); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("db", apache::thrift::protocol::T_STRUCT, 7); + xfer += this->db.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* SecurityTablePartition::ascii_fingerprint = "41D62E7CEC2A7ACFF83979B3CC82EB5F"; +const uint8_t SecurityTablePartition::binary_fingerprint[16] = {0x41,0xD6,0x2E,0x7C,0xEC,0x2A,0x7A,0xCF,0xF8,0x39,0x79,0xB3,0xCC,0x82,0xEB,0x5F}; + +uint32_t SecurityTablePartition::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isRole); + this->__isset.isRole = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isGroup); + this->__isset.isGroup = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->privileges); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->table.read(iprot); + this->__isset.table = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->part.read(iprot); + this->__isset.part = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SecurityTablePartition::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("SecurityTablePartition"); + xfer += oprot->writeFieldBegin("principalName", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principalName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isRole", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->isRole); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isGroup", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->isGroup); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->privileges); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table", apache::thrift::protocol::T_STRUCT, 7); + xfer += this->table.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("part", apache::thrift::protocol::T_STRUCT, 8); + xfer += this->part.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* SecurityColumn::ascii_fingerprint = "75916612792AFA6A3799E96DE9395806"; +const uint8_t SecurityColumn::binary_fingerprint[16] = {0x75,0x91,0x66,0x12,0x79,0x2A,0xFA,0x6A,0x37,0x99,0xE9,0x6D,0xE9,0x39,0x58,0x06}; + +uint32_t SecurityColumn::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->principalName); + this->__isset.principalName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isRole); + this->__isset.isRole = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isGroup); + this->__isset.isGroup = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->privileges); + this->__isset.privileges = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->grantor); + this->__isset.grantor = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->table.read(iprot); + this->__isset.table = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->partition.read(iprot); + this->__isset.partition = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->column); + this->__isset.column = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t SecurityColumn::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("SecurityColumn"); + xfer += oprot->writeFieldBegin("principalName", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->principalName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isRole", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->isRole); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("isGroup", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->isGroup); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("privileges", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeString(this->privileges); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("grantor", apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeString(this->grantor); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("table", apache::thrift::protocol::T_STRUCT, 7); + xfer += this->table.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("partition", apache::thrift::protocol::T_STRUCT, 8); + xfer += this->partition.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", apache::thrift::protocol::T_STRING, 9); + xfer += oprot->writeString(this->column); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* MetaException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; +const uint8_t MetaException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + +uint32_t MetaException::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t MetaException::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("MetaException"); + xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* UnknownTableException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; +const uint8_t UnknownTableException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + +uint32_t UnknownTableException::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; } else { xfer += iprot->skip(ftype); } Index: metastore/src/gen-cpp/hive_metastore_types.h =================================================================== --- metastore/src/gen-cpp/hive_metastore_types.h (revision 1037574) +++ metastore/src/gen-cpp/hive_metastore_types.h (working copy) @@ -150,11 +150,54 @@ }; +class PrincipalPrivilegeSet { + public: + + static const char* ascii_fingerprint; // = "690D0C3B9BE6244BBC25229B4C7ED166"; + static const uint8_t binary_fingerprint[16]; // = {0x69,0x0D,0x0C,0x3B,0x9B,0xE6,0x24,0x4B,0xBC,0x25,0x22,0x9B,0x4C,0x7E,0xD1,0x66}; + + PrincipalPrivilegeSet() { + } + + virtual ~PrincipalPrivilegeSet() throw() {} + + std::map userPrivileges; + std::map groupPrivileges; + std::map rolePrivileges; + + struct __isset { + __isset() : userPrivileges(false), groupPrivileges(false), rolePrivileges(false) {} + bool userPrivileges; + bool groupPrivileges; + bool rolePrivileges; + } __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; + +}; + class Database { public: - static const char* ascii_fingerprint; // = "AB879940BD15B6B25691265F7384B271"; - static const uint8_t binary_fingerprint[16]; // = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; + static const char* ascii_fingerprint; // = "066D6767197F4DB4B82153D36D781573"; + static const uint8_t binary_fingerprint[16]; // = {0x06,0x6D,0x67,0x67,0x19,0x7F,0x4D,0xB4,0xB8,0x21,0x53,0xD3,0x6D,0x78,0x15,0x73}; Database() : name(""), description(""), locationUri("") { } @@ -164,12 +207,14 @@ std::string name; std::string description; std::string locationUri; + PrincipalPrivilegeSet privileges; struct __isset { - __isset() : name(false), description(false), locationUri(false) {} + __isset() : name(false), description(false), locationUri(false), privileges(false) {} bool name; bool description; bool locationUri; + bool privileges; } __isset; bool operator == (const Database & rhs) const @@ -180,6 +225,10 @@ return false; if (!(locationUri == rhs.locationUri)) 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 { @@ -193,6 +242,53 @@ }; +class Role { + public: + + static const char* ascii_fingerprint; // = "AA49315100A59050D4090571DA62AF38"; + static const uint8_t binary_fingerprint[16]; // = {0xAA,0x49,0x31,0x51,0x00,0xA5,0x90,0x50,0xD4,0x09,0x05,0x71,0xDA,0x62,0xAF,0x38}; + + Role() : roleName(""), createTime(0), ownerName("") { + } + + virtual ~Role() throw() {} + + std::string roleName; + Database database; + int32_t createTime; + std::string ownerName; + + struct __isset { + __isset() : roleName(false), database(false), createTime(false), ownerName(false) {} + bool roleName; + bool database; + bool createTime; + bool ownerName; + } __isset; + + bool operator == (const Role & rhs) const + { + if (!(roleName == rhs.roleName)) + return false; + if (!(database == rhs.database)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(ownerName == rhs.ownerName)) + return false; + 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; + +}; + class SerDeInfo { public: @@ -349,8 +445,8 @@ class Table { public: - static const char* ascii_fingerprint; // = "F709D087CEEE7C49380296E3B423FF76"; - static const uint8_t binary_fingerprint[16]; // = {0xF7,0x09,0xD0,0x87,0xCE,0xEE,0x7C,0x49,0x38,0x02,0x96,0xE3,0xB4,0x23,0xFF,0x76}; + static const char* ascii_fingerprint; // = "E44C9688A4F33F1009F68AA63B2A80B2"; + static const uint8_t binary_fingerprint[16]; // = {0xE4,0x4C,0x96,0x88,0xA4,0xF3,0x3F,0x10,0x09,0xF6,0x8A,0xA6,0x3B,0x2A,0x80,0xB2}; Table() : tableName(""), dbName(""), owner(""), createTime(0), lastAccessTime(0), retention(0), viewOriginalText(""), viewExpandedText(""), tableType("") { } @@ -369,9 +465,10 @@ std::string viewOriginalText; std::string viewExpandedText; std::string tableType; + PrincipalPrivilegeSet privileges; struct __isset { - __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) {} + __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; @@ -384,6 +481,7 @@ bool viewOriginalText; bool viewExpandedText; bool tableType; + bool privileges; } __isset; bool operator == (const Table & rhs) const @@ -412,6 +510,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 { @@ -428,8 +530,8 @@ class Partition { public: - static const char* ascii_fingerprint; // = "E5EDC507CBBC5F6F81AAC4845B38F51B"; - static const uint8_t binary_fingerprint[16]; // = {0xE5,0xED,0xC5,0x07,0xCB,0xBC,0x5F,0x6F,0x81,0xAA,0xC4,0x84,0x5B,0x38,0xF5,0x1B}; + static const char* ascii_fingerprint; // = "7CEC6C72B8BFA98B78CDA30BF9200E2B"; + static const uint8_t binary_fingerprint[16]; // = {0x7C,0xEC,0x6C,0x72,0xB8,0xBF,0xA9,0x8B,0x78,0xCD,0xA3,0x0B,0xF9,0x20,0x0E,0x2B}; Partition() : dbName(""), tableName(""), createTime(0), lastAccessTime(0) { } @@ -443,9 +545,10 @@ int32_t lastAccessTime; StorageDescriptor sd; std::map parameters; + PrincipalPrivilegeSet privileges; struct __isset { - __isset() : values(false), dbName(false), tableName(false), createTime(false), lastAccessTime(false), sd(false), parameters(false) {} + __isset() : values(false), dbName(false), tableName(false), createTime(false), lastAccessTime(false), sd(false), parameters(false), privileges(false) {} bool values; bool dbName; bool tableName; @@ -453,6 +556,7 @@ bool lastAccessTime; bool sd; bool parameters; + bool privileges; } __isset; bool operator == (const Partition & rhs) const @@ -471,6 +575,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 { @@ -594,6 +702,348 @@ }; +class ColumnPrivilegeBag { + public: + + static const char* ascii_fingerprint; // = "DD4B1A6F6F2E9C90B0A41B314EF1753F"; + static const uint8_t binary_fingerprint[16]; // = {0xDD,0x4B,0x1A,0x6F,0x6F,0x2E,0x9C,0x90,0xB0,0xA4,0x1B,0x31,0x4E,0xF1,0x75,0x3F}; + + ColumnPrivilegeBag() : dbName(""), tableName(""), partitionName("") { + } + + virtual ~ColumnPrivilegeBag() throw() {} + + std::string dbName; + std::string tableName; + std::string partitionName; + std::map columnPrivileges; + + struct __isset { + __isset() : dbName(false), tableName(false), partitionName(false), columnPrivileges(false) {} + bool dbName; + bool tableName; + bool partitionName; + bool columnPrivileges; + } __isset; + + bool operator == (const ColumnPrivilegeBag & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tableName == rhs.tableName)) + return false; + if (!(partitionName == rhs.partitionName)) + return false; + if (!(columnPrivileges == rhs.columnPrivileges)) + return false; + return true; + } + bool operator != (const ColumnPrivilegeBag &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ColumnPrivilegeBag & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class PrivilegeBag { + public: + + static const char* ascii_fingerprint; // = "0B2E75D9339C4ABB61DA7C91635AA1DD"; + static const uint8_t binary_fingerprint[16]; // = {0x0B,0x2E,0x75,0xD9,0x33,0x9C,0x4A,0xBB,0x61,0xDA,0x7C,0x91,0x63,0x5A,0xA1,0xDD}; + + PrivilegeBag() : userPrivileges("") { + } + + virtual ~PrivilegeBag() throw() {} + + std::string userPrivileges; + std::map dbPrivileges; + std::map tablePrivileges; + std::map partitionPrivileges; + std::vector columnPrivileges; + + struct __isset { + __isset() : userPrivileges(false), dbPrivileges(false), tablePrivileges(false), partitionPrivileges(false), columnPrivileges(false) {} + bool userPrivileges; + bool dbPrivileges; + bool tablePrivileges; + bool partitionPrivileges; + bool columnPrivileges; + } __isset; + + bool operator == (const PrivilegeBag & rhs) const + { + if (!(userPrivileges == rhs.userPrivileges)) + return false; + if (!(dbPrivileges == rhs.dbPrivileges)) + return false; + if (!(tablePrivileges == rhs.tablePrivileges)) + return false; + if (!(partitionPrivileges == rhs.partitionPrivileges)) + return false; + if (!(columnPrivileges == rhs.columnPrivileges)) + return false; + return true; + } + bool operator != (const PrivilegeBag &rhs) const { + return !(*this == rhs); + } + + bool operator < (const PrivilegeBag & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class SecurityUser { + public: + + static const char* ascii_fingerprint; // = "B11DF433B5FE0219667D916D487E926C"; + static const uint8_t binary_fingerprint[16]; // = {0xB1,0x1D,0xF4,0x33,0xB5,0xFE,0x02,0x19,0x66,0x7D,0x91,0x6D,0x48,0x7E,0x92,0x6C}; + + SecurityUser() : principalName(""), isRole(0), isGroup(0), privileges(""), createTime(0), grantor("") { + } + + virtual ~SecurityUser() throw() {} + + std::string principalName; + bool isRole; + bool isGroup; + std::string privileges; + int32_t createTime; + std::string grantor; + + struct __isset { + __isset() : principalName(false), isRole(false), isGroup(false), privileges(false), createTime(false), grantor(false) {} + bool principalName; + bool isRole; + bool isGroup; + bool privileges; + bool createTime; + bool grantor; + } __isset; + + bool operator == (const SecurityUser & rhs) const + { + if (!(principalName == rhs.principalName)) + return false; + if (!(isRole == rhs.isRole)) + return false; + if (!(isGroup == rhs.isGroup)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(grantor == rhs.grantor)) + return false; + return true; + } + bool operator != (const SecurityUser &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SecurityUser & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class SecurityDB { + public: + + static const char* ascii_fingerprint; // = "62DE2336EF2104E2CB5045B70AC05354"; + static const uint8_t binary_fingerprint[16]; // = {0x62,0xDE,0x23,0x36,0xEF,0x21,0x04,0xE2,0xCB,0x50,0x45,0xB7,0x0A,0xC0,0x53,0x54}; + + SecurityDB() : principalName(""), isRole(0), isGroup(0), privileges(""), createTime(0), grantor("") { + } + + virtual ~SecurityDB() throw() {} + + std::string principalName; + bool isRole; + bool isGroup; + std::string privileges; + int32_t createTime; + std::string grantor; + Database db; + + struct __isset { + __isset() : principalName(false), isRole(false), isGroup(false), privileges(false), createTime(false), grantor(false), db(false) {} + bool principalName; + bool isRole; + bool isGroup; + bool privileges; + bool createTime; + bool grantor; + bool db; + } __isset; + + bool operator == (const SecurityDB & rhs) const + { + if (!(principalName == rhs.principalName)) + return false; + if (!(isRole == rhs.isRole)) + return false; + if (!(isGroup == rhs.isGroup)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(grantor == rhs.grantor)) + return false; + if (!(db == rhs.db)) + return false; + return true; + } + bool operator != (const SecurityDB &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SecurityDB & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class SecurityTablePartition { + public: + + static const char* ascii_fingerprint; // = "41D62E7CEC2A7ACFF83979B3CC82EB5F"; + static const uint8_t binary_fingerprint[16]; // = {0x41,0xD6,0x2E,0x7C,0xEC,0x2A,0x7A,0xCF,0xF8,0x39,0x79,0xB3,0xCC,0x82,0xEB,0x5F}; + + SecurityTablePartition() : principalName(""), isRole(0), isGroup(0), privileges(""), createTime(0), grantor("") { + } + + virtual ~SecurityTablePartition() throw() {} + + std::string principalName; + bool isRole; + bool isGroup; + std::string privileges; + int32_t createTime; + std::string grantor; + Table table; + Partition part; + + struct __isset { + __isset() : principalName(false), isRole(false), isGroup(false), privileges(false), createTime(false), grantor(false), table(false), part(false) {} + bool principalName; + bool isRole; + bool isGroup; + bool privileges; + bool createTime; + bool grantor; + bool table; + bool part; + } __isset; + + bool operator == (const SecurityTablePartition & rhs) const + { + if (!(principalName == rhs.principalName)) + return false; + if (!(isRole == rhs.isRole)) + return false; + if (!(isGroup == rhs.isGroup)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(grantor == rhs.grantor)) + return false; + if (!(table == rhs.table)) + return false; + if (!(part == rhs.part)) + return false; + return true; + } + bool operator != (const SecurityTablePartition &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SecurityTablePartition & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class SecurityColumn { + public: + + static const char* ascii_fingerprint; // = "75916612792AFA6A3799E96DE9395806"; + static const uint8_t binary_fingerprint[16]; // = {0x75,0x91,0x66,0x12,0x79,0x2A,0xFA,0x6A,0x37,0x99,0xE9,0x6D,0xE9,0x39,0x58,0x06}; + + SecurityColumn() : principalName(""), isRole(0), isGroup(0), privileges(""), createTime(0), grantor(""), column("") { + } + + virtual ~SecurityColumn() throw() {} + + std::string principalName; + bool isRole; + bool isGroup; + std::string privileges; + int32_t createTime; + std::string grantor; + Table table; + Partition partition; + std::string column; + + struct __isset { + __isset() : principalName(false), isRole(false), isGroup(false), privileges(false), createTime(false), grantor(false), table(false), partition(false), column(false) {} + bool principalName; + bool isRole; + bool isGroup; + bool privileges; + bool createTime; + bool grantor; + bool table; + bool partition; + bool column; + } __isset; + + bool operator == (const SecurityColumn & rhs) const + { + if (!(principalName == rhs.principalName)) + return false; + if (!(isRole == rhs.isRole)) + return false; + if (!(isGroup == rhs.isGroup)) + return false; + if (!(privileges == rhs.privileges)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(grantor == rhs.grantor)) + return false; + if (!(table == rhs.table)) + return false; + if (!(partition == rhs.partition)) + return false; + if (!(column == rhs.column)) + return false; + return true; + } + bool operator != (const SecurityColumn &rhs) const { + return !(*this == rhs); + } + + bool operator < (const SecurityColumn & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + class MetaException : public apache::thrift::TException { public: Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnPrivilegeBag.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnPrivilegeBag.java (revision 0) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnPrivilegeBag.java (revision 0) @@ -0,0 +1,462 @@ +/** + * 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.Set; +import java.util.HashSet; +import java.util.Collections; +import org.apache.log4j.Logger; + +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; + +public class ColumnPrivilegeBag implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("ColumnPrivilegeBag"); + private static final TField DB_NAME_FIELD_DESC = new TField("dbName", TType.STRING, (short)1); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)2); + private static final TField PARTITION_NAME_FIELD_DESC = new TField("partitionName", TType.STRING, (short)3); + private static final TField COLUMN_PRIVILEGES_FIELD_DESC = new TField("columnPrivileges", TType.MAP, (short)4); + + private String dbName; + public static final int DBNAME = 1; + private String tableName; + public static final int TABLENAME = 2; + private String partitionName; + public static final int PARTITIONNAME = 3; + private Map columnPrivileges; + public static final int COLUMNPRIVILEGES = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DBNAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PARTITIONNAME, new FieldMetaData("partitionName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMNPRIVILEGES, new FieldMetaData("columnPrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(ColumnPrivilegeBag.class, metaDataMap); + } + + public ColumnPrivilegeBag() { + } + + public ColumnPrivilegeBag( + String dbName, + String tableName, + String partitionName, + Map columnPrivileges) + { + this(); + this.dbName = dbName; + this.tableName = tableName; + this.partitionName = partitionName; + this.columnPrivileges = columnPrivileges; + } + + /** + * Performs a deep copy on other. + */ + public ColumnPrivilegeBag(ColumnPrivilegeBag other) { + if (other.isSetDbName()) { + this.dbName = other.dbName; + } + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetPartitionName()) { + this.partitionName = other.partitionName; + } + if (other.isSetColumnPrivileges()) { + Map __this__columnPrivileges = new HashMap(); + for (Map.Entry other_element : other.columnPrivileges.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__columnPrivileges_copy_key = other_element_key; + + String __this__columnPrivileges_copy_value = other_element_value; + + __this__columnPrivileges.put(__this__columnPrivileges_copy_key, __this__columnPrivileges_copy_value); + } + this.columnPrivileges = __this__columnPrivileges; + } + } + + @Override + public ColumnPrivilegeBag clone() { + return new ColumnPrivilegeBag(this); + } + + 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 String getTableName() { + return this.tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void unsetTableName() { + this.tableName = null; + } + + // Returns true if field tableName is set (has been asigned a value) and false otherwise + public boolean isSetTableName() { + return this.tableName != null; + } + + public String getPartitionName() { + return this.partitionName; + } + + public void setPartitionName(String partitionName) { + this.partitionName = partitionName; + } + + public void unsetPartitionName() { + this.partitionName = null; + } + + // Returns true if field partitionName is set (has been asigned a value) and false otherwise + public boolean isSetPartitionName() { + return this.partitionName != null; + } + + public int getColumnPrivilegesSize() { + return (this.columnPrivileges == null) ? 0 : this.columnPrivileges.size(); + } + + public void putToColumnPrivileges(String key, String val) { + if (this.columnPrivileges == null) { + this.columnPrivileges = new HashMap(); + } + this.columnPrivileges.put(key, val); + } + + public Map getColumnPrivileges() { + return this.columnPrivileges; + } + + public void setColumnPrivileges(Map columnPrivileges) { + this.columnPrivileges = columnPrivileges; + } + + public void unsetColumnPrivileges() { + this.columnPrivileges = null; + } + + // Returns true if field columnPrivileges is set (has been asigned a value) and false otherwise + public boolean isSetColumnPrivileges() { + return this.columnPrivileges != null; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DBNAME: + if (value == null) { + unsetDbName(); + } else { + setDbName((String)value); + } + break; + + case TABLENAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((String)value); + } + break; + + case PARTITIONNAME: + if (value == null) { + unsetPartitionName(); + } else { + setPartitionName((String)value); + } + break; + + case COLUMNPRIVILEGES: + if (value == null) { + unsetColumnPrivileges(); + } else { + setColumnPrivileges((Map)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DBNAME: + return getDbName(); + + case TABLENAME: + return getTableName(); + + case PARTITIONNAME: + return getPartitionName(); + + case COLUMNPRIVILEGES: + return getColumnPrivileges(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DBNAME: + return isSetDbName(); + case TABLENAME: + return isSetTableName(); + case PARTITIONNAME: + return isSetPartitionName(); + case COLUMNPRIVILEGES: + return isSetColumnPrivileges(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ColumnPrivilegeBag) + return this.equals((ColumnPrivilegeBag)that); + return false; + } + + public boolean equals(ColumnPrivilegeBag that) { + if (that == null) + return false; + + boolean this_present_dbName = true && this.isSetDbName(); + boolean that_present_dbName = true && that.isSetDbName(); + if (this_present_dbName || that_present_dbName) { + if (!(this_present_dbName && that_present_dbName)) + return false; + if (!this.dbName.equals(that.dbName)) + return false; + } + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_partitionName = true && this.isSetPartitionName(); + boolean that_present_partitionName = true && that.isSetPartitionName(); + if (this_present_partitionName || that_present_partitionName) { + if (!(this_present_partitionName && that_present_partitionName)) + return false; + if (!this.partitionName.equals(that.partitionName)) + return false; + } + + boolean this_present_columnPrivileges = true && this.isSetColumnPrivileges(); + boolean that_present_columnPrivileges = true && that.isSetColumnPrivileges(); + if (this_present_columnPrivileges || that_present_columnPrivileges) { + if (!(this_present_columnPrivileges && that_present_columnPrivileges)) + return false; + if (!this.columnPrivileges.equals(that.columnPrivileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 DBNAME: + if (field.type == TType.STRING) { + this.dbName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TABLENAME: + if (field.type == TType.STRING) { + this.tableName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PARTITIONNAME: + if (field.type == TType.STRING) { + this.partitionName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case COLUMNPRIVILEGES: + if (field.type == TType.MAP) { + { + TMap _map73 = iprot.readMapBegin(); + this.columnPrivileges = new HashMap(2*_map73.size); + for (int _i74 = 0; _i74 < _map73.size; ++_i74) + { + String _key75; + String _val76; + _key75 = iprot.readString(); + _val76 = iprot.readString(); + this.columnPrivileges.put(_key75, _val76); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbName != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.dbName); + oprot.writeFieldEnd(); + } + if (this.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.tableName); + oprot.writeFieldEnd(); + } + if (this.partitionName != null) { + oprot.writeFieldBegin(PARTITION_NAME_FIELD_DESC); + oprot.writeString(this.partitionName); + oprot.writeFieldEnd(); + } + if (this.columnPrivileges != null) { + oprot.writeFieldBegin(COLUMN_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.columnPrivileges.size())); + for (Map.Entry _iter77 : this.columnPrivileges.entrySet()) { + oprot.writeString(_iter77.getKey()); + oprot.writeString(_iter77.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ColumnPrivilegeBag("); + boolean first = true; + + sb.append("dbName:"); + if (this.dbName == null) { + sb.append("null"); + } else { + sb.append(this.dbName); + } + first = false; + if (!first) sb.append(", "); + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("partitionName:"); + if (this.partitionName == null) { + sb.append("null"); + } else { + sb.append(this.partitionName); + } + first = false; + if (!first) sb.append(", "); + sb.append("columnPrivileges:"); + if (this.columnPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.columnPrivileges); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + +} + Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java (revision 1037574) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java (working copy) @@ -23,6 +23,7 @@ private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); 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 PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)4); private String name; public static final int NAME = 1; @@ -30,6 +31,8 @@ public static final int DESCRIPTION = 2; private String locationUri; public static final int LOCATIONURI = 3; + private PrincipalPrivilegeSet privileges; + public static final int PRIVILEGES = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -42,6 +45,8 @@ new FieldValueMetaData(TType.STRING))); put(LOCATIONURI, new FieldMetaData("locationUri", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + put(PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); }}); static { @@ -54,12 +59,14 @@ public Database( String name, String description, - String locationUri) + String locationUri, + PrincipalPrivilegeSet privileges) { this(); this.name = name; this.description = description; this.locationUri = locationUri; + this.privileges = privileges; } /** @@ -75,6 +82,9 @@ if (other.isSetLocationUri()) { this.locationUri = other.locationUri; } + if (other.isSetPrivileges()) { + this.privileges = new PrincipalPrivilegeSet(other.privileges); + } } @Override @@ -133,6 +143,23 @@ return this.locationUri != null; } + 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case NAME: @@ -159,6 +186,14 @@ } break; + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrincipalPrivilegeSet)value); + } + break; + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -175,6 +210,9 @@ case LOCATIONURI: return getLocationUri(); + case PRIVILEGES: + return getPrivileges(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -189,6 +227,8 @@ return isSetDescription(); case LOCATIONURI: return isSetLocationUri(); + case PRIVILEGES: + return isSetPrivileges(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -234,6 +274,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; } @@ -274,6 +323,14 @@ TProtocolUtil.skip(iprot, field.type); } break; + case 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); break; @@ -304,6 +361,13 @@ oprot.writeString(this.locationUri); oprot.writeFieldEnd(); } + if (this.privileges != null) { + if (isSetPrivileges()) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + this.privileges.write(oprot); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -336,6 +400,16 @@ sb.append(this.locationUri); } 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-javabean/org/apache/hadoop/hive/metastore/api/Index.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java (revision 1037574) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java (working copy) @@ -689,15 +689,15 @@ case PARAMETERS: if (field.type == TType.MAP) { { - TMap _map44 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map44.size); - for (int _i45 = 0; _i45 < _map44.size; ++_i45) + TMap _map59 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map59.size); + for (int _i60 = 0; _i60 < _map59.size; ++_i60) { - String _key46; - String _val47; - _key46 = iprot.readString(); - _val47 = iprot.readString(); - this.parameters.put(_key46, _val47); + String _key61; + String _val62; + _key61 = iprot.readString(); + _val62 = iprot.readString(); + this.parameters.put(_key61, _val62); } iprot.readMapEnd(); } @@ -768,9 +768,9 @@ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter48 : this.parameters.entrySet()) { - oprot.writeString(_iter48.getKey()); - oprot.writeString(_iter48.getValue()); + for (Map.Entry _iter63 : this.parameters.entrySet()) { + oprot.writeString(_iter63.getKey()); + oprot.writeString(_iter63.getValue()); } oprot.writeMapEnd(); } Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (revision 1037574) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (working copy) @@ -27,6 +27,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; public static final int VALUES = 1; @@ -42,6 +43,8 @@ public static final int SD = 6; private Map parameters; public static final int PARAMETERS = 7; + private PrincipalPrivilegeSet privileges; + public static final int PRIVILEGES = 8; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -67,6 +70,8 @@ new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); + put(PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); }}); static { @@ -83,7 +88,8 @@ int createTime, int lastAccessTime, StorageDescriptor sd, - Map parameters) + Map parameters, + PrincipalPrivilegeSet privileges) { this(); this.values = values; @@ -95,6 +101,7 @@ this.__isset.lastAccessTime = true; this.sd = sd; this.parameters = parameters; + this.privileges = privileges; } /** @@ -136,6 +143,9 @@ } this.parameters = __this__parameters; } + if (other.isSetPrivileges()) { + this.privileges = new PrincipalPrivilegeSet(other.privileges); + } } @Override @@ -290,6 +300,23 @@ return this.parameters != null; } + 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case VALUES: @@ -348,6 +375,14 @@ } break; + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrincipalPrivilegeSet)value); + } + break; + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -376,6 +411,9 @@ case PARAMETERS: return getParameters(); + case PRIVILEGES: + return getPrivileges(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -398,6 +436,8 @@ return isSetSd(); case PARAMETERS: return isSetParameters(); + case PRIVILEGES: + return isSetPrivileges(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -479,6 +519,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; } @@ -501,13 +550,13 @@ case VALUES: if (field.type == TType.LIST) { { - TList _list35 = iprot.readListBegin(); - this.values = new ArrayList(_list35.size); - for (int _i36 = 0; _i36 < _list35.size; ++_i36) + TList _list50 = iprot.readListBegin(); + this.values = new ArrayList(_list50.size); + for (int _i51 = 0; _i51 < _list50.size; ++_i51) { - String _elem37; - _elem37 = iprot.readString(); - this.values.add(_elem37); + String _elem52; + _elem52 = iprot.readString(); + this.values.add(_elem52); } iprot.readListEnd(); } @@ -556,15 +605,15 @@ case PARAMETERS: if (field.type == TType.MAP) { { - TMap _map38 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map38.size); - for (int _i39 = 0; _i39 < _map38.size; ++_i39) + TMap _map53 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map53.size); + for (int _i54 = 0; _i54 < _map53.size; ++_i54) { - String _key40; - String _val41; - _key40 = iprot.readString(); - _val41 = iprot.readString(); - this.parameters.put(_key40, _val41); + String _key55; + String _val56; + _key55 = iprot.readString(); + _val56 = iprot.readString(); + this.parameters.put(_key55, _val56); } iprot.readMapEnd(); } @@ -572,6 +621,14 @@ TProtocolUtil.skip(iprot, field.type); } break; + case 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); break; @@ -591,8 +648,8 @@ oprot.writeFieldBegin(VALUES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.values.size())); - for (String _iter42 : this.values) { - oprot.writeString(_iter42); + for (String _iter57 : this.values) { + oprot.writeString(_iter57); } oprot.writeListEnd(); } @@ -623,14 +680,21 @@ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter43 : this.parameters.entrySet()) { - oprot.writeString(_iter43.getKey()); - oprot.writeString(_iter43.getValue()); + for (Map.Entry _iter58 : this.parameters.entrySet()) { + oprot.writeString(_iter58.getKey()); + oprot.writeString(_iter58.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(); } @@ -687,6 +751,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-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java (revision 0) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/PrincipalPrivilegeSet.java (revision 0) @@ -0,0 +1,481 @@ +/** + * 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.Set; +import java.util.HashSet; +import java.util.Collections; +import org.apache.log4j.Logger; + +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +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; + public static final int USERPRIVILEGES = 1; + private Map groupPrivileges; + public static final int GROUPPRIVILEGES = 2; + private Map rolePrivileges; + public static final int ROLEPRIVILEGES = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(USERPRIVILEGES, new FieldMetaData("userPrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + put(GROUPPRIVILEGES, new FieldMetaData("groupPrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + put(ROLEPRIVILEGES, new FieldMetaData("rolePrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(PrincipalPrivilegeSet.class, metaDataMap); + } + + public PrincipalPrivilegeSet() { + } + + public PrincipalPrivilegeSet( + Map userPrivileges, + Map groupPrivileges, + Map rolePrivileges) + { + this(); + this.userPrivileges = userPrivileges; + this.groupPrivileges = groupPrivileges; + this.rolePrivileges = rolePrivileges; + } + + /** + * Performs a deep copy on other. + */ + public PrincipalPrivilegeSet(PrincipalPrivilegeSet other) { + if (other.isSetUserPrivileges()) { + Map __this__userPrivileges = new HashMap(); + for (Map.Entry other_element : other.userPrivileges.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__userPrivileges_copy_key = other_element_key; + + String __this__userPrivileges_copy_value = other_element_value; + + __this__userPrivileges.put(__this__userPrivileges_copy_key, __this__userPrivileges_copy_value); + } + this.userPrivileges = __this__userPrivileges; + } + if (other.isSetGroupPrivileges()) { + Map __this__groupPrivileges = new HashMap(); + for (Map.Entry other_element : other.groupPrivileges.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__groupPrivileges_copy_key = other_element_key; + + String __this__groupPrivileges_copy_value = other_element_value; + + __this__groupPrivileges.put(__this__groupPrivileges_copy_key, __this__groupPrivileges_copy_value); + } + this.groupPrivileges = __this__groupPrivileges; + } + if (other.isSetRolePrivileges()) { + Map __this__rolePrivileges = new HashMap(); + for (Map.Entry other_element : other.rolePrivileges.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__rolePrivileges_copy_key = other_element_key; + + String __this__rolePrivileges_copy_value = other_element_value; + + __this__rolePrivileges.put(__this__rolePrivileges_copy_key, __this__rolePrivileges_copy_value); + } + this.rolePrivileges = __this__rolePrivileges; + } + } + + @Override + public PrincipalPrivilegeSet clone() { + return new PrincipalPrivilegeSet(this); + } + + public int getUserPrivilegesSize() { + return (this.userPrivileges == null) ? 0 : this.userPrivileges.size(); + } + + public void putToUserPrivileges(String key, String val) { + if (this.userPrivileges == null) { + this.userPrivileges = new HashMap(); + } + this.userPrivileges.put(key, val); + } + + public Map getUserPrivileges() { + return this.userPrivileges; + } + + public void setUserPrivileges(Map userPrivileges) { + this.userPrivileges = userPrivileges; + } + + public void unsetUserPrivileges() { + this.userPrivileges = null; + } + + // Returns true if field userPrivileges is set (has been asigned a value) and false otherwise + public boolean isSetUserPrivileges() { + return this.userPrivileges != null; + } + + public int getGroupPrivilegesSize() { + return (this.groupPrivileges == null) ? 0 : this.groupPrivileges.size(); + } + + public void putToGroupPrivileges(String key, String val) { + if (this.groupPrivileges == null) { + this.groupPrivileges = new HashMap(); + } + this.groupPrivileges.put(key, val); + } + + public Map getGroupPrivileges() { + return this.groupPrivileges; + } + + public void setGroupPrivileges(Map groupPrivileges) { + this.groupPrivileges = groupPrivileges; + } + + public void unsetGroupPrivileges() { + this.groupPrivileges = null; + } + + // Returns true if field groupPrivileges is set (has been asigned a value) and false otherwise + public boolean isSetGroupPrivileges() { + return this.groupPrivileges != null; + } + + public int getRolePrivilegesSize() { + return (this.rolePrivileges == null) ? 0 : this.rolePrivileges.size(); + } + + public void putToRolePrivileges(String key, String val) { + if (this.rolePrivileges == null) { + this.rolePrivileges = new HashMap(); + } + this.rolePrivileges.put(key, val); + } + + public Map getRolePrivileges() { + return this.rolePrivileges; + } + + public void setRolePrivileges(Map rolePrivileges) { + this.rolePrivileges = rolePrivileges; + } + + public void unsetRolePrivileges() { + this.rolePrivileges = null; + } + + // Returns true if field rolePrivileges is set (has been asigned a value) and false otherwise + public boolean isSetRolePrivileges() { + return this.rolePrivileges != null; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case USERPRIVILEGES: + if (value == null) { + unsetUserPrivileges(); + } else { + setUserPrivileges((Map)value); + } + break; + + case GROUPPRIVILEGES: + if (value == null) { + unsetGroupPrivileges(); + } else { + setGroupPrivileges((Map)value); + } + break; + + case ROLEPRIVILEGES: + if (value == null) { + unsetRolePrivileges(); + } else { + setRolePrivileges((Map)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case USERPRIVILEGES: + return getUserPrivileges(); + + case GROUPPRIVILEGES: + return getGroupPrivileges(); + + case ROLEPRIVILEGES: + return getRolePrivileges(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case USERPRIVILEGES: + return isSetUserPrivileges(); + case GROUPPRIVILEGES: + return isSetGroupPrivileges(); + case ROLEPRIVILEGES: + return isSetRolePrivileges(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 USERPRIVILEGES: + if (field.type == TType.MAP) { + { + TMap _map4 = iprot.readMapBegin(); + this.userPrivileges = new HashMap(2*_map4.size); + for (int _i5 = 0; _i5 < _map4.size; ++_i5) + { + String _key6; + String _val7; + _key6 = iprot.readString(); + _val7 = iprot.readString(); + this.userPrivileges.put(_key6, _val7); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GROUPPRIVILEGES: + if (field.type == TType.MAP) { + { + TMap _map8 = iprot.readMapBegin(); + this.groupPrivileges = new HashMap(2*_map8.size); + for (int _i9 = 0; _i9 < _map8.size; ++_i9) + { + String _key10; + String _val11; + _key10 = iprot.readString(); + _val11 = iprot.readString(); + this.groupPrivileges.put(_key10, _val11); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case ROLEPRIVILEGES: + if (field.type == TType.MAP) { + { + TMap _map12 = iprot.readMapBegin(); + this.rolePrivileges = new HashMap(2*_map12.size); + for (int _i13 = 0; _i13 < _map12.size; ++_i13) + { + String _key14; + String _val15; + _key14 = iprot.readString(); + _val15 = iprot.readString(); + this.rolePrivileges.put(_key14, _val15); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.userPrivileges != null) { + oprot.writeFieldBegin(USER_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.userPrivileges.size())); + for (Map.Entry _iter16 : this.userPrivileges.entrySet()) { + oprot.writeString(_iter16.getKey()); + oprot.writeString(_iter16.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.groupPrivileges != null) { + oprot.writeFieldBegin(GROUP_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.groupPrivileges.size())); + for (Map.Entry _iter17 : this.groupPrivileges.entrySet()) { + oprot.writeString(_iter17.getKey()); + oprot.writeString(_iter17.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.rolePrivileges != null) { + oprot.writeFieldBegin(ROLE_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.rolePrivileges.size())); + for (Map.Entry _iter18 : this.rolePrivileges.entrySet()) { + oprot.writeString(_iter18.getKey()); + oprot.writeString(_iter18.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("PrincipalPrivilegeSet("); + boolean first = true; + + sb.append("userPrivileges:"); + if (this.userPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.userPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("groupPrivileges:"); + if (this.groupPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.groupPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("rolePrivileges:"); + if (this.rolePrivileges == null) { + sb.append("null"); + } else { + sb.append(this.rolePrivileges); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + +} + Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java (revision 0) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeBag.java (revision 0) @@ -0,0 +1,659 @@ +/** + * 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.Set; +import java.util.HashSet; +import java.util.Collections; +import org.apache.log4j.Logger; + +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; + +public class PrivilegeBag implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("PrivilegeBag"); + private static final TField USER_PRIVILEGES_FIELD_DESC = new TField("userPrivileges", TType.STRING, (short)1); + private static final TField DB_PRIVILEGES_FIELD_DESC = new TField("dbPrivileges", TType.MAP, (short)2); + private static final TField TABLE_PRIVILEGES_FIELD_DESC = new TField("tablePrivileges", TType.MAP, (short)3); + private static final TField PARTITION_PRIVILEGES_FIELD_DESC = new TField("partitionPrivileges", TType.MAP, (short)4); + private static final TField COLUMN_PRIVILEGES_FIELD_DESC = new TField("columnPrivileges", TType.LIST, (short)5); + + private String userPrivileges; + public static final int USERPRIVILEGES = 1; + private Map dbPrivileges; + public static final int DBPRIVILEGES = 2; + private Map tablePrivileges; + public static final int TABLEPRIVILEGES = 3; + private Map partitionPrivileges; + public static final int PARTITIONPRIVILEGES = 4; + private List columnPrivileges; + public static final int COLUMNPRIVILEGES = 5; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(USERPRIVILEGES, new FieldMetaData("userPrivileges", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(DBPRIVILEGES, new FieldMetaData("dbPrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new StructMetaData(TType.STRUCT, Database.class), + new FieldValueMetaData(TType.STRING)))); + put(TABLEPRIVILEGES, new FieldMetaData("tablePrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new StructMetaData(TType.STRUCT, Table.class), + new FieldValueMetaData(TType.STRING)))); + put(PARTITIONPRIVILEGES, new FieldMetaData("partitionPrivileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new StructMetaData(TType.STRUCT, Partition.class), + new FieldValueMetaData(TType.STRING)))); + put(COLUMNPRIVILEGES, new FieldMetaData("columnPrivileges", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, ColumnPrivilegeBag.class)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(PrivilegeBag.class, metaDataMap); + } + + public PrivilegeBag() { + } + + public PrivilegeBag( + String userPrivileges, + Map dbPrivileges, + Map tablePrivileges, + Map partitionPrivileges, + List columnPrivileges) + { + this(); + this.userPrivileges = userPrivileges; + this.dbPrivileges = dbPrivileges; + this.tablePrivileges = tablePrivileges; + this.partitionPrivileges = partitionPrivileges; + this.columnPrivileges = columnPrivileges; + } + + /** + * Performs a deep copy on other. + */ + public PrivilegeBag(PrivilegeBag other) { + if (other.isSetUserPrivileges()) { + this.userPrivileges = other.userPrivileges; + } + if (other.isSetDbPrivileges()) { + Map __this__dbPrivileges = new HashMap(); + for (Map.Entry other_element : other.dbPrivileges.entrySet()) { + + Database other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + Database __this__dbPrivileges_copy_key = new Database(other_element_key); + + String __this__dbPrivileges_copy_value = other_element_value; + + __this__dbPrivileges.put(__this__dbPrivileges_copy_key, __this__dbPrivileges_copy_value); + } + this.dbPrivileges = __this__dbPrivileges; + } + if (other.isSetTablePrivileges()) { + Map __this__tablePrivileges = new HashMap(); + for (Map.Entry other_element : other.tablePrivileges.entrySet()) { + + Table other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + Table __this__tablePrivileges_copy_key = new Table(other_element_key); + + String __this__tablePrivileges_copy_value = other_element_value; + + __this__tablePrivileges.put(__this__tablePrivileges_copy_key, __this__tablePrivileges_copy_value); + } + this.tablePrivileges = __this__tablePrivileges; + } + if (other.isSetPartitionPrivileges()) { + Map __this__partitionPrivileges = new HashMap(); + for (Map.Entry other_element : other.partitionPrivileges.entrySet()) { + + Partition other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + Partition __this__partitionPrivileges_copy_key = new Partition(other_element_key); + + String __this__partitionPrivileges_copy_value = other_element_value; + + __this__partitionPrivileges.put(__this__partitionPrivileges_copy_key, __this__partitionPrivileges_copy_value); + } + this.partitionPrivileges = __this__partitionPrivileges; + } + if (other.isSetColumnPrivileges()) { + List __this__columnPrivileges = new ArrayList(); + for (ColumnPrivilegeBag other_element : other.columnPrivileges) { + __this__columnPrivileges.add(new ColumnPrivilegeBag(other_element)); + } + this.columnPrivileges = __this__columnPrivileges; + } + } + + @Override + public PrivilegeBag clone() { + return new PrivilegeBag(this); + } + + public String getUserPrivileges() { + return this.userPrivileges; + } + + public void setUserPrivileges(String userPrivileges) { + this.userPrivileges = userPrivileges; + } + + public void unsetUserPrivileges() { + this.userPrivileges = null; + } + + // Returns true if field userPrivileges is set (has been asigned a value) and false otherwise + public boolean isSetUserPrivileges() { + return this.userPrivileges != null; + } + + public int getDbPrivilegesSize() { + return (this.dbPrivileges == null) ? 0 : this.dbPrivileges.size(); + } + + public void putToDbPrivileges(Database key, String val) { + if (this.dbPrivileges == null) { + this.dbPrivileges = new HashMap(); + } + this.dbPrivileges.put(key, val); + } + + public Map getDbPrivileges() { + return this.dbPrivileges; + } + + public void setDbPrivileges(Map dbPrivileges) { + this.dbPrivileges = dbPrivileges; + } + + public void unsetDbPrivileges() { + this.dbPrivileges = null; + } + + // Returns true if field dbPrivileges is set (has been asigned a value) and false otherwise + public boolean isSetDbPrivileges() { + return this.dbPrivileges != null; + } + + public int getTablePrivilegesSize() { + return (this.tablePrivileges == null) ? 0 : this.tablePrivileges.size(); + } + + public void putToTablePrivileges(Table key, String val) { + if (this.tablePrivileges == null) { + this.tablePrivileges = new HashMap(); + } + this.tablePrivileges.put(key, val); + } + + public Map getTablePrivileges() { + return this.tablePrivileges; + } + + public void setTablePrivileges(Map tablePrivileges) { + this.tablePrivileges = tablePrivileges; + } + + public void unsetTablePrivileges() { + this.tablePrivileges = null; + } + + // Returns true if field tablePrivileges is set (has been asigned a value) and false otherwise + public boolean isSetTablePrivileges() { + return this.tablePrivileges != null; + } + + public int getPartitionPrivilegesSize() { + return (this.partitionPrivileges == null) ? 0 : this.partitionPrivileges.size(); + } + + public void putToPartitionPrivileges(Partition key, String val) { + if (this.partitionPrivileges == null) { + this.partitionPrivileges = new HashMap(); + } + this.partitionPrivileges.put(key, val); + } + + public Map getPartitionPrivileges() { + return this.partitionPrivileges; + } + + public void setPartitionPrivileges(Map partitionPrivileges) { + this.partitionPrivileges = partitionPrivileges; + } + + public void unsetPartitionPrivileges() { + this.partitionPrivileges = null; + } + + // Returns true if field partitionPrivileges is set (has been asigned a value) and false otherwise + public boolean isSetPartitionPrivileges() { + return this.partitionPrivileges != null; + } + + public int getColumnPrivilegesSize() { + return (this.columnPrivileges == null) ? 0 : this.columnPrivileges.size(); + } + + public java.util.Iterator getColumnPrivilegesIterator() { + return (this.columnPrivileges == null) ? null : this.columnPrivileges.iterator(); + } + + public void addToColumnPrivileges(ColumnPrivilegeBag elem) { + if (this.columnPrivileges == null) { + this.columnPrivileges = new ArrayList(); + } + this.columnPrivileges.add(elem); + } + + public List getColumnPrivileges() { + return this.columnPrivileges; + } + + public void setColumnPrivileges(List columnPrivileges) { + this.columnPrivileges = columnPrivileges; + } + + public void unsetColumnPrivileges() { + this.columnPrivileges = null; + } + + // Returns true if field columnPrivileges is set (has been asigned a value) and false otherwise + public boolean isSetColumnPrivileges() { + return this.columnPrivileges != null; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case USERPRIVILEGES: + if (value == null) { + unsetUserPrivileges(); + } else { + setUserPrivileges((String)value); + } + break; + + case DBPRIVILEGES: + if (value == null) { + unsetDbPrivileges(); + } else { + setDbPrivileges((Map)value); + } + break; + + case TABLEPRIVILEGES: + if (value == null) { + unsetTablePrivileges(); + } else { + setTablePrivileges((Map)value); + } + break; + + case PARTITIONPRIVILEGES: + if (value == null) { + unsetPartitionPrivileges(); + } else { + setPartitionPrivileges((Map)value); + } + break; + + case COLUMNPRIVILEGES: + if (value == null) { + unsetColumnPrivileges(); + } else { + setColumnPrivileges((List)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case USERPRIVILEGES: + return getUserPrivileges(); + + case DBPRIVILEGES: + return getDbPrivileges(); + + case TABLEPRIVILEGES: + return getTablePrivileges(); + + case PARTITIONPRIVILEGES: + return getPartitionPrivileges(); + + case COLUMNPRIVILEGES: + return getColumnPrivileges(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case USERPRIVILEGES: + return isSetUserPrivileges(); + case DBPRIVILEGES: + return isSetDbPrivileges(); + case TABLEPRIVILEGES: + return isSetTablePrivileges(); + case PARTITIONPRIVILEGES: + return isSetPartitionPrivileges(); + case COLUMNPRIVILEGES: + return isSetColumnPrivileges(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PrivilegeBag) + return this.equals((PrivilegeBag)that); + return false; + } + + public boolean equals(PrivilegeBag that) { + if (that == null) + return false; + + boolean this_present_userPrivileges = true && this.isSetUserPrivileges(); + boolean that_present_userPrivileges = true && that.isSetUserPrivileges(); + if (this_present_userPrivileges || that_present_userPrivileges) { + if (!(this_present_userPrivileges && that_present_userPrivileges)) + return false; + if (!this.userPrivileges.equals(that.userPrivileges)) + return false; + } + + boolean this_present_dbPrivileges = true && this.isSetDbPrivileges(); + boolean that_present_dbPrivileges = true && that.isSetDbPrivileges(); + if (this_present_dbPrivileges || that_present_dbPrivileges) { + if (!(this_present_dbPrivileges && that_present_dbPrivileges)) + return false; + if (!this.dbPrivileges.equals(that.dbPrivileges)) + return false; + } + + boolean this_present_tablePrivileges = true && this.isSetTablePrivileges(); + boolean that_present_tablePrivileges = true && that.isSetTablePrivileges(); + if (this_present_tablePrivileges || that_present_tablePrivileges) { + if (!(this_present_tablePrivileges && that_present_tablePrivileges)) + return false; + if (!this.tablePrivileges.equals(that.tablePrivileges)) + return false; + } + + boolean this_present_partitionPrivileges = true && this.isSetPartitionPrivileges(); + boolean that_present_partitionPrivileges = true && that.isSetPartitionPrivileges(); + if (this_present_partitionPrivileges || that_present_partitionPrivileges) { + if (!(this_present_partitionPrivileges && that_present_partitionPrivileges)) + return false; + if (!this.partitionPrivileges.equals(that.partitionPrivileges)) + return false; + } + + boolean this_present_columnPrivileges = true && this.isSetColumnPrivileges(); + boolean that_present_columnPrivileges = true && that.isSetColumnPrivileges(); + if (this_present_columnPrivileges || that_present_columnPrivileges) { + if (!(this_present_columnPrivileges && that_present_columnPrivileges)) + return false; + if (!this.columnPrivileges.equals(that.columnPrivileges)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 USERPRIVILEGES: + if (field.type == TType.STRING) { + this.userPrivileges = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DBPRIVILEGES: + if (field.type == TType.MAP) { + { + TMap _map78 = iprot.readMapBegin(); + this.dbPrivileges = new HashMap(2*_map78.size); + for (int _i79 = 0; _i79 < _map78.size; ++_i79) + { + Database _key80; + String _val81; + _key80 = new Database(); + _key80.read(iprot); + _val81 = iprot.readString(); + this.dbPrivileges.put(_key80, _val81); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TABLEPRIVILEGES: + if (field.type == TType.MAP) { + { + TMap _map82 = iprot.readMapBegin(); + this.tablePrivileges = new HashMap(2*_map82.size); + for (int _i83 = 0; _i83 < _map82.size; ++_i83) + { + Table _key84; + String _val85; + _key84 = new Table(); + _key84.read(iprot); + _val85 = iprot.readString(); + this.tablePrivileges.put(_key84, _val85); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PARTITIONPRIVILEGES: + if (field.type == TType.MAP) { + { + TMap _map86 = iprot.readMapBegin(); + this.partitionPrivileges = new HashMap(2*_map86.size); + for (int _i87 = 0; _i87 < _map86.size; ++_i87) + { + Partition _key88; + String _val89; + _key88 = new Partition(); + _key88.read(iprot); + _val89 = iprot.readString(); + this.partitionPrivileges.put(_key88, _val89); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case COLUMNPRIVILEGES: + if (field.type == TType.LIST) { + { + TList _list90 = iprot.readListBegin(); + this.columnPrivileges = new ArrayList(_list90.size); + for (int _i91 = 0; _i91 < _list90.size; ++_i91) + { + ColumnPrivilegeBag _elem92; + _elem92 = new ColumnPrivilegeBag(); + _elem92.read(iprot); + this.columnPrivileges.add(_elem92); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.userPrivileges != null) { + oprot.writeFieldBegin(USER_PRIVILEGES_FIELD_DESC); + oprot.writeString(this.userPrivileges); + oprot.writeFieldEnd(); + } + if (this.dbPrivileges != null) { + oprot.writeFieldBegin(DB_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRUCT, TType.STRING, this.dbPrivileges.size())); + for (Map.Entry _iter93 : this.dbPrivileges.entrySet()) { + _iter93.getKey().write(oprot); + oprot.writeString(_iter93.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.tablePrivileges != null) { + oprot.writeFieldBegin(TABLE_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRUCT, TType.STRING, this.tablePrivileges.size())); + for (Map.Entry _iter94 : this.tablePrivileges.entrySet()) { + _iter94.getKey().write(oprot); + oprot.writeString(_iter94.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.partitionPrivileges != null) { + oprot.writeFieldBegin(PARTITION_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRUCT, TType.STRING, this.partitionPrivileges.size())); + for (Map.Entry _iter95 : this.partitionPrivileges.entrySet()) { + _iter95.getKey().write(oprot); + oprot.writeString(_iter95.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.columnPrivileges != null) { + oprot.writeFieldBegin(COLUMN_PRIVILEGES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.columnPrivileges.size())); + for (ColumnPrivilegeBag _iter96 : this.columnPrivileges) { + _iter96.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("PrivilegeBag("); + boolean first = true; + + sb.append("userPrivileges:"); + if (this.userPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.userPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("dbPrivileges:"); + if (this.dbPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.dbPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("tablePrivileges:"); + if (this.tablePrivileges == null) { + sb.append("null"); + } else { + sb.append(this.tablePrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("partitionPrivileges:"); + if (this.partitionPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.partitionPrivileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("columnPrivileges:"); + if (this.columnPrivileges == null) { + sb.append("null"); + } else { + sb.append(this.columnPrivileges); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + +} + Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java (revision 0) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Role.java (revision 0) @@ -0,0 +1,416 @@ +/** + * 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.Set; +import java.util.HashSet; +import java.util.Collections; +import org.apache.log4j.Logger; + +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; + +public class Role implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("Role"); + private static final TField ROLE_NAME_FIELD_DESC = new TField("roleName", TType.STRING, (short)1); + private static final TField DATABASE_FIELD_DESC = new TField("database", TType.STRUCT, (short)2); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)3); + private static final TField OWNER_NAME_FIELD_DESC = new TField("ownerName", TType.STRING, (short)4); + + private String roleName; + public static final int ROLENAME = 1; + private Database database; + public static final int DATABASE = 2; + private int createTime; + public static final int CREATETIME = 3; + private String ownerName; + public static final int OWNERNAME = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean createTime = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(ROLENAME, new FieldMetaData("roleName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Database.class))); + put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(OWNERNAME, new FieldMetaData("ownerName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(Role.class, metaDataMap); + } + + public Role() { + } + + public Role( + String roleName, + Database database, + int createTime, + String ownerName) + { + this(); + this.roleName = roleName; + this.database = database; + this.createTime = createTime; + this.__isset.createTime = true; + this.ownerName = ownerName; + } + + /** + * Performs a deep copy on other. + */ + public Role(Role other) { + if (other.isSetRoleName()) { + this.roleName = other.roleName; + } + if (other.isSetDatabase()) { + this.database = new Database(other.database); + } + __isset.createTime = other.__isset.createTime; + this.createTime = other.createTime; + if (other.isSetOwnerName()) { + this.ownerName = other.ownerName; + } + } + + @Override + public Role clone() { + return new Role(this); + } + + 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 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 int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + this.__isset.createTime = true; + } + + public void unsetCreateTime() { + this.__isset.createTime = false; + } + + // Returns true if field createTime is set (has been asigned a value) and false otherwise + public boolean isSetCreateTime() { + return this.__isset.createTime; + } + + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case ROLENAME: + if (value == null) { + unsetRoleName(); + } else { + setRoleName((String)value); + } + break; + + case DATABASE: + if (value == null) { + unsetDatabase(); + } else { + setDatabase((Database)value); + } + break; + + case CREATETIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case OWNERNAME: + if (value == null) { + unsetOwnerName(); + } else { + setOwnerName((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case ROLENAME: + return getRoleName(); + + case DATABASE: + return getDatabase(); + + case CREATETIME: + return new Integer(getCreateTime()); + + case OWNERNAME: + return getOwnerName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case ROLENAME: + return isSetRoleName(); + case DATABASE: + return isSetDatabase(); + case CREATETIME: + return isSetCreateTime(); + case OWNERNAME: + return isSetOwnerName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Role) + return this.equals((Role)that); + return false; + } + + public boolean equals(Role that) { + if (that == null) + return false; + + boolean this_present_roleName = true && this.isSetRoleName(); + boolean that_present_roleName = true && that.isSetRoleName(); + if (this_present_roleName || that_present_roleName) { + if (!(this_present_roleName && that_present_roleName)) + return false; + if (!this.roleName.equals(that.roleName)) + return false; + } + + boolean this_present_database = true && this.isSetDatabase(); + boolean that_present_database = true && that.isSetDatabase(); + if (this_present_database || that_present_database) { + if (!(this_present_database && that_present_database)) + return false; + if (!this.database.equals(that.database)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_ownerName = true && this.isSetOwnerName(); + boolean that_present_ownerName = true && that.isSetOwnerName(); + if (this_present_ownerName || that_present_ownerName) { + if (!(this_present_ownerName && that_present_ownerName)) + return false; + if (!this.ownerName.equals(that.ownerName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + 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 ROLENAME: + if (field.type == TType.STRING) { + this.roleName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DATABASE: + if (field.type == TType.STRUCT) { + this.database = new Database(); + this.database.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case CREATETIME: + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + this.__isset.createTime = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case OWNERNAME: + if (field.type == TType.STRING) { + this.ownerName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.roleName != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.roleName); + oprot.writeFieldEnd(); + } + if (this.database != null) { + oprot.writeFieldBegin(DATABASE_FIELD_DESC); + this.database.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + if (this.ownerName != null) { + oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); + oprot.writeString(this.ownerName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Role("); + boolean first = true; + + sb.append("roleName:"); + if (this.roleName == null) { + sb.append("null"); + } else { + sb.append(this.roleName); + } + first = false; + if (!first) sb.append(", "); + sb.append("database:"); + if (this.database == null) { + sb.append("null"); + } else { + sb.append(this.database); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("ownerName:"); + if (this.ownerName == null) { + sb.append("null"); + } else { + sb.append(this.ownerName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + +} + Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java (revision 1037574) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java (working copy) @@ -252,14 +252,14 @@ case FIELDSCHEMAS: if (field.type == TType.LIST) { { - TList _list49 = iprot.readListBegin(); - this.fieldSchemas = new ArrayList(_list49.size); - for (int _i50 = 0; _i50 < _list49.size; ++_i50) + TList _list64 = iprot.readListBegin(); + this.fieldSchemas = new ArrayList(_list64.size); + for (int _i65 = 0; _i65 < _list64.size; ++_i65) { - FieldSchema _elem51; - _elem51 = new FieldSchema(); - _elem51.read(iprot); - this.fieldSchemas.add(_elem51); + FieldSchema _elem66; + _elem66 = new FieldSchema(); + _elem66.read(iprot); + this.fieldSchemas.add(_elem66); } iprot.readListEnd(); } @@ -270,15 +270,15 @@ case PROPERTIES: if (field.type == TType.MAP) { { - TMap _map52 = iprot.readMapBegin(); - this.properties = new HashMap(2*_map52.size); - for (int _i53 = 0; _i53 < _map52.size; ++_i53) + TMap _map67 = iprot.readMapBegin(); + this.properties = new HashMap(2*_map67.size); + for (int _i68 = 0; _i68 < _map67.size; ++_i68) { - String _key54; - String _val55; - _key54 = iprot.readString(); - _val55 = iprot.readString(); - this.properties.put(_key54, _val55); + String _key69; + String _val70; + _key69 = iprot.readString(); + _val70 = iprot.readString(); + this.properties.put(_key69, _val70); } iprot.readMapEnd(); } @@ -305,8 +305,8 @@ oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.fieldSchemas.size())); - for (FieldSchema _iter56 : this.fieldSchemas) { - _iter56.write(oprot); + for (FieldSchema _iter71 : this.fieldSchemas) { + _iter71.write(oprot); } oprot.writeListEnd(); } @@ -316,9 +316,9 @@ oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.properties.size())); - for (Map.Entry _iter57 : this.properties.entrySet()) { - oprot.writeString(_iter57.getKey()); - oprot.writeString(_iter57.getValue()); + for (Map.Entry _iter72 : this.properties.entrySet()) { + oprot.writeString(_iter72.getKey()); + oprot.writeString(_iter72.getValue()); } oprot.writeMapEnd(); } Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityColumn.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityColumn.java (revision 0) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityColumn.java (revision 0) @@ -0,0 +1,756 @@ +/** + * 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.Set; +import java.util.HashSet; +import java.util.Collections; +import org.apache.log4j.Logger; + +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; + +public class SecurityColumn implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("SecurityColumn"); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principalName", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("isRole", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("isGroup", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRING, (short)4); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)5); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)6); + private static final TField TABLE_FIELD_DESC = new TField("table", TType.STRUCT, (short)7); + private static final TField PARTITION_FIELD_DESC = new TField("partition", TType.STRUCT, (short)8); + private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)9); + + private String principalName; + public static final int PRINCIPALNAME = 1; + private boolean isRole; + public static final int ISROLE = 2; + private boolean isGroup; + public static final int ISGROUP = 3; + private String privileges; + public static final int PRIVILEGES = 4; + private int createTime; + public static final int CREATETIME = 5; + private String grantor; + public static final int GRANTOR = 6; + private Table table; + public static final int TABLE = 7; + private Partition partition; + public static final int PARTITION = 8; + private String column; + public static final int COLUMN = 9; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean isRole = false; + public boolean isGroup = false; + public boolean createTime = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(PRINCIPALNAME, new FieldMetaData("principalName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ISROLE, new FieldMetaData("isRole", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(ISGROUP, new FieldMetaData("isGroup", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TABLE, new FieldMetaData("table", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + put(PARTITION, new FieldMetaData("partition", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + put(COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(SecurityColumn.class, metaDataMap); + } + + public SecurityColumn() { + } + + public SecurityColumn( + String principalName, + boolean isRole, + boolean isGroup, + String privileges, + int createTime, + String grantor, + Table table, + Partition partition, + String column) + { + this(); + this.principalName = principalName; + this.isRole = isRole; + this.__isset.isRole = true; + this.isGroup = isGroup; + this.__isset.isGroup = true; + this.privileges = privileges; + this.createTime = createTime; + this.__isset.createTime = true; + this.grantor = grantor; + this.table = table; + this.partition = partition; + this.column = column; + } + + /** + * Performs a deep copy on other. + */ + public SecurityColumn(SecurityColumn other) { + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + __isset.isRole = other.__isset.isRole; + this.isRole = other.isRole; + __isset.isGroup = other.__isset.isGroup; + this.isGroup = other.isGroup; + if (other.isSetPrivileges()) { + this.privileges = other.privileges; + } + __isset.createTime = other.__isset.createTime; + this.createTime = other.createTime; + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + if (other.isSetTable()) { + this.table = new Table(other.table); + } + if (other.isSetPartition()) { + this.partition = new Partition(other.partition); + } + if (other.isSetColumn()) { + this.column = other.column; + } + } + + @Override + public SecurityColumn clone() { + return new SecurityColumn(this); + } + + 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 boolean isIsRole() { + return this.isRole; + } + + public void setIsRole(boolean isRole) { + this.isRole = isRole; + this.__isset.isRole = true; + } + + public void unsetIsRole() { + this.__isset.isRole = false; + } + + // Returns true if field isRole is set (has been asigned a value) and false otherwise + public boolean isSetIsRole() { + return this.__isset.isRole; + } + + public boolean isIsGroup() { + return this.isGroup; + } + + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + this.__isset.isGroup = true; + } + + public void unsetIsGroup() { + this.__isset.isGroup = false; + } + + // Returns true if field isGroup is set (has been asigned a value) and false otherwise + public boolean isSetIsGroup() { + return this.__isset.isGroup; + } + + public String getPrivileges() { + return this.privileges; + } + + public void setPrivileges(String privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + // Returns true if field privileges is set (has been asigned a value) and false otherwise + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + this.__isset.createTime = true; + } + + public void unsetCreateTime() { + this.__isset.createTime = false; + } + + // Returns true if field createTime is set (has been asigned a value) and false otherwise + public boolean isSetCreateTime() { + return this.__isset.createTime; + } + + 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 Table getTable() { + return this.table; + } + + public void setTable(Table table) { + this.table = table; + } + + public void unsetTable() { + this.table = null; + } + + // Returns true if field table is set (has been asigned a value) and false otherwise + public boolean isSetTable() { + return this.table != null; + } + + public Partition getPartition() { + return this.partition; + } + + public void setPartition(Partition partition) { + this.partition = partition; + } + + public void unsetPartition() { + this.partition = null; + } + + // Returns true if field partition is set (has been asigned a value) and false otherwise + public boolean isSetPartition() { + return this.partition != null; + } + + public String getColumn() { + return this.column; + } + + public void setColumn(String column) { + this.column = column; + } + + public void unsetColumn() { + this.column = null; + } + + // Returns true if field column is set (has been asigned a value) and false otherwise + public boolean isSetColumn() { + return this.column != null; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case PRINCIPALNAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case ISROLE: + if (value == null) { + unsetIsRole(); + } else { + setIsRole((Boolean)value); + } + break; + + case ISGROUP: + if (value == null) { + unsetIsGroup(); + } else { + setIsGroup((Boolean)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((String)value); + } + break; + + case CREATETIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; + + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((Table)value); + } + break; + + case PARTITION: + if (value == null) { + unsetPartition(); + } else { + setPartition((Partition)value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case PRINCIPALNAME: + return getPrincipalName(); + + case ISROLE: + return new Boolean(isIsRole()); + + case ISGROUP: + return new Boolean(isIsGroup()); + + case PRIVILEGES: + return getPrivileges(); + + case CREATETIME: + return new Integer(getCreateTime()); + + case GRANTOR: + return getGrantor(); + + case TABLE: + return getTable(); + + case PARTITION: + return getPartition(); + + case COLUMN: + return getColumn(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case PRINCIPALNAME: + return isSetPrincipalName(); + case ISROLE: + return isSetIsRole(); + case ISGROUP: + return isSetIsGroup(); + case PRIVILEGES: + return isSetPrivileges(); + case CREATETIME: + return isSetCreateTime(); + case GRANTOR: + return isSetGrantor(); + case TABLE: + return isSetTable(); + case PARTITION: + return isSetPartition(); + case COLUMN: + return isSetColumn(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SecurityColumn) + return this.equals((SecurityColumn)that); + return false; + } + + public boolean equals(SecurityColumn that) { + if (that == null) + return false; + + boolean this_present_principalName = true && this.isSetPrincipalName(); + boolean that_present_principalName = true && that.isSetPrincipalName(); + if (this_present_principalName || that_present_principalName) { + if (!(this_present_principalName && that_present_principalName)) + return false; + if (!this.principalName.equals(that.principalName)) + return false; + } + + boolean this_present_isRole = true; + boolean that_present_isRole = true; + if (this_present_isRole || that_present_isRole) { + if (!(this_present_isRole && that_present_isRole)) + return false; + if (this.isRole != that.isRole) + return false; + } + + boolean this_present_isGroup = true; + boolean that_present_isGroup = true; + if (this_present_isGroup || that_present_isGroup) { + if (!(this_present_isGroup && that_present_isGroup)) + return false; + if (this.isGroup != that.isGroup) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) + return false; + } + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_partition = true && this.isSetPartition(); + boolean that_present_partition = true && that.isSetPartition(); + if (this_present_partition || that_present_partition) { + if (!(this_present_partition && that_present_partition)) + return false; + if (!this.partition.equals(that.partition)) + return false; + } + + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) + return false; + if (!this.column.equals(that.column)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 PRINCIPALNAME: + if (field.type == TType.STRING) { + this.principalName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case ISROLE: + if (field.type == TType.BOOL) { + this.isRole = iprot.readBool(); + this.__isset.isRole = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case ISGROUP: + if (field.type == TType.BOOL) { + this.isGroup = iprot.readBool(); + this.__isset.isGroup = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PRIVILEGES: + if (field.type == TType.STRING) { + this.privileges = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case CREATETIME: + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + this.__isset.createTime = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GRANTOR: + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TABLE: + if (field.type == TType.STRUCT) { + this.table = new Table(); + this.table.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PARTITION: + if (field.type == TType.STRUCT) { + this.partition = new Partition(); + this.partition.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case COLUMN: + if (field.type == TType.STRING) { + this.column = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.principalName != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principalName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.isRole); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.isGroup); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + oprot.writeString(this.privileges); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + if (this.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(this.grantor); + oprot.writeFieldEnd(); + } + if (this.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + this.table.write(oprot); + oprot.writeFieldEnd(); + } + if (this.partition != null) { + oprot.writeFieldBegin(PARTITION_FIELD_DESC); + this.partition.write(oprot); + oprot.writeFieldEnd(); + } + if (this.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + oprot.writeString(this.column); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SecurityColumn("); + boolean first = true; + + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("isRole:"); + sb.append(this.isRole); + first = false; + if (!first) sb.append(", "); + sb.append("isGroup:"); + sb.append(this.isGroup); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + if (!first) sb.append(", "); + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + sb.append(this.table); + } + first = false; + if (!first) sb.append(", "); + sb.append("partition:"); + if (this.partition == null) { + sb.append("null"); + } else { + sb.append(this.partition); + } + first = false; + if (!first) sb.append(", "); + sb.append("column:"); + if (this.column == null) { + sb.append("null"); + } else { + sb.append(this.column); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + +} + Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityDB.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityDB.java (revision 0) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityDB.java (revision 0) @@ -0,0 +1,617 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.metastore.api; + +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import org.apache.log4j.Logger; + +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; + +public class SecurityDB implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("SecurityDB"); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principalName", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("isRole", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("isGroup", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRING, (short)4); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)5); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)6); + private static final TField DB_FIELD_DESC = new TField("db", TType.STRUCT, (short)7); + + private String principalName; + public static final int PRINCIPALNAME = 1; + private boolean isRole; + public static final int ISROLE = 2; + private boolean isGroup; + public static final int ISGROUP = 3; + private String privileges; + public static final int PRIVILEGES = 4; + private int createTime; + public static final int CREATETIME = 5; + private String grantor; + public static final int GRANTOR = 6; + private Database db; + public static final int DB = 7; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean isRole = false; + public boolean isGroup = false; + public boolean createTime = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(PRINCIPALNAME, new FieldMetaData("principalName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ISROLE, new FieldMetaData("isRole", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(ISGROUP, new FieldMetaData("isGroup", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(DB, new FieldMetaData("db", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Database.class))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(SecurityDB.class, metaDataMap); + } + + public SecurityDB() { + } + + public SecurityDB( + String principalName, + boolean isRole, + boolean isGroup, + String privileges, + int createTime, + String grantor, + Database db) + { + this(); + this.principalName = principalName; + this.isRole = isRole; + this.__isset.isRole = true; + this.isGroup = isGroup; + this.__isset.isGroup = true; + this.privileges = privileges; + this.createTime = createTime; + this.__isset.createTime = true; + this.grantor = grantor; + this.db = db; + } + + /** + * Performs a deep copy on other. + */ + public SecurityDB(SecurityDB other) { + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + __isset.isRole = other.__isset.isRole; + this.isRole = other.isRole; + __isset.isGroup = other.__isset.isGroup; + this.isGroup = other.isGroup; + if (other.isSetPrivileges()) { + this.privileges = other.privileges; + } + __isset.createTime = other.__isset.createTime; + this.createTime = other.createTime; + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + if (other.isSetDb()) { + this.db = new Database(other.db); + } + } + + @Override + public SecurityDB clone() { + return new SecurityDB(this); + } + + 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 boolean isIsRole() { + return this.isRole; + } + + public void setIsRole(boolean isRole) { + this.isRole = isRole; + this.__isset.isRole = true; + } + + public void unsetIsRole() { + this.__isset.isRole = false; + } + + // Returns true if field isRole is set (has been asigned a value) and false otherwise + public boolean isSetIsRole() { + return this.__isset.isRole; + } + + public boolean isIsGroup() { + return this.isGroup; + } + + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + this.__isset.isGroup = true; + } + + public void unsetIsGroup() { + this.__isset.isGroup = false; + } + + // Returns true if field isGroup is set (has been asigned a value) and false otherwise + public boolean isSetIsGroup() { + return this.__isset.isGroup; + } + + public String getPrivileges() { + return this.privileges; + } + + public void setPrivileges(String privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + // Returns true if field privileges is set (has been asigned a value) and false otherwise + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + this.__isset.createTime = true; + } + + public void unsetCreateTime() { + this.__isset.createTime = false; + } + + // Returns true if field createTime is set (has been asigned a value) and false otherwise + public boolean isSetCreateTime() { + return this.__isset.createTime; + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case PRINCIPALNAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case ISROLE: + if (value == null) { + unsetIsRole(); + } else { + setIsRole((Boolean)value); + } + break; + + case ISGROUP: + if (value == null) { + unsetIsGroup(); + } else { + setIsGroup((Boolean)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((String)value); + } + break; + + case CREATETIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; + + case DB: + if (value == null) { + unsetDb(); + } else { + setDb((Database)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case PRINCIPALNAME: + return getPrincipalName(); + + case ISROLE: + return new Boolean(isIsRole()); + + case ISGROUP: + return new Boolean(isIsGroup()); + + case PRIVILEGES: + return getPrivileges(); + + case CREATETIME: + return new Integer(getCreateTime()); + + case GRANTOR: + return getGrantor(); + + case DB: + return getDb(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case PRINCIPALNAME: + return isSetPrincipalName(); + case ISROLE: + return isSetIsRole(); + case ISGROUP: + return isSetIsGroup(); + case PRIVILEGES: + return isSetPrivileges(); + case CREATETIME: + return isSetCreateTime(); + case GRANTOR: + return isSetGrantor(); + case DB: + return isSetDb(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SecurityDB) + return this.equals((SecurityDB)that); + return false; + } + + public boolean equals(SecurityDB that) { + if (that == null) + return false; + + boolean this_present_principalName = true && this.isSetPrincipalName(); + boolean that_present_principalName = true && that.isSetPrincipalName(); + if (this_present_principalName || that_present_principalName) { + if (!(this_present_principalName && that_present_principalName)) + return false; + if (!this.principalName.equals(that.principalName)) + return false; + } + + boolean this_present_isRole = true; + boolean that_present_isRole = true; + if (this_present_isRole || that_present_isRole) { + if (!(this_present_isRole && that_present_isRole)) + return false; + if (this.isRole != that.isRole) + return false; + } + + boolean this_present_isGroup = true; + boolean that_present_isGroup = true; + if (this_present_isGroup || that_present_isGroup) { + if (!(this_present_isGroup && that_present_isGroup)) + return false; + if (this.isGroup != that.isGroup) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) + return false; + } + + boolean this_present_db = true && this.isSetDb(); + boolean that_present_db = true && that.isSetDb(); + if (this_present_db || that_present_db) { + if (!(this_present_db && that_present_db)) + return false; + if (!this.db.equals(that.db)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 PRINCIPALNAME: + if (field.type == TType.STRING) { + this.principalName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case ISROLE: + if (field.type == TType.BOOL) { + this.isRole = iprot.readBool(); + this.__isset.isRole = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case ISGROUP: + if (field.type == TType.BOOL) { + this.isGroup = iprot.readBool(); + this.__isset.isGroup = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PRIVILEGES: + if (field.type == TType.STRING) { + this.privileges = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case CREATETIME: + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + this.__isset.createTime = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GRANTOR: + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.principalName != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principalName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.isRole); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.isGroup); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + oprot.writeString(this.privileges); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + if (this.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(this.grantor); + oprot.writeFieldEnd(); + } + if (this.db != null) { + oprot.writeFieldBegin(DB_FIELD_DESC); + this.db.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SecurityDB("); + boolean first = true; + + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("isRole:"); + sb.append(this.isRole); + first = false; + if (!first) sb.append(", "); + sb.append("isGroup:"); + sb.append(this.isGroup); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + if (!first) sb.append(", "); + sb.append("db:"); + if (this.db == null) { + sb.append("null"); + } else { + sb.append(this.db); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + +} + Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityTablePartition.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityTablePartition.java (revision 0) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityTablePartition.java (revision 0) @@ -0,0 +1,687 @@ +/** + * 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.Set; +import java.util.HashSet; +import java.util.Collections; +import org.apache.log4j.Logger; + +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; + +public class SecurityTablePartition implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("SecurityTablePartition"); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principalName", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("isRole", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("isGroup", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRING, (short)4); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)5); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)6); + private static final TField TABLE_FIELD_DESC = new TField("table", TType.STRUCT, (short)7); + private static final TField PART_FIELD_DESC = new TField("part", TType.STRUCT, (short)8); + + private String principalName; + public static final int PRINCIPALNAME = 1; + private boolean isRole; + public static final int ISROLE = 2; + private boolean isGroup; + public static final int ISGROUP = 3; + private String privileges; + public static final int PRIVILEGES = 4; + private int createTime; + public static final int CREATETIME = 5; + private String grantor; + public static final int GRANTOR = 6; + private Table table; + public static final int TABLE = 7; + private Partition part; + public static final int PART = 8; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean isRole = false; + public boolean isGroup = false; + public boolean createTime = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(PRINCIPALNAME, new FieldMetaData("principalName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ISROLE, new FieldMetaData("isRole", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(ISGROUP, new FieldMetaData("isGroup", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TABLE, new FieldMetaData("table", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + put(PART, new FieldMetaData("part", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(SecurityTablePartition.class, metaDataMap); + } + + public SecurityTablePartition() { + } + + public SecurityTablePartition( + String principalName, + boolean isRole, + boolean isGroup, + String privileges, + int createTime, + String grantor, + Table table, + Partition part) + { + this(); + this.principalName = principalName; + this.isRole = isRole; + this.__isset.isRole = true; + this.isGroup = isGroup; + this.__isset.isGroup = true; + this.privileges = privileges; + this.createTime = createTime; + this.__isset.createTime = true; + this.grantor = grantor; + this.table = table; + this.part = part; + } + + /** + * Performs a deep copy on other. + */ + public SecurityTablePartition(SecurityTablePartition other) { + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + __isset.isRole = other.__isset.isRole; + this.isRole = other.isRole; + __isset.isGroup = other.__isset.isGroup; + this.isGroup = other.isGroup; + if (other.isSetPrivileges()) { + this.privileges = other.privileges; + } + __isset.createTime = other.__isset.createTime; + this.createTime = other.createTime; + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + if (other.isSetTable()) { + this.table = new Table(other.table); + } + if (other.isSetPart()) { + this.part = new Partition(other.part); + } + } + + @Override + public SecurityTablePartition clone() { + return new SecurityTablePartition(this); + } + + 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 boolean isIsRole() { + return this.isRole; + } + + public void setIsRole(boolean isRole) { + this.isRole = isRole; + this.__isset.isRole = true; + } + + public void unsetIsRole() { + this.__isset.isRole = false; + } + + // Returns true if field isRole is set (has been asigned a value) and false otherwise + public boolean isSetIsRole() { + return this.__isset.isRole; + } + + public boolean isIsGroup() { + return this.isGroup; + } + + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + this.__isset.isGroup = true; + } + + public void unsetIsGroup() { + this.__isset.isGroup = false; + } + + // Returns true if field isGroup is set (has been asigned a value) and false otherwise + public boolean isSetIsGroup() { + return this.__isset.isGroup; + } + + public String getPrivileges() { + return this.privileges; + } + + public void setPrivileges(String privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + // Returns true if field privileges is set (has been asigned a value) and false otherwise + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + this.__isset.createTime = true; + } + + public void unsetCreateTime() { + this.__isset.createTime = false; + } + + // Returns true if field createTime is set (has been asigned a value) and false otherwise + public boolean isSetCreateTime() { + return this.__isset.createTime; + } + + 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 Table getTable() { + return this.table; + } + + public void setTable(Table table) { + this.table = table; + } + + public void unsetTable() { + this.table = null; + } + + // Returns true if field table is set (has been asigned a value) and false otherwise + public boolean isSetTable() { + return this.table != null; + } + + public Partition getPart() { + return this.part; + } + + public void setPart(Partition part) { + this.part = part; + } + + public void unsetPart() { + this.part = null; + } + + // Returns true if field part is set (has been asigned a value) and false otherwise + public boolean isSetPart() { + return this.part != null; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case PRINCIPALNAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case ISROLE: + if (value == null) { + unsetIsRole(); + } else { + setIsRole((Boolean)value); + } + break; + + case ISGROUP: + if (value == null) { + unsetIsGroup(); + } else { + setIsGroup((Boolean)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((String)value); + } + break; + + case CREATETIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; + + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((Table)value); + } + break; + + case PART: + if (value == null) { + unsetPart(); + } else { + setPart((Partition)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case PRINCIPALNAME: + return getPrincipalName(); + + case ISROLE: + return new Boolean(isIsRole()); + + case ISGROUP: + return new Boolean(isIsGroup()); + + case PRIVILEGES: + return getPrivileges(); + + case CREATETIME: + return new Integer(getCreateTime()); + + case GRANTOR: + return getGrantor(); + + case TABLE: + return getTable(); + + case PART: + return getPart(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case PRINCIPALNAME: + return isSetPrincipalName(); + case ISROLE: + return isSetIsRole(); + case ISGROUP: + return isSetIsGroup(); + case PRIVILEGES: + return isSetPrivileges(); + case CREATETIME: + return isSetCreateTime(); + case GRANTOR: + return isSetGrantor(); + case TABLE: + return isSetTable(); + case PART: + return isSetPart(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SecurityTablePartition) + return this.equals((SecurityTablePartition)that); + return false; + } + + public boolean equals(SecurityTablePartition that) { + if (that == null) + return false; + + boolean this_present_principalName = true && this.isSetPrincipalName(); + boolean that_present_principalName = true && that.isSetPrincipalName(); + if (this_present_principalName || that_present_principalName) { + if (!(this_present_principalName && that_present_principalName)) + return false; + if (!this.principalName.equals(that.principalName)) + return false; + } + + boolean this_present_isRole = true; + boolean that_present_isRole = true; + if (this_present_isRole || that_present_isRole) { + if (!(this_present_isRole && that_present_isRole)) + return false; + if (this.isRole != that.isRole) + return false; + } + + boolean this_present_isGroup = true; + boolean that_present_isGroup = true; + if (this_present_isGroup || that_present_isGroup) { + if (!(this_present_isGroup && that_present_isGroup)) + return false; + if (this.isGroup != that.isGroup) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) + return false; + } + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_part = true && this.isSetPart(); + boolean that_present_part = true && that.isSetPart(); + if (this_present_part || that_present_part) { + if (!(this_present_part && that_present_part)) + return false; + if (!this.part.equals(that.part)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 PRINCIPALNAME: + if (field.type == TType.STRING) { + this.principalName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case ISROLE: + if (field.type == TType.BOOL) { + this.isRole = iprot.readBool(); + this.__isset.isRole = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case ISGROUP: + if (field.type == TType.BOOL) { + this.isGroup = iprot.readBool(); + this.__isset.isGroup = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PRIVILEGES: + if (field.type == TType.STRING) { + this.privileges = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case CREATETIME: + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + this.__isset.createTime = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GRANTOR: + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TABLE: + if (field.type == TType.STRUCT) { + this.table = new Table(); + this.table.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PART: + if (field.type == TType.STRUCT) { + this.part = new Partition(); + this.part.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.principalName != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principalName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.isRole); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.isGroup); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + oprot.writeString(this.privileges); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + if (this.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(this.grantor); + oprot.writeFieldEnd(); + } + if (this.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + this.table.write(oprot); + oprot.writeFieldEnd(); + } + if (this.part != null) { + oprot.writeFieldBegin(PART_FIELD_DESC); + this.part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SecurityTablePartition("); + boolean first = true; + + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("isRole:"); + sb.append(this.isRole); + first = false; + if (!first) sb.append(", "); + sb.append("isGroup:"); + sb.append(this.isGroup); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + if (!first) sb.append(", "); + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + sb.append(this.table); + } + first = false; + if (!first) sb.append(", "); + sb.append("part:"); + if (this.part == null) { + sb.append("null"); + } else { + sb.append(this.part); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + +} + Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityUser.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityUser.java (revision 0) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SecurityUser.java (revision 0) @@ -0,0 +1,547 @@ +/** + * 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.Set; +import java.util.HashSet; +import java.util.Collections; +import org.apache.log4j.Logger; + +import org.apache.thrift.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.protocol.*; + +public class SecurityUser implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("SecurityUser"); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principalName", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("isRole", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("isGroup", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRING, (short)4); + private static final TField CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)5); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)6); + + private String principalName; + public static final int PRINCIPALNAME = 1; + private boolean isRole; + public static final int ISROLE = 2; + private boolean isGroup; + public static final int ISGROUP = 3; + private String privileges; + public static final int PRIVILEGES = 4; + private int createTime; + public static final int CREATETIME = 5; + private String grantor; + public static final int GRANTOR = 6; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean isRole = false; + public boolean isGroup = false; + public boolean createTime = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(PRINCIPALNAME, new FieldMetaData("principalName", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(ISROLE, new FieldMetaData("isRole", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(ISGROUP, new FieldMetaData("isGroup", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + put(GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(SecurityUser.class, metaDataMap); + } + + public SecurityUser() { + } + + public SecurityUser( + String principalName, + boolean isRole, + boolean isGroup, + String privileges, + int createTime, + String grantor) + { + this(); + this.principalName = principalName; + this.isRole = isRole; + this.__isset.isRole = true; + this.isGroup = isGroup; + this.__isset.isGroup = true; + this.privileges = privileges; + this.createTime = createTime; + this.__isset.createTime = true; + this.grantor = grantor; + } + + /** + * Performs a deep copy on other. + */ + public SecurityUser(SecurityUser other) { + if (other.isSetPrincipalName()) { + this.principalName = other.principalName; + } + __isset.isRole = other.__isset.isRole; + this.isRole = other.isRole; + __isset.isGroup = other.__isset.isGroup; + this.isGroup = other.isGroup; + if (other.isSetPrivileges()) { + this.privileges = other.privileges; + } + __isset.createTime = other.__isset.createTime; + this.createTime = other.createTime; + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + } + + @Override + public SecurityUser clone() { + return new SecurityUser(this); + } + + 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 boolean isIsRole() { + return this.isRole; + } + + public void setIsRole(boolean isRole) { + this.isRole = isRole; + this.__isset.isRole = true; + } + + public void unsetIsRole() { + this.__isset.isRole = false; + } + + // Returns true if field isRole is set (has been asigned a value) and false otherwise + public boolean isSetIsRole() { + return this.__isset.isRole; + } + + public boolean isIsGroup() { + return this.isGroup; + } + + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + this.__isset.isGroup = true; + } + + public void unsetIsGroup() { + this.__isset.isGroup = false; + } + + // Returns true if field isGroup is set (has been asigned a value) and false otherwise + public boolean isSetIsGroup() { + return this.__isset.isGroup; + } + + public String getPrivileges() { + return this.privileges; + } + + public void setPrivileges(String privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + // Returns true if field privileges is set (has been asigned a value) and false otherwise + public boolean isSetPrivileges() { + return this.privileges != null; + } + + public int getCreateTime() { + return this.createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + this.__isset.createTime = true; + } + + public void unsetCreateTime() { + this.__isset.createTime = false; + } + + // Returns true if field createTime is set (has been asigned a value) and false otherwise + public boolean isSetCreateTime() { + return this.__isset.createTime; + } + + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case PRINCIPALNAME: + if (value == null) { + unsetPrincipalName(); + } else { + setPrincipalName((String)value); + } + break; + + case ISROLE: + if (value == null) { + unsetIsRole(); + } else { + setIsRole((Boolean)value); + } + break; + + case ISGROUP: + if (value == null) { + unsetIsGroup(); + } else { + setIsGroup((Boolean)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((String)value); + } + break; + + case CREATETIME: + if (value == null) { + unsetCreateTime(); + } else { + setCreateTime((Integer)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case PRINCIPALNAME: + return getPrincipalName(); + + case ISROLE: + return new Boolean(isIsRole()); + + case ISGROUP: + return new Boolean(isIsGroup()); + + case PRIVILEGES: + return getPrivileges(); + + case CREATETIME: + return new Integer(getCreateTime()); + + case GRANTOR: + return getGrantor(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case PRINCIPALNAME: + return isSetPrincipalName(); + case ISROLE: + return isSetIsRole(); + case ISGROUP: + return isSetIsGroup(); + case PRIVILEGES: + return isSetPrivileges(); + case CREATETIME: + return isSetCreateTime(); + case GRANTOR: + return isSetGrantor(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof SecurityUser) + return this.equals((SecurityUser)that); + return false; + } + + public boolean equals(SecurityUser that) { + if (that == null) + return false; + + boolean this_present_principalName = true && this.isSetPrincipalName(); + boolean that_present_principalName = true && that.isSetPrincipalName(); + if (this_present_principalName || that_present_principalName) { + if (!(this_present_principalName && that_present_principalName)) + return false; + if (!this.principalName.equals(that.principalName)) + return false; + } + + boolean this_present_isRole = true; + boolean that_present_isRole = true; + if (this_present_isRole || that_present_isRole) { + if (!(this_present_isRole && that_present_isRole)) + return false; + if (this.isRole != that.isRole) + return false; + } + + boolean this_present_isGroup = true; + boolean that_present_isGroup = true; + if (this_present_isGroup || that_present_isGroup) { + if (!(this_present_isGroup && that_present_isGroup)) + return false; + if (this.isGroup != that.isGroup) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + boolean this_present_createTime = true; + boolean that_present_createTime = true; + if (this_present_createTime || that_present_createTime) { + if (!(this_present_createTime && that_present_createTime)) + return false; + if (this.createTime != that.createTime) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 PRINCIPALNAME: + if (field.type == TType.STRING) { + this.principalName = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case ISROLE: + if (field.type == TType.BOOL) { + this.isRole = iprot.readBool(); + this.__isset.isRole = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case ISGROUP: + if (field.type == TType.BOOL) { + this.isGroup = iprot.readBool(); + this.__isset.isGroup = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PRIVILEGES: + if (field.type == TType.STRING) { + this.privileges = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case CREATETIME: + if (field.type == TType.I32) { + this.createTime = iprot.readI32(); + this.__isset.createTime = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GRANTOR: + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.principalName != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principalName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.isRole); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.isGroup); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + oprot.writeString(this.privileges); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + if (this.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(this.grantor); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("SecurityUser("); + boolean first = true; + + sb.append("principalName:"); + if (this.principalName == null) { + sb.append("null"); + } else { + sb.append(this.principalName); + } + first = false; + if (!first) sb.append(", "); + sb.append("isRole:"); + sb.append(this.isRole); + first = false; + if (!first) sb.append(", "); + sb.append("isGroup:"); + sb.append(this.isGroup); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { + sb.append("null"); + } else { + sb.append(this.privileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("grantor:"); + if (this.grantor == null) { + sb.append("null"); + } else { + sb.append(this.grantor); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + +} + Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java (revision 1037574) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java (working copy) @@ -295,15 +295,15 @@ case PARAMETERS: if (field.type == TType.MAP) { { - TMap _map4 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map4.size); - for (int _i5 = 0; _i5 < _map4.size; ++_i5) + TMap _map19 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map19.size); + for (int _i20 = 0; _i20 < _map19.size; ++_i20) { - String _key6; - String _val7; - _key6 = iprot.readString(); - _val7 = iprot.readString(); - this.parameters.put(_key6, _val7); + String _key21; + String _val22; + _key21 = iprot.readString(); + _val22 = iprot.readString(); + this.parameters.put(_key21, _val22); } iprot.readMapEnd(); } @@ -340,9 +340,9 @@ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter8 : this.parameters.entrySet()) { - oprot.writeString(_iter8.getKey()); - oprot.writeString(_iter8.getValue()); + for (Map.Entry _iter23 : this.parameters.entrySet()) { + oprot.writeString(_iter23.getKey()); + oprot.writeString(_iter23.getValue()); } oprot.writeMapEnd(); } Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java (revision 1037574) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java (working copy) @@ -688,14 +688,14 @@ case COLS: if (field.type == TType.LIST) { { - TList _list9 = iprot.readListBegin(); - this.cols = new ArrayList(_list9.size); - for (int _i10 = 0; _i10 < _list9.size; ++_i10) + TList _list24 = iprot.readListBegin(); + this.cols = new ArrayList(_list24.size); + for (int _i25 = 0; _i25 < _list24.size; ++_i25) { - FieldSchema _elem11; - _elem11 = new FieldSchema(); - _elem11.read(iprot); - this.cols.add(_elem11); + FieldSchema _elem26; + _elem26 = new FieldSchema(); + _elem26.read(iprot); + this.cols.add(_elem26); } iprot.readListEnd(); } @@ -751,13 +751,13 @@ case BUCKETCOLS: if (field.type == TType.LIST) { { - TList _list12 = iprot.readListBegin(); - this.bucketCols = new ArrayList(_list12.size); - for (int _i13 = 0; _i13 < _list12.size; ++_i13) + TList _list27 = iprot.readListBegin(); + this.bucketCols = new ArrayList(_list27.size); + for (int _i28 = 0; _i28 < _list27.size; ++_i28) { - String _elem14; - _elem14 = iprot.readString(); - this.bucketCols.add(_elem14); + String _elem29; + _elem29 = iprot.readString(); + this.bucketCols.add(_elem29); } iprot.readListEnd(); } @@ -768,14 +768,14 @@ case SORTCOLS: if (field.type == TType.LIST) { { - TList _list15 = iprot.readListBegin(); - this.sortCols = new ArrayList(_list15.size); - for (int _i16 = 0; _i16 < _list15.size; ++_i16) + TList _list30 = iprot.readListBegin(); + this.sortCols = new ArrayList(_list30.size); + for (int _i31 = 0; _i31 < _list30.size; ++_i31) { - Order _elem17; - _elem17 = new Order(); - _elem17.read(iprot); - this.sortCols.add(_elem17); + Order _elem32; + _elem32 = new Order(); + _elem32.read(iprot); + this.sortCols.add(_elem32); } iprot.readListEnd(); } @@ -786,15 +786,15 @@ case PARAMETERS: if (field.type == TType.MAP) { { - TMap _map18 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map18.size); - for (int _i19 = 0; _i19 < _map18.size; ++_i19) + TMap _map33 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map33.size); + for (int _i34 = 0; _i34 < _map33.size; ++_i34) { - String _key20; - String _val21; - _key20 = iprot.readString(); - _val21 = iprot.readString(); - this.parameters.put(_key20, _val21); + String _key35; + String _val36; + _key35 = iprot.readString(); + _val36 = iprot.readString(); + this.parameters.put(_key35, _val36); } iprot.readMapEnd(); } @@ -821,8 +821,8 @@ oprot.writeFieldBegin(COLS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.cols.size())); - for (FieldSchema _iter22 : this.cols) { - _iter22.write(oprot); + for (FieldSchema _iter37 : this.cols) { + _iter37.write(oprot); } oprot.writeListEnd(); } @@ -858,8 +858,8 @@ oprot.writeFieldBegin(BUCKET_COLS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.bucketCols.size())); - for (String _iter23 : this.bucketCols) { - oprot.writeString(_iter23); + for (String _iter38 : this.bucketCols) { + oprot.writeString(_iter38); } oprot.writeListEnd(); } @@ -869,8 +869,8 @@ oprot.writeFieldBegin(SORT_COLS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.sortCols.size())); - for (Order _iter24 : this.sortCols) { - _iter24.write(oprot); + for (Order _iter39 : this.sortCols) { + _iter39.write(oprot); } oprot.writeListEnd(); } @@ -880,9 +880,9 @@ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter25 : this.parameters.entrySet()) { - oprot.writeString(_iter25.getKey()); - oprot.writeString(_iter25.getValue()); + for (Map.Entry _iter40 : this.parameters.entrySet()) { + oprot.writeString(_iter40.getKey()); + oprot.writeString(_iter40.getValue()); } oprot.writeMapEnd(); } Index: metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java (revision 1037574) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java (working copy) @@ -32,6 +32,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; public static final int TABLENAME = 1; @@ -57,6 +58,8 @@ public static final int VIEWEXPANDEDTEXT = 11; private String tableType; public static final int TABLETYPE = 12; + private PrincipalPrivilegeSet privileges; + public static final int PRIVILEGES = 13; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -93,6 +96,8 @@ new FieldValueMetaData(TType.STRING))); put(TABLETYPE, new FieldMetaData("tableType", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + put(PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.OPTIONAL, + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); }}); static { @@ -114,7 +119,8 @@ Map parameters, String viewOriginalText, String viewExpandedText, - String tableType) + String tableType, + PrincipalPrivilegeSet privileges) { this(); this.tableName = tableName; @@ -132,6 +138,7 @@ this.viewOriginalText = viewOriginalText; this.viewExpandedText = viewExpandedText; this.tableType = tableType; + this.privileges = privileges; } /** @@ -187,6 +194,9 @@ if (other.isSetTableType()) { this.tableType = other.tableType; } + if (other.isSetPrivileges()) { + this.privileges = new PrincipalPrivilegeSet(other.privileges); + } } @Override @@ -427,6 +437,23 @@ return this.tableType != null; } + 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case TABLENAME: @@ -525,6 +552,14 @@ } break; + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrincipalPrivilegeSet)value); + } + break; + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -568,6 +603,9 @@ case TABLETYPE: return getTableType(); + case PRIVILEGES: + return getPrivileges(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -600,6 +638,8 @@ return isSetViewExpandedText(); case TABLETYPE: return isSetTableType(); + case PRIVILEGES: + return isSetPrivileges(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -726,6 +766,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; } @@ -801,14 +850,14 @@ case PARTITIONKEYS: if (field.type == TType.LIST) { { - TList _list26 = iprot.readListBegin(); - this.partitionKeys = new ArrayList(_list26.size); - for (int _i27 = 0; _i27 < _list26.size; ++_i27) + TList _list41 = iprot.readListBegin(); + this.partitionKeys = new ArrayList(_list41.size); + for (int _i42 = 0; _i42 < _list41.size; ++_i42) { - FieldSchema _elem28; - _elem28 = new FieldSchema(); - _elem28.read(iprot); - this.partitionKeys.add(_elem28); + FieldSchema _elem43; + _elem43 = new FieldSchema(); + _elem43.read(iprot); + this.partitionKeys.add(_elem43); } iprot.readListEnd(); } @@ -819,15 +868,15 @@ case PARAMETERS: if (field.type == TType.MAP) { { - TMap _map29 = iprot.readMapBegin(); - this.parameters = new HashMap(2*_map29.size); - for (int _i30 = 0; _i30 < _map29.size; ++_i30) + TMap _map44 = iprot.readMapBegin(); + this.parameters = new HashMap(2*_map44.size); + for (int _i45 = 0; _i45 < _map44.size; ++_i45) { - String _key31; - String _val32; - _key31 = iprot.readString(); - _val32 = iprot.readString(); - this.parameters.put(_key31, _val32); + String _key46; + String _val47; + _key46 = iprot.readString(); + _val47 = iprot.readString(); + this.parameters.put(_key46, _val47); } iprot.readMapEnd(); } @@ -856,6 +905,14 @@ TProtocolUtil.skip(iprot, field.type); } break; + case 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); break; @@ -904,8 +961,8 @@ oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.partitionKeys.size())); - for (FieldSchema _iter33 : this.partitionKeys) { - _iter33.write(oprot); + for (FieldSchema _iter48 : this.partitionKeys) { + _iter48.write(oprot); } oprot.writeListEnd(); } @@ -915,9 +972,9 @@ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter34 : this.parameters.entrySet()) { - oprot.writeString(_iter34.getKey()); - oprot.writeString(_iter34.getValue()); + for (Map.Entry _iter49 : this.parameters.entrySet()) { + oprot.writeString(_iter49.getKey()); + oprot.writeString(_iter49.getValue()); } oprot.writeMapEnd(); } @@ -938,6 +995,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(); } @@ -1030,6 +1094,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-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (revision 1037574) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (working copy) @@ -71,14 +71,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; @@ -103,6 +109,42 @@ public List get_index_names(String db_name, String tbl_name, short max_indexes) throws MetaException, TException; + public PrincipalPrivilegeSet get_user_privilege_set(String user_name, List group_names) throws MetaException, TException; + + public PrincipalPrivilegeSet get_db_privilege_set(String db_name, String user_name, List group_names) throws MetaException, TException; + + public PrincipalPrivilegeSet get_table_privilege_set(String db_name, String table_name, String user_name, List group_names) throws MetaException, TException; + + public PrincipalPrivilegeSet get_partition_privilege_set(String db_name, String table_name, String part_name, String user_name, List group_names) throws MetaException, TException; + + public PrincipalPrivilegeSet get_column_privilege_set(String db_name, String table_name, String part_name, String column_name, String user_name, List group_names) throws MetaException, TException; + + public boolean create_role(String role_name, String owner_name, String db_name) throws MetaException, TException; + + public boolean drop_role(String role_name, String db_name) throws MetaException, TException; + + public boolean add_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException; + + public boolean remove_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException; + + public List list_roles(String principal_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException; + + public List list_security_user_grant(String principla_name, boolean is_role, boolean is_group) throws MetaException, TException; + + public List list_security_db_grant(String principal_name, boolean is_group, boolean is_role, String db_name) throws MetaException, TException; + + public List list_security_table_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name) throws MetaException, TException; + + public List list_security_partition_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name) throws MetaException, TException; + + public List list_security_column_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, String column_name) throws MetaException, TException; + + public boolean grant_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, String grantor) throws MetaException, TException; + + public boolean revoke_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges) throws MetaException, TException; + + public boolean revoke_all_privileges(String user_name, boolean is_role, boolean is_group, boolean remove_user_priv, List dbs, List
tables, List parts, Map> columns) throws MetaException, TException; + } public static class Client extends com.facebook.fb303.FacebookService.Client implements Iface { @@ -1033,6 +1075,49 @@ 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.db_name = db_name; + args.tbl_name = tbl_name; + args.part_vals = part_vals; + args.user_name = user_name; + args.group_names = group_names; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + 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; + } + 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); @@ -1115,6 +1200,49 @@ 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.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(); + 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; + } + 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); @@ -1192,6 +1320,50 @@ 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.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(); + 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; + } + 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); @@ -1664,1317 +1836,16071 @@ throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); } - } - public static class Processor extends com.facebook.fb303.FacebookService.Processor implements TProcessor { - private static final Logger LOGGER = Logger.getLogger(Processor.class.getName()); - public Processor(Iface iface) + public PrincipalPrivilegeSet get_user_privilege_set(String user_name, List group_names) throws MetaException, TException { - super(iface); - iface_ = iface; - processMap_.put("create_database", new create_database()); - processMap_.put("get_database", new get_database()); - processMap_.put("drop_database", new drop_database()); - processMap_.put("get_databases", new get_databases()); - processMap_.put("get_all_databases", new get_all_databases()); - processMap_.put("get_type", new get_type()); - processMap_.put("create_type", new create_type()); - processMap_.put("drop_type", new drop_type()); - processMap_.put("get_type_all", new get_type_all()); - processMap_.put("get_fields", new get_fields()); - processMap_.put("get_schema", new get_schema()); - processMap_.put("create_table", new create_table()); - processMap_.put("drop_table", new drop_table()); - processMap_.put("get_tables", new get_tables()); - processMap_.put("get_all_tables", new get_all_tables()); - processMap_.put("get_table", new get_table()); - processMap_.put("alter_table", new alter_table()); - processMap_.put("add_partition", new add_partition()); - processMap_.put("append_partition", new append_partition()); - processMap_.put("append_partition_by_name", new append_partition_by_name()); - processMap_.put("drop_partition", new drop_partition()); - processMap_.put("drop_partition_by_name", new drop_partition_by_name()); - processMap_.put("get_partition", new get_partition()); - processMap_.put("get_partition_by_name", new get_partition_by_name()); - processMap_.put("get_partitions", new get_partitions()); - processMap_.put("get_partition_names", new get_partition_names()); - processMap_.put("get_partitions_ps", new get_partitions_ps()); - processMap_.put("get_partition_names_ps", new get_partition_names_ps()); - processMap_.put("get_partitions_by_filter", new get_partitions_by_filter()); - processMap_.put("alter_partition", new alter_partition()); - processMap_.put("get_config_value", new get_config_value()); - processMap_.put("partition_name_to_vals", new partition_name_to_vals()); - processMap_.put("partition_name_to_spec", new partition_name_to_spec()); - processMap_.put("add_index", new add_index()); - processMap_.put("alter_index", new alter_index()); - processMap_.put("drop_index_by_name", new drop_index_by_name()); - processMap_.put("get_index_by_name", new get_index_by_name()); - processMap_.put("get_indexes", new get_indexes()); - processMap_.put("get_index_names", new get_index_names()); + send_get_user_privilege_set(user_name, group_names); + return recv_get_user_privilege_set(); } - private Iface iface_; + public void send_get_user_privilege_set(String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_user_privilege_set", TMessageType.CALL, seqid_)); + get_user_privilege_set_args args = new get_user_privilege_set_args(); + args.user_name = user_name; + args.group_names = group_names; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } - public boolean process(TProtocol iprot, TProtocol oprot) throws TException + public PrincipalPrivilegeSet recv_get_user_privilege_set() throws MetaException, 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; + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; } - fn.process(msg.seqid, iprot, oprot); - return true; + get_user_privilege_set_result result = new get_user_privilege_set_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_user_privilege_set failed: unknown result"); + } + + public PrincipalPrivilegeSet get_db_privilege_set(String db_name, String user_name, List group_names) throws MetaException, TException + { + send_get_db_privilege_set(db_name, user_name, group_names); + return recv_get_db_privilege_set(); + } + + public void send_get_db_privilege_set(String db_name, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_db_privilege_set", TMessageType.CALL, seqid_)); + get_db_privilege_set_args args = new get_db_privilege_set_args(); + args.db_name = db_name; + args.user_name = user_name; + args.group_names = group_names; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public PrincipalPrivilegeSet recv_get_db_privilege_set() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + get_db_privilege_set_result result = new get_db_privilege_set_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_db_privilege_set failed: unknown result"); + } + + public PrincipalPrivilegeSet get_table_privilege_set(String db_name, String table_name, String user_name, List group_names) throws MetaException, TException + { + send_get_table_privilege_set(db_name, table_name, user_name, group_names); + return recv_get_table_privilege_set(); + } + + public void send_get_table_privilege_set(String db_name, String table_name, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_table_privilege_set", TMessageType.CALL, seqid_)); + get_table_privilege_set_args args = new get_table_privilege_set_args(); + args.db_name = db_name; + args.table_name = table_name; + args.user_name = user_name; + args.group_names = group_names; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public PrincipalPrivilegeSet recv_get_table_privilege_set() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + get_table_privilege_set_result result = new get_table_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_table_privilege_set failed: unknown result"); + } + + public PrincipalPrivilegeSet get_partition_privilege_set(String db_name, String table_name, String part_name, String user_name, List group_names) throws MetaException, TException + { + send_get_partition_privilege_set(db_name, table_name, part_name, user_name, group_names); + return recv_get_partition_privilege_set(); + } + + public void send_get_partition_privilege_set(String db_name, String table_name, String part_name, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_partition_privilege_set", TMessageType.CALL, seqid_)); + get_partition_privilege_set_args args = new get_partition_privilege_set_args(); + args.db_name = db_name; + args.table_name = table_name; + args.part_name = part_name; + args.user_name = user_name; + args.group_names = group_names; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public PrincipalPrivilegeSet recv_get_partition_privilege_set() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + get_partition_privilege_set_result result = new get_partition_privilege_set_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_privilege_set failed: unknown result"); + } + + public PrincipalPrivilegeSet get_column_privilege_set(String db_name, String table_name, String part_name, String column_name, String user_name, List group_names) throws MetaException, TException + { + send_get_column_privilege_set(db_name, table_name, part_name, column_name, user_name, group_names); + return recv_get_column_privilege_set(); + } + + public void send_get_column_privilege_set(String db_name, String table_name, String part_name, String column_name, String user_name, List group_names) throws TException + { + oprot_.writeMessageBegin(new TMessage("get_column_privilege_set", TMessageType.CALL, seqid_)); + get_column_privilege_set_args args = new get_column_privilege_set_args(); + args.db_name = db_name; + args.table_name = table_name; + args.part_name = part_name; + args.column_name = column_name; + args.user_name = user_name; + args.group_names = group_names; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public PrincipalPrivilegeSet recv_get_column_privilege_set() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + get_column_privilege_set_result result = new get_column_privilege_set_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "get_column_privilege_set failed: unknown result"); + } + + public boolean create_role(String role_name, String owner_name, String db_name) throws MetaException, TException + { + send_create_role(role_name, owner_name, db_name); + return recv_create_role(); + } + + public void send_create_role(String role_name, String owner_name, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("create_role", TMessageType.CALL, seqid_)); + create_role_args args = new create_role_args(); + args.role_name = role_name; + args.owner_name = owner_name; + args.db_name = db_name; + 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; + } + 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 boolean drop_role(String role_name, String db_name) throws MetaException, TException + { + send_drop_role(role_name, db_name); + return recv_drop_role(); + } + + public void send_drop_role(String role_name, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("drop_role", TMessageType.CALL, seqid_)); + drop_role_args args = new drop_role_args(); + args.role_name = role_name; + args.db_name = db_name; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + 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; + } + 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 boolean add_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException + { + send_add_role_member(role_name, user_name, is_role, is_group, db_name); + return recv_add_role_member(); + } + + public void send_add_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("add_role_member", TMessageType.CALL, seqid_)); + add_role_member_args args = new add_role_member_args(); + args.role_name = role_name; + args.user_name = user_name; + args.is_role = is_role; + args.is_group = is_group; + args.db_name = db_name; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public boolean recv_add_role_member() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + add_role_member_result result = new add_role_member_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "add_role_member failed: unknown result"); + } + + public boolean remove_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException + { + send_remove_role_member(role_name, user_name, is_role, is_group, db_name); + return recv_remove_role_member(); + } + + public void send_remove_role_member(String role_name, String user_name, boolean is_role, boolean is_group, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("remove_role_member", TMessageType.CALL, seqid_)); + remove_role_member_args args = new remove_role_member_args(); + args.role_name = role_name; + args.user_name = user_name; + args.is_role = is_role; + args.is_group = is_group; + args.db_name = db_name; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public boolean recv_remove_role_member() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + remove_role_member_result result = new remove_role_member_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "remove_role_member failed: unknown result"); + } + + public List list_roles(String principal_name, boolean is_role, boolean is_group, String db_name) throws MetaException, TException + { + send_list_roles(principal_name, is_role, is_group, db_name); + return recv_list_roles(); + } + + public void send_list_roles(String principal_name, boolean is_role, boolean is_group, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_roles", TMessageType.CALL, seqid_)); + list_roles_args args = new list_roles_args(); + args.principal_name = principal_name; + args.is_role = is_role; + args.is_group = is_group; + args.db_name = db_name; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + 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; + } + 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 List list_security_user_grant(String principla_name, boolean is_role, boolean is_group) throws MetaException, TException + { + send_list_security_user_grant(principla_name, is_role, is_group); + return recv_list_security_user_grant(); + } + + public void send_list_security_user_grant(String principla_name, boolean is_role, boolean is_group) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_security_user_grant", TMessageType.CALL, seqid_)); + list_security_user_grant_args args = new list_security_user_grant_args(); + args.principla_name = principla_name; + args.is_role = is_role; + args.is_group = is_group; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_list_security_user_grant() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + list_security_user_grant_result result = new list_security_user_grant_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_security_user_grant failed: unknown result"); + } + + public List list_security_db_grant(String principal_name, boolean is_group, boolean is_role, String db_name) throws MetaException, TException + { + send_list_security_db_grant(principal_name, is_group, is_role, db_name); + return recv_list_security_db_grant(); + } + + public void send_list_security_db_grant(String principal_name, boolean is_group, boolean is_role, String db_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_security_db_grant", TMessageType.CALL, seqid_)); + list_security_db_grant_args args = new list_security_db_grant_args(); + args.principal_name = principal_name; + args.is_group = is_group; + args.is_role = is_role; + args.db_name = db_name; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_list_security_db_grant() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + list_security_db_grant_result result = new list_security_db_grant_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_security_db_grant failed: unknown result"); + } + + public List list_security_table_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name) throws MetaException, TException + { + send_list_security_table_grant(principal_name, is_group, is_role, db_name, table_name); + return recv_list_security_table_grant(); + } + + public void send_list_security_table_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_security_table_grant", TMessageType.CALL, seqid_)); + list_security_table_grant_args args = new list_security_table_grant_args(); + args.principal_name = principal_name; + args.is_group = is_group; + args.is_role = is_role; + args.db_name = db_name; + args.table_name = table_name; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_list_security_table_grant() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + list_security_table_grant_result result = new list_security_table_grant_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_security_table_grant failed: unknown result"); + } + + public List list_security_partition_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name) throws MetaException, TException + { + send_list_security_partition_grant(principal_name, is_group, is_role, db_name, table_name, part_name); + return recv_list_security_partition_grant(); + } + + public void send_list_security_partition_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_security_partition_grant", TMessageType.CALL, seqid_)); + list_security_partition_grant_args args = new list_security_partition_grant_args(); + args.principal_name = principal_name; + args.is_group = is_group; + args.is_role = is_role; + args.db_name = db_name; + args.table_name = table_name; + args.part_name = part_name; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_list_security_partition_grant() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + list_security_partition_grant_result result = new list_security_partition_grant_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_security_partition_grant failed: unknown result"); + } + + public List list_security_column_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, String column_name) throws MetaException, TException + { + send_list_security_column_grant(principal_name, is_group, is_role, db_name, table_name, part_name, column_name); + return recv_list_security_column_grant(); + } + + public void send_list_security_column_grant(String principal_name, boolean is_group, boolean is_role, String db_name, String table_name, String part_name, String column_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("list_security_column_grant", TMessageType.CALL, seqid_)); + list_security_column_grant_args args = new list_security_column_grant_args(); + args.principal_name = principal_name; + args.is_group = is_group; + args.is_role = is_role; + args.db_name = db_name; + args.table_name = table_name; + args.part_name = part_name; + args.column_name = column_name; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public List recv_list_security_column_grant() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + list_security_column_grant_result result = new list_security_column_grant_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "list_security_column_grant failed: unknown result"); + } + + public boolean grant_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, String grantor) throws MetaException, TException + { + send_grant_privileges(user_name, is_role, is_group, privileges, grantor); + return recv_grant_privileges(); + } + + public void send_grant_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges, String grantor) throws TException + { + oprot_.writeMessageBegin(new TMessage("grant_privileges", TMessageType.CALL, seqid_)); + grant_privileges_args args = new grant_privileges_args(); + args.user_name = user_name; + args.is_role = is_role; + args.is_group = is_group; + args.privileges = privileges; + args.grantor = grantor; + args.write(oprot_); + oprot_.writeMessageEnd(); + 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; + } + 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(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges) throws MetaException, TException + { + send_revoke_privileges(user_name, is_role, is_group, privileges); + return recv_revoke_privileges(); + } + + public void send_revoke_privileges(String user_name, boolean is_role, boolean is_group, PrivilegeBag privileges) throws TException + { + oprot_.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.CALL, seqid_)); + revoke_privileges_args args = new revoke_privileges_args(); + args.user_name = user_name; + args.is_role = is_role; + args.is_group = is_group; + args.privileges = 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; + } + 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 boolean revoke_all_privileges(String user_name, boolean is_role, boolean is_group, boolean remove_user_priv, List dbs, List
tables, List parts, Map> columns) throws MetaException, TException + { + send_revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns); + return recv_revoke_all_privileges(); + } + + public void send_revoke_all_privileges(String user_name, boolean is_role, boolean is_group, boolean remove_user_priv, List dbs, List
tables, List parts, Map> columns) throws TException + { + oprot_.writeMessageBegin(new TMessage("revoke_all_privileges", TMessageType.CALL, seqid_)); + revoke_all_privileges_args args = new revoke_all_privileges_args(); + args.user_name = user_name; + args.is_role = is_role; + args.is_group = is_group; + args.remove_user_priv = remove_user_priv; + args.dbs = dbs; + args.tables = tables; + args.parts = parts; + args.columns = columns; + args.write(oprot_); + oprot_.writeMessageEnd(); + oprot_.getTransport().flush(); + } + + public boolean recv_revoke_all_privileges() throws MetaException, TException + { + TMessage msg = iprot_.readMessageBegin(); + if (msg.type == TMessageType.EXCEPTION) { + TApplicationException x = TApplicationException.read(iprot_); + iprot_.readMessageEnd(); + throw x; + } + revoke_all_privileges_result result = new revoke_all_privileges_result(); + result.read(iprot_); + iprot_.readMessageEnd(); + if (result.isSetSuccess()) { + return result.success; + } + if (result.o1 != null) { + throw result.o1; + } + throw new TApplicationException(TApplicationException.MISSING_RESULT, "revoke_all_privileges failed: unknown result"); + } + + } + public static class Processor extends com.facebook.fb303.FacebookService.Processor implements TProcessor { + private static final Logger LOGGER = Logger.getLogger(Processor.class.getName()); + public Processor(Iface iface) + { + super(iface); + iface_ = iface; + processMap_.put("create_database", new create_database()); + processMap_.put("get_database", new get_database()); + processMap_.put("drop_database", new drop_database()); + processMap_.put("get_databases", new get_databases()); + processMap_.put("get_all_databases", new get_all_databases()); + processMap_.put("get_type", new get_type()); + processMap_.put("create_type", new create_type()); + processMap_.put("drop_type", new drop_type()); + processMap_.put("get_type_all", new get_type_all()); + processMap_.put("get_fields", new get_fields()); + processMap_.put("get_schema", new get_schema()); + processMap_.put("create_table", new create_table()); + processMap_.put("drop_table", new drop_table()); + processMap_.put("get_tables", new get_tables()); + processMap_.put("get_all_tables", new get_all_tables()); + processMap_.put("get_table", new get_table()); + processMap_.put("alter_table", new alter_table()); + processMap_.put("add_partition", new add_partition()); + processMap_.put("append_partition", new append_partition()); + processMap_.put("append_partition_by_name", new append_partition_by_name()); + processMap_.put("drop_partition", new drop_partition()); + processMap_.put("drop_partition_by_name", new drop_partition_by_name()); + processMap_.put("get_partition", new get_partition()); + processMap_.put("get_partition_with_auth", new get_partition_with_auth()); + processMap_.put("get_partition_by_name", new get_partition_by_name()); + processMap_.put("get_partitions", new get_partitions()); + processMap_.put("get_partitions_with_auth", new get_partitions_with_auth()); + processMap_.put("get_partition_names", new get_partition_names()); + processMap_.put("get_partitions_ps", new get_partitions_ps()); + processMap_.put("get_partitions_ps_with_auth", new get_partitions_ps_with_auth()); + processMap_.put("get_partition_names_ps", new get_partition_names_ps()); + processMap_.put("get_partitions_by_filter", new get_partitions_by_filter()); + processMap_.put("alter_partition", new alter_partition()); + processMap_.put("get_config_value", new get_config_value()); + processMap_.put("partition_name_to_vals", new partition_name_to_vals()); + processMap_.put("partition_name_to_spec", new partition_name_to_spec()); + processMap_.put("add_index", new add_index()); + processMap_.put("alter_index", new alter_index()); + processMap_.put("drop_index_by_name", new drop_index_by_name()); + processMap_.put("get_index_by_name", new get_index_by_name()); + processMap_.put("get_indexes", new get_indexes()); + processMap_.put("get_index_names", new get_index_names()); + processMap_.put("get_user_privilege_set", new get_user_privilege_set()); + processMap_.put("get_db_privilege_set", new get_db_privilege_set()); + processMap_.put("get_table_privilege_set", new get_table_privilege_set()); + processMap_.put("get_partition_privilege_set", new get_partition_privilege_set()); + processMap_.put("get_column_privilege_set", new get_column_privilege_set()); + processMap_.put("create_role", new create_role()); + processMap_.put("drop_role", new drop_role()); + processMap_.put("add_role_member", new add_role_member()); + processMap_.put("remove_role_member", new remove_role_member()); + processMap_.put("list_roles", new list_roles()); + processMap_.put("list_security_user_grant", new list_security_user_grant()); + processMap_.put("list_security_db_grant", new list_security_db_grant()); + processMap_.put("list_security_table_grant", new list_security_table_grant()); + processMap_.put("list_security_partition_grant", new list_security_partition_grant()); + processMap_.put("list_security_column_grant", new list_security_column_grant()); + processMap_.put("grant_privileges", new grant_privileges()); + processMap_.put("revoke_privileges", new revoke_privileges()); + processMap_.put("revoke_all_privileges", new revoke_all_privileges()); + } + + private Iface iface_; + + public boolean process(TProtocol iprot, TProtocol oprot) throws TException + { + TMessage msg = iprot.readMessageBegin(); + ProcessFunction fn = processMap_.get(msg.name); + if (fn == null) { + TProtocolUtil.skip(iprot, TType.STRUCT); + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'"); + oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return true; + } + fn.process(msg.seqid, iprot, oprot); + return true; } private class create_database implements ProcessFunction { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { - create_database_args args = new create_database_args(); - args.read(iprot); - 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; + create_database_args args = new create_database_args(); + args.read(iprot); + iprot.readMessageEnd(); + create_database_result result = new create_database_result(); + try { + iface_.create_database(args.database); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing create_database", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_database"); + oprot.writeMessageBegin(new TMessage("create_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("create_database", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_database implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_database_args args = new get_database_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_database_result result = new get_database_result(); + try { + result.success = iface_.get_database(args.name); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_database", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_database"); + oprot.writeMessageBegin(new TMessage("get_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_database", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_database implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_database_args args = new drop_database_args(); + args.read(iprot); + iprot.readMessageEnd(); + drop_database_result result = new drop_database_result(); + try { + iface_.drop_database(args.name, args.deleteData); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (InvalidOperationException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_database", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_database"); + oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_databases implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_databases_args args = new get_databases_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_databases_result result = new get_databases_result(); + try { + result.success = iface_.get_databases(args.pattern); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_databases", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_databases"); + oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_all_databases implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_all_databases_args args = new get_all_databases_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_all_databases_result result = new get_all_databases_result(); + try { + result.success = iface_.get_all_databases(); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_all_databases", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_databases"); + oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_type implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_type_args args = new get_type_args(); + args.read(iprot); + 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(); + args.read(iprot); + iprot.readMessageEnd(); + create_type_result result = new create_type_result(); + try { + result.success = iface_.create_type(args.type); + result.__isset.success = 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(); + args.read(iprot); + iprot.readMessageEnd(); + drop_type_result result = new drop_type_result(); + try { + result.success = iface_.drop_type(args.type); + result.__isset.success = 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(); + args.read(iprot); + 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(); + args.read(iprot); + 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(); + args.read(iprot); + iprot.readMessageEnd(); + get_schema_result result = new get_schema_result(); + try { + result.success = iface_.get_schema(args.db_name, args.table_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (UnknownTableException o2) { + result.o2 = o2; + } catch (UnknownDBException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_schema", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_schema"); + oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class create_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + create_table_args args = new create_table_args(); + args.read(iprot); + iprot.readMessageEnd(); + create_table_result result = new create_table_result(); + try { + iface_.create_table(args.tbl); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (NoSuchObjectException o4) { + result.o4 = o4; + } catch (Throwable th) { + LOGGER.error("Internal error processing create_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_table"); + oprot.writeMessageBegin(new TMessage("create_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("create_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_table_args args = new drop_table_args(); + args.read(iprot); + iprot.readMessageEnd(); + drop_table_result result = new drop_table_result(); + try { + iface_.drop_table(args.dbname, args.name, args.deleteData); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_table"); + oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_tables implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_tables_args args = new get_tables_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_tables_result result = new get_tables_result(); + try { + result.success = iface_.get_tables(args.db_name, args.pattern); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_tables", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_tables"); + oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_all_tables implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_all_tables_args args = new get_all_tables_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_all_tables_result result = new get_all_tables_result(); + try { + result.success = iface_.get_all_tables(args.db_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_all_tables", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_tables"); + oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_table_args args = new get_table_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_table_result result = new get_table_result(); + try { + result.success = iface_.get_table(args.dbname, args.tbl_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_table"); + oprot.writeMessageBegin(new TMessage("get_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class alter_table implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + alter_table_args args = new alter_table_args(); + args.read(iprot); + iprot.readMessageEnd(); + alter_table_result result = new alter_table_result(); + try { + iface_.alter_table(args.dbname, args.tbl_name, args.new_tbl); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing alter_table", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_table"); + oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class add_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + add_partition_args args = new add_partition_args(); + args.read(iprot); + iprot.readMessageEnd(); + add_partition_result result = new add_partition_result(); + try { + result.success = iface_.add_partition(args.new_part); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing add_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_partition"); + oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class append_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + append_partition_args args = new append_partition_args(); + args.read(iprot); + iprot.readMessageEnd(); + append_partition_result result = new append_partition_result(); + try { + result.success = iface_.append_partition(args.db_name, args.tbl_name, args.part_vals); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing append_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition"); + oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class append_partition_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + append_partition_by_name_args args = new append_partition_by_name_args(); + args.read(iprot); + iprot.readMessageEnd(); + append_partition_by_name_result result = new append_partition_by_name_result(); + try { + result.success = iface_.append_partition_by_name(args.db_name, args.tbl_name, args.part_name); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing append_partition_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition_by_name"); + oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_partition_args args = new drop_partition_args(); + args.read(iprot); + iprot.readMessageEnd(); + drop_partition_result result = new drop_partition_result(); + try { + result.success = iface_.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition"); + oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_partition_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_partition_by_name_args args = new drop_partition_by_name_args(); + args.read(iprot); + iprot.readMessageEnd(); + drop_partition_by_name_result result = new drop_partition_by_name_result(); + try { + result.success = iface_.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_partition_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition_by_name"); + oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_args args = new get_partition_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_partition_result result = new get_partition_result(); + try { + result.success = iface_.get_partition(args.db_name, args.tbl_name, args.part_vals); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition"); + oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_with_auth implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_with_auth_args args = new get_partition_with_auth_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_partition_with_auth_result result = new get_partition_with_auth_result(); + try { + result.success = iface_.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_with_auth", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_with_auth"); + oprot.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_with_auth", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_by_name_args args = new get_partition_by_name_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_partition_by_name_result result = new get_partition_by_name_result(); + try { + result.success = iface_.get_partition_by_name(args.db_name, args.tbl_name, args.part_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_by_name"); + oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_args args = new get_partitions_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_partitions_result result = new get_partitions_result(); + try { + result.success = iface_.get_partitions(args.db_name, args.tbl_name, args.max_parts); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions"); + oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions_with_auth implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_with_auth_args args = new get_partitions_with_auth_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_partitions_with_auth_result result = new get_partitions_with_auth_result(); + try { + result.success = iface_.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions_with_auth", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_with_auth"); + oprot.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions_with_auth", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_names implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_names_args args = new get_partition_names_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_partition_names_result result = new get_partition_names_result(); + try { + result.success = iface_.get_partition_names(args.db_name, args.tbl_name, args.max_parts); + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_names", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names"); + oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions_ps implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_ps_args args = new get_partitions_ps_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_partitions_ps_result result = new get_partitions_ps_result(); + try { + result.success = iface_.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions_ps", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_ps"); + oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions_ps_with_auth implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_ps_with_auth_args args = new get_partitions_ps_with_auth_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_partitions_ps_with_auth_result result = new get_partitions_ps_with_auth_result(); + try { + result.success = iface_.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions_ps_with_auth", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_ps_with_auth"); + oprot.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions_ps_with_auth", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_names_ps implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_names_ps_args args = new get_partition_names_ps_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_partition_names_ps_result result = new get_partition_names_ps_result(); + try { + result.success = iface_.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_names_ps", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names_ps"); + oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partitions_by_filter implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partitions_by_filter_args args = new get_partitions_by_filter_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_partitions_by_filter_result result = new get_partitions_by_filter_result(); + try { + result.success = iface_.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); + } catch (MetaException o1) { + result.o1 = o1; + } catch (NoSuchObjectException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partitions_by_filter", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_by_filter"); + oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class alter_partition implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + alter_partition_args args = new alter_partition_args(); + args.read(iprot); + iprot.readMessageEnd(); + alter_partition_result result = new alter_partition_result(); + try { + iface_.alter_partition(args.db_name, args.tbl_name, args.new_part); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing alter_partition", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_partition"); + oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_config_value implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_config_value_args args = new get_config_value_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_config_value_result result = new get_config_value_result(); + try { + result.success = iface_.get_config_value(args.name, args.defaultValue); + } catch (ConfigValSecurityException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_config_value", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_config_value"); + oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class partition_name_to_vals implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + partition_name_to_vals_args args = new partition_name_to_vals_args(); + args.read(iprot); + iprot.readMessageEnd(); + partition_name_to_vals_result result = new partition_name_to_vals_result(); + try { + result.success = iface_.partition_name_to_vals(args.part_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing partition_name_to_vals", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_vals"); + oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class partition_name_to_spec implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + partition_name_to_spec_args args = new partition_name_to_spec_args(); + args.read(iprot); + iprot.readMessageEnd(); + partition_name_to_spec_result result = new partition_name_to_spec_result(); + try { + result.success = iface_.partition_name_to_spec(args.part_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing partition_name_to_spec", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_spec"); + oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class add_index implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + add_index_args args = new add_index_args(); + args.read(iprot); + iprot.readMessageEnd(); + add_index_result result = new add_index_result(); + try { + result.success = iface_.add_index(args.new_index, args.index_table); + } catch (InvalidObjectException o1) { + result.o1 = o1; + } catch (AlreadyExistsException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing add_index", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_index"); + oprot.writeMessageBegin(new TMessage("add_index", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("add_index", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class alter_index implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + alter_index_args args = new alter_index_args(); + args.read(iprot); + iprot.readMessageEnd(); + alter_index_result result = new alter_index_result(); + try { + iface_.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); + } catch (InvalidOperationException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing alter_index", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_index"); + oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_index_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_index_by_name_args args = new drop_index_by_name_args(); + args.read(iprot); + iprot.readMessageEnd(); + drop_index_by_name_result result = new drop_index_by_name_result(); + try { + result.success = iface_.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); + result.__isset.success = true; + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_index_by_name", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_index_by_name"); + oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_index_by_name implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_index_by_name_args args = new get_index_by_name_args(); + args.read(iprot); + 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(); + args.read(iprot); + 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(); + args.read(iprot); + iprot.readMessageEnd(); + get_index_names_result result = new get_index_names_result(); + try { + result.success = iface_.get_index_names(args.db_name, args.tbl_name, args.max_indexes); + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_index_names", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_index_names"); + oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_user_privilege_set implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_user_privilege_set_args args = new get_user_privilege_set_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_user_privilege_set_result result = new get_user_privilege_set_result(); + try { + result.success = iface_.get_user_privilege_set(args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_user_privilege_set", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_user_privilege_set"); + oprot.writeMessageBegin(new TMessage("get_user_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_user_privilege_set", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_db_privilege_set implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_db_privilege_set_args args = new get_db_privilege_set_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_db_privilege_set_result result = new get_db_privilege_set_result(); + try { + result.success = iface_.get_db_privilege_set(args.db_name, args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_db_privilege_set", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_db_privilege_set"); + oprot.writeMessageBegin(new TMessage("get_db_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_db_privilege_set", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_table_privilege_set implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_table_privilege_set_args args = new get_table_privilege_set_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_table_privilege_set_result result = new get_table_privilege_set_result(); + try { + result.success = iface_.get_table_privilege_set(args.db_name, args.table_name, args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_table_privilege_set", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_table_privilege_set"); + oprot.writeMessageBegin(new TMessage("get_table_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_table_privilege_set", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_partition_privilege_set implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_partition_privilege_set_args args = new get_partition_privilege_set_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_partition_privilege_set_result result = new get_partition_privilege_set_result(); + try { + result.success = iface_.get_partition_privilege_set(args.db_name, args.table_name, args.part_name, args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_partition_privilege_set", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_privilege_set"); + oprot.writeMessageBegin(new TMessage("get_partition_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_partition_privilege_set", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_column_privilege_set implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_column_privilege_set_args args = new get_column_privilege_set_args(); + args.read(iprot); + iprot.readMessageEnd(); + get_column_privilege_set_result result = new get_column_privilege_set_result(); + try { + result.success = iface_.get_column_privilege_set(args.db_name, args.table_name, args.part_name, args.column_name, args.user_name, args.group_names); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_column_privilege_set", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_column_privilege_set"); + oprot.writeMessageBegin(new TMessage("get_column_privilege_set", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_column_privilege_set", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class create_role implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + create_role_args args = new create_role_args(); + args.read(iprot); + iprot.readMessageEnd(); + create_role_result result = new create_role_result(); + try { + result.success = iface_.create_role(args.role_name, args.owner_name, args.db_name); + result.__isset.success = 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(); + args.read(iprot); + iprot.readMessageEnd(); + drop_role_result result = new drop_role_result(); + try { + result.success = iface_.drop_role(args.role_name, args.db_name); + result.__isset.success = true; + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_role", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_role"); + oprot.writeMessageBegin(new TMessage("drop_role", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_role", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class add_role_member implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + add_role_member_args args = new add_role_member_args(); + args.read(iprot); + iprot.readMessageEnd(); + add_role_member_result result = new add_role_member_result(); + try { + result.success = iface_.add_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name); + result.__isset.success = true; + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing add_role_member", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_role_member"); + oprot.writeMessageBegin(new TMessage("add_role_member", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("add_role_member", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class remove_role_member implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + remove_role_member_args args = new remove_role_member_args(); + args.read(iprot); + iprot.readMessageEnd(); + remove_role_member_result result = new remove_role_member_result(); + try { + result.success = iface_.remove_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name); + result.__isset.success = true; + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing remove_role_member", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing remove_role_member"); + oprot.writeMessageBegin(new TMessage("remove_role_member", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("remove_role_member", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_roles implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_roles_args args = new list_roles_args(); + args.read(iprot); + iprot.readMessageEnd(); + list_roles_result result = new list_roles_result(); + try { + result.success = iface_.list_roles(args.principal_name, args.is_role, args.is_group, args.db_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_roles", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_roles"); + oprot.writeMessageBegin(new TMessage("list_roles", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_roles", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_security_user_grant implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_security_user_grant_args args = new list_security_user_grant_args(); + args.read(iprot); + iprot.readMessageEnd(); + list_security_user_grant_result result = new list_security_user_grant_result(); + try { + result.success = iface_.list_security_user_grant(args.principla_name, args.is_role, args.is_group); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_security_user_grant", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_security_user_grant"); + oprot.writeMessageBegin(new TMessage("list_security_user_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_security_user_grant", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_security_db_grant implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_security_db_grant_args args = new list_security_db_grant_args(); + args.read(iprot); + iprot.readMessageEnd(); + list_security_db_grant_result result = new list_security_db_grant_result(); + try { + result.success = iface_.list_security_db_grant(args.principal_name, args.is_group, args.is_role, args.db_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_security_db_grant", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_security_db_grant"); + oprot.writeMessageBegin(new TMessage("list_security_db_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_security_db_grant", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_security_table_grant implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_security_table_grant_args args = new list_security_table_grant_args(); + args.read(iprot); + iprot.readMessageEnd(); + list_security_table_grant_result result = new list_security_table_grant_result(); + try { + result.success = iface_.list_security_table_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_security_table_grant", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_security_table_grant"); + oprot.writeMessageBegin(new TMessage("list_security_table_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_security_table_grant", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_security_partition_grant implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_security_partition_grant_args args = new list_security_partition_grant_args(); + args.read(iprot); + iprot.readMessageEnd(); + list_security_partition_grant_result result = new list_security_partition_grant_result(); + try { + result.success = iface_.list_security_partition_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_security_partition_grant", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_security_partition_grant"); + oprot.writeMessageBegin(new TMessage("list_security_partition_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_security_partition_grant", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class list_security_column_grant implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + list_security_column_grant_args args = new list_security_column_grant_args(); + args.read(iprot); + iprot.readMessageEnd(); + list_security_column_grant_result result = new list_security_column_grant_result(); + try { + result.success = iface_.list_security_column_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name, args.column_name); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing list_security_column_grant", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing list_security_column_grant"); + oprot.writeMessageBegin(new TMessage("list_security_column_grant", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("list_security_column_grant", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class grant_privileges implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + grant_privileges_args args = new grant_privileges_args(); + args.read(iprot); + iprot.readMessageEnd(); + grant_privileges_result result = new grant_privileges_result(); + try { + result.success = iface_.grant_privileges(args.user_name, args.is_role, args.is_group, args.privileges, args.grantor); + result.__isset.success = 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(); + args.read(iprot); + iprot.readMessageEnd(); + revoke_privileges_result result = new revoke_privileges_result(); + try { + result.success = iface_.revoke_privileges(args.user_name, args.is_role, args.is_group, args.privileges); + result.__isset.success = true; + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing revoke_privileges", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing revoke_privileges"); + oprot.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("revoke_privileges", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class revoke_all_privileges implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + revoke_all_privileges_args args = new revoke_all_privileges_args(); + args.read(iprot); + iprot.readMessageEnd(); + revoke_all_privileges_result result = new revoke_all_privileges_result(); + try { + result.success = iface_.revoke_all_privileges(args.user_name, args.is_role, args.is_group, args.remove_user_priv, args.dbs, args.tables, args.parts, args.columns); + result.__isset.success = true; + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing revoke_all_privileges", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing revoke_all_privileges"); + oprot.writeMessageBegin(new TMessage("revoke_all_privileges", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("revoke_all_privileges", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + } + + public static class create_database_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_database_args"); + private static final TField DATABASE_FIELD_DESC = new TField("database", TType.STRUCT, (short)1); + + private Database database; + public static final int DATABASE = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Database.class))); + }}); + + static { + 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); + } + } + + @Override + public create_database_args clone() { + return new create_database_args(this); + } + + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DATABASE: + if (value == null) { + unsetDatabase(); + } else { + setDatabase((Database)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DATABASE: + return getDatabase(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DATABASE: + return isSetDatabase(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 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); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int O1 = 1; + private InvalidObjectException o2; + public static final int O2 = 2; + private MetaException o3; + public static final int O3 = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + 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); + } + } + + @Override + public create_database_result clone() { + return new create_database_result(this); + } + + 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 O1: + if (field.type == TType.STRUCT) { + this.o1 = new AlreadyExistsException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new InvalidObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int NAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + 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; + } + } + + @Override + public get_database_args clone() { + return new get_database_args(this); + } + + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case NAME: + return getName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case NAME: + return isSetName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 NAME: + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int SUCCESS = 0; + private NoSuchObjectException o1; + public static final int O1 = 1; + private MetaException o2; + public static final int O2 = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Database.class))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + 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); + } + } + + @Override + public get_database_result clone() { + return new get_database_result(this); + } + + 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 SUCCESS: + if (field.type == TType.STRUCT) { + this.success = new Database(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int NAME = 1; + private boolean deleteData; + public static final int DELETEDATA = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean deleteData = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + }}); + + static { + 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; + this.__isset.deleteData = true; + } + + /** + * Performs a deep copy on other. + */ + public drop_database_args(drop_database_args other) { + if (other.isSetName()) { + this.name = other.name; + } + __isset.deleteData = other.__isset.deleteData; + this.deleteData = other.deleteData; + } + + @Override + public drop_database_args clone() { + return new drop_database_args(this); + } + + 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 boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + this.__isset.deleteData = true; + } + + public void unsetDeleteData() { + this.__isset.deleteData = false; + } + + // Returns true if field deleteData is set (has been asigned a value) and false otherwise + public boolean isSetDeleteData() { + return this.__isset.deleteData; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DELETEDATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case NAME: + return getName(); + + case DELETEDATA: + return new Boolean(isDeleteData()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case NAME: + return isSetName(); + case DELETEDATA: + return isSetDeleteData(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 NAME: + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DELETEDATA: + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + this.__isset.deleteData = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int O1 = 1; + private InvalidOperationException o2; + public static final int O2 = 2; + private MetaException o3; + public static final int O3 = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + 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); + } + } + + @Override + public drop_database_result clone() { + return new drop_database_result(this); + } + + 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 O1: + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new InvalidOperationException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int PATTERN = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + 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; + } + } + + @Override + public get_databases_args clone() { + return new get_databases_args(this); + } + + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case PATTERN: + if (value == null) { + unsetPattern(); + } else { + setPattern((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case PATTERN: + return getPattern(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case PATTERN: + return isSetPattern(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 PATTERN: + if (field.type == TType.STRING) { + this.pattern = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + 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); + } + } + + @Override + public get_databases_result clone() { + return new get_databases_result(this); + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 SUCCESS: + if (field.type == TType.LIST) { + { + TList _list97 = iprot.readListBegin(); + this.success = new ArrayList(_list97.size); + for (int _i98 = 0; _i98 < _list97.size; ++_i98) + { + String _elem99; + _elem99 = iprot.readString(); + this.success.add(_elem99); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 _iter100 : this.success) { + oprot.writeString(_iter100); + } + 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 + // check that fields of type enum have valid values + } + + } + + 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 final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + }}); + + static { + 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) { + } + + @Override + public get_all_databases_args clone() { + return new get_all_databases_args(this); + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + 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); + } + } + + @Override + public get_all_databases_result clone() { + return new get_all_databases_result(this); + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 SUCCESS: + if (field.type == TType.LIST) { + { + TList _list101 = iprot.readListBegin(); + this.success = new ArrayList(_list101.size); + for (int _i102 = 0; _i102 < _list101.size; ++_i102) + { + String _elem103; + _elem103 = iprot.readString(); + this.success.add(_elem103); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 _iter104 : this.success) { + oprot.writeString(_iter104); + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int NAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + 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; + } + } + + @Override + public get_type_args clone() { + return new get_type_args(this); + } + + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case NAME: + return getName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case NAME: + return isSetName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 NAME: + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + private NoSuchObjectException o2; + public static final int O2 = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Type.class))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + 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); + } + } + + @Override + public get_type_result clone() { + return new get_type_result(this); + } + + 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 SUCCESS: + if (field.type == TType.STRUCT) { + this.success = new Type(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int TYPE = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Type.class))); + }}); + + static { + 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); + } + } + + @Override + public create_type_args clone() { + return new create_type_args(this); + } + + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((Type)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TYPE: + return getType(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TYPE: + return isSetType(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 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); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int SUCCESS = 0; + private AlreadyExistsException o1; + public static final int O1 = 1; + private InvalidObjectException o2; + public static final int O2 = 2; + private MetaException o3; + public static final int O3 = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean success = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + 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; + this.__isset.success = 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.success = other.__isset.success; + 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); + } + } + + @Override + public create_type_result clone() { + return new create_type_result(this); + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + this.__isset.success = true; + } + + public void unsetSuccess() { + this.__isset.success = false; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; + } + + 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 SUCCESS: + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new AlreadyExistsException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new InvalidObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int TYPE = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + 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; + } + } + + @Override + public drop_type_args clone() { + return new drop_type_args(this); + } + + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TYPE: + if (value == null) { + unsetType(); + } else { + setType((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TYPE: + return getType(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TYPE: + return isSetType(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 TYPE: + if (field.type == TType.STRING) { + this.type = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + private NoSuchObjectException o2; + public static final int O2 = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean success = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + 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; + this.__isset.success = true; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_type_result(drop_type_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + @Override + public drop_type_result clone() { + return new drop_type_result(this); + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + this.__isset.success = true; + } + + public void unsetSuccess() { + this.__isset.success = false; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 SUCCESS: + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int NAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + 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; + } + } + + @Override + public get_type_all_args clone() { + return new get_type_all_args(this); + } + + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case NAME: + return getName(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case NAME: + return isSetName(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 NAME: + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int SUCCESS = 0; + private MetaException o2; + public static final int O2 = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new StructMetaData(TType.STRUCT, Type.class)))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + 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); + } + } + + @Override + public get_type_all_result clone() { + return new get_type_all_result(this); + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O2: + return getO2(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O2: + return isSetO2(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 SUCCESS: + if (field.type == TType.MAP) { + { + TMap _map105 = iprot.readMapBegin(); + this.success = new HashMap(2*_map105.size); + for (int _i106 = 0; _i106 < _map105.size; ++_i106) + { + String _key107; + Type _val108; + _key107 = iprot.readString(); + _val108 = new Type(); + _val108.read(iprot); + this.success.put(_key107, _val108); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 _iter109 : this.success.entrySet()) { + oprot.writeString(_iter109.getKey()); + _iter109.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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int DB_NAME = 1; + private String table_name; + public static final int TABLE_NAME = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + 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; + } + } + + @Override + public get_fields_args clone() { + return new get_fields_args(this); + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + private UnknownTableException o2; + public static final int O2 = 2; + private UnknownDBException o3; + public static final int O3 = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, FieldSchema.class)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + 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); + } + } + + @Override + public get_fields_result clone() { + return new get_fields_result(this); + } + + 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 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 SUCCESS: + if (field.type == TType.LIST) { + { + TList _list110 = iprot.readListBegin(); + this.success = new ArrayList(_list110.size); + for (int _i111 = 0; _i111 < _list110.size; ++_i111) + { + FieldSchema _elem112; + _elem112 = new FieldSchema(); + _elem112.read(iprot); + this.success.add(_elem112); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new UnknownTableException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 _iter113 : this.success) { + _iter113.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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int DB_NAME = 1; + private String table_name; + public static final int TABLE_NAME = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + 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; + } + } + + @Override + public get_schema_args clone() { + return new get_schema_args(this); + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 + // check that fields of type enum have valid values + } + + } + + 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; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + private UnknownTableException o2; + public static final int O2 = 2; + private UnknownDBException o3; + public static final int O3 = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, FieldSchema.class)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + 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); + } + } + + @Override + public get_schema_result clone() { + return new get_schema_result(this); + } + + 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 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @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 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 SUCCESS: + if (field.type == TType.LIST) { + { + TList _list114 = iprot.readListBegin(); + this.success = new ArrayList(_list114.size); + for (int _i115 = 0; _i115 < _list114.size; ++_i115) + { + FieldSchema _elem116; + _elem116 = new FieldSchema(); + _elem116.read(iprot); + this.success.add(_elem116); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new UnknownTableException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 _iter117 : this.success) { + _iter117.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_schema_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class create_table_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("create_table_args"); + private static final TField TBL_FIELD_DESC = new TField("tbl", TType.STRUCT, (short)1); + + private Table tbl; + public static final int TBL = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(TBL, new FieldMetaData("tbl", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); + } + + public create_table_args() { + } + + public create_table_args( + Table tbl) + { + this(); + this.tbl = tbl; + } + + /** + * Performs a deep copy on other. + */ + public create_table_args(create_table_args other) { + if (other.isSetTbl()) { + this.tbl = new Table(other.tbl); + } + } + + @Override + public create_table_args clone() { + return new create_table_args(this); + } + + public Table getTbl() { + return this.tbl; + } + + public void setTbl(Table tbl) { + this.tbl = tbl; + } + + public void unsetTbl() { + this.tbl = null; + } + + // Returns true if field tbl is set (has been asigned a value) and false otherwise + public boolean isSetTbl() { + return this.tbl != null; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case TBL: + if (value == null) { + unsetTbl(); + } else { + setTbl((Table)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case TBL: + return getTbl(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case TBL: + return isSetTbl(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_args) + return this.equals((create_table_args)that); + return false; + } + + public boolean equals(create_table_args that) { + if (that == null) + return false; + + boolean this_present_tbl = true && this.isSetTbl(); + boolean that_present_tbl = true && that.isSetTbl(); + if (this_present_tbl || that_present_tbl) { + if (!(this_present_tbl && that_present_tbl)) + return false; + if (!this.tbl.equals(that.tbl)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 TBL: + if (field.type == TType.STRUCT) { + this.tbl = new Table(); + this.tbl.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.tbl != null) { + oprot.writeFieldBegin(TBL_FIELD_DESC); + this.tbl.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_table_args("); + boolean first = true; + + sb.append("tbl:"); + if (this.tbl == null) { + sb.append("null"); + } else { + sb.append(this.tbl); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + 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; + public static final int O1 = 1; + private InvalidObjectException o2; + public static final int O2 = 2; + private MetaException o3; + public static final int O3 = 3; + private NoSuchObjectException o4; + public static final int O4 = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O4, new FieldMetaData("o4", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); + } + + public create_table_result() { + } + + public create_table_result( + AlreadyExistsException o1, + InvalidObjectException o2, + MetaException o3, + NoSuchObjectException o4) + { + this(); + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + this.o4 = o4; + } + + /** + * Performs a deep copy on other. + */ + public create_table_result(create_table_result other) { + if (other.isSetO1()) { + this.o1 = new AlreadyExistsException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new InvalidObjectException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + if (other.isSetO4()) { + this.o4 = new NoSuchObjectException(other.o4); + } + } + + @Override + public create_table_result clone() { + return new create_table_result(this); + } + + 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 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((AlreadyExistsException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((InvalidObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + case O4: + if (value == null) { + unsetO4(); + } else { + setO4((NoSuchObjectException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + case O4: + return getO4(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + case O4: + return isSetO4(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof create_table_result) + return this.equals((create_table_result)that); + return false; + } + + public boolean equals(create_table_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + boolean this_present_o4 = true && this.isSetO4(); + boolean that_present_o4 = true && that.isSetO4(); + if (this_present_o4 || that_present_o4) { + if (!(this_present_o4 && that_present_o4)) + return false; + if (!this.o4.equals(that.o4)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 O1: + if (field.type == TType.STRUCT) { + this.o1 = new AlreadyExistsException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new InvalidObjectException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O3: + if (field.type == TType.STRUCT) { + this.o3 = new MetaException(); + this.o3.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO4()) { + oprot.writeFieldBegin(O4_FIELD_DESC); + this.o4.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("create_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + if (!first) sb.append(", "); + sb.append("o4:"); + if (this.o4 == null) { + sb.append("null"); + } else { + sb.append(this.o4); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class drop_table_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_table_args"); + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)2); + private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)3); + + private String dbname; + public static final int DBNAME = 1; + private String name; + public static final int NAME = 2; + private boolean deleteData; + public static final int DELETEDATA = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean deleteData = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); + } + + public drop_table_args() { + } + + public drop_table_args( + String dbname, + String name, + boolean deleteData) + { + this(); + this.dbname = dbname; + this.name = name; + this.deleteData = deleteData; + this.__isset.deleteData = true; + } + + /** + * Performs a deep copy on other. + */ + public drop_table_args(drop_table_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetName()) { + this.name = other.name; + } + __isset.deleteData = other.__isset.deleteData; + this.deleteData = other.deleteData; + } + + @Override + public drop_table_args clone() { + return new drop_table_args(this); + } + + 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 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 boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + this.__isset.deleteData = true; + } + + public void unsetDeleteData() { + this.__isset.deleteData = false; + } + + // Returns true if field deleteData is set (has been asigned a value) and false otherwise + public boolean isSetDeleteData() { + return this.__isset.deleteData; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case NAME: + if (value == null) { + unsetName(); + } else { + setName((String)value); + } + break; + + case DELETEDATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DBNAME: + return getDbname(); + + case NAME: + return getName(); + + case DELETEDATA: + return new Boolean(isDeleteData()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DBNAME: + return isSetDbname(); + case NAME: + return isSetName(); + case DELETEDATA: + return isSetDeleteData(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_table_args) + return this.equals((drop_table_args)that); + return false; + } + + public boolean equals(drop_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 DBNAME: + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case NAME: + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DELETEDATA: + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + this.__isset.deleteData = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + oprot.writeFieldEnd(); + } + if (this.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeString(this.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class drop_table_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_table_result"); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)2); + + private NoSuchObjectException o1; + public static final int O1 = 1; + private MetaException o3; + public static final int O3 = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap); + } + + public drop_table_result() { + } + + public drop_table_result( + NoSuchObjectException o1, + MetaException o3) + { + this(); + this.o1 = o1; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public drop_table_result(drop_table_result other) { + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + @Override + public drop_table_result clone() { + return new drop_table_result(this); + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case O1: + return getO1(); + + case O3: + return getO3(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case O1: + return isSetO1(); + case O3: + return isSetO3(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_table_result) + return this.equals((drop_table_result)that); + return false; + } + + public boolean equals(drop_table_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 O1: + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class get_tables_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_tables_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)2); + + private String db_name; + public static final int DB_NAME = 1; + private String pattern; + public static final int PATTERN = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap); + } + + public get_tables_args() { + } + + public get_tables_args( + String db_name, + String pattern) + { + this(); + this.db_name = db_name; + this.pattern = pattern; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_args(get_tables_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetPattern()) { + this.pattern = other.pattern; + } + } + + @Override + public get_tables_args clone() { + return new get_tables_args(this); + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case PATTERN: + if (value == null) { + unsetPattern(); + } else { + setPattern((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DB_NAME: + return getDb_name(); + + case PATTERN: + return getPattern(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DB_NAME: + return isSetDb_name(); + case PATTERN: + return isSetPattern(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_args) + return this.equals((get_tables_args)that); + return false; + } + + public boolean equals(get_tables_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_pattern = true && this.isSetPattern(); + boolean that_present_pattern = true && that.isSetPattern(); + if (this_present_pattern || that_present_pattern) { + if (!(this_present_pattern && that_present_pattern)) + return false; + if (!this.pattern.equals(that.pattern)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PATTERN: + if (field.type == TType.STRING) { + this.pattern = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.pattern != null) { + oprot.writeFieldBegin(PATTERN_FIELD_DESC); + oprot.writeString(this.pattern); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_tables_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("pattern:"); + if (this.pattern == null) { + sb.append("null"); + } else { + sb.append(this.pattern); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class get_tables_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_tables_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + + private List success; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); + } + + public get_tables_result() { + } + + public get_tables_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_tables_result(get_tables_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + @Override + public get_tables_result clone() { + return new get_tables_result(this); + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_tables_result) + return this.equals((get_tables_result)that); + return false; + } + + public boolean equals(get_tables_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 SUCCESS: + if (field.type == TType.LIST) { + { + TList _list118 = iprot.readListBegin(); + this.success = new ArrayList(_list118.size); + for (int _i119 = 0; _i119 < _list118.size; ++_i119) + { + String _elem120; + _elem120 = iprot.readString(); + this.success.add(_elem120); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 _iter121 : this.success) { + oprot.writeString(_iter121); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_tables_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class get_all_tables_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_all_tables_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + + private String db_name; + public static final int DB_NAME = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(get_all_tables_args.class, metaDataMap); + } + + public get_all_tables_args() { + } + + public get_all_tables_args( + String db_name) + { + this(); + this.db_name = db_name; + } + + /** + * Performs a deep copy on other. + */ + public get_all_tables_args(get_all_tables_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + } + + @Override + public get_all_tables_args clone() { + return new get_all_tables_args(this); + } + + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DB_NAME: + return getDb_name(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DB_NAME: + return isSetDb_name(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_tables_args) + return this.equals((get_all_tables_args)that); + return false; + } + + public boolean equals(get_all_tables_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_all_tables_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class get_all_tables_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_all_tables_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + + private List success; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap); + } + + public get_all_tables_result() { + } + + public get_all_tables_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public get_all_tables_result(get_all_tables_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + @Override + public get_all_tables_result clone() { + return new get_all_tables_result(this); + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_all_tables_result) + return this.equals((get_all_tables_result)that); + return false; + } + + public boolean equals(get_all_tables_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 SUCCESS: + if (field.type == TType.LIST) { + { + TList _list122 = iprot.readListBegin(); + this.success = new ArrayList(_list122.size); + for (int _i123 = 0; _i123 < _list122.size; ++_i123) + { + String _elem124; + _elem124 = iprot.readString(); + this.success.add(_elem124); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + 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 _iter125 : this.success) { + oprot.writeString(_iter125); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_all_tables_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + 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; + public static final int DBNAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(get_table_args.class, metaDataMap); + } + + public get_table_args() { + } + + public get_table_args( + String dbname, + String tbl_name) + { + this(); + this.dbname = dbname; + this.tbl_name = tbl_name; + } + + /** + * Performs a deep copy on other. + */ + public get_table_args(get_table_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + } + + @Override + public get_table_args clone() { + return new get_table_args(this); + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DBNAME: + return getDbname(); + + case TBL_NAME: + return getTbl_name(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DBNAME: + return isSetDbname(); + case TBL_NAME: + return isSetTbl_name(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_args) + return this.equals((get_table_args)that); + return false; + } + + public boolean equals(get_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 DBNAME: + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class get_table_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + + private Table success; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + private NoSuchObjectException o2; + public static final int O2 = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(get_table_result.class, metaDataMap); + } + + public get_table_result() { + } + + public get_table_result( + Table success, + MetaException o1, + NoSuchObjectException o2) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public get_table_result(get_table_result other) { + if (other.isSetSuccess()) { + this.success = new Table(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } + } + + @Override + public get_table_result clone() { + return new get_table_result(this); + } + + public Table getSuccess() { + return this.success; + } + + public void setSuccess(Table success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.success != null; + } + + public 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Table)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_table_result) + return this.equals((get_table_result)that); + return false; + } + + public boolean equals(get_table_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 SUCCESS: + if (field.type == TType.STRUCT) { + this.success = new Table(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_table_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class alter_table_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_table_args"); + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField NEW_TBL_FIELD_DESC = new TField("new_tbl", TType.STRUCT, (short)3); + + private String dbname; + public static final int DBNAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private Table new_tbl; + public static final int NEW_TBL = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(NEW_TBL, new FieldMetaData("new_tbl", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(alter_table_args.class, metaDataMap); + } + + public alter_table_args() { + } + + public alter_table_args( + String dbname, + String tbl_name, + Table new_tbl) + { + this(); + this.dbname = dbname; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; + } + + /** + * Performs a deep copy on other. + */ + public alter_table_args(alter_table_args other) { + if (other.isSetDbname()) { + this.dbname = other.dbname; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_tbl()) { + this.new_tbl = new Table(other.new_tbl); + } + } + + @Override + public alter_table_args clone() { + return new alter_table_args(this); + } + + 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 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 Table getNew_tbl() { + return this.new_tbl; + } + + public void setNew_tbl(Table new_tbl) { + this.new_tbl = new_tbl; + } + + public void unsetNew_tbl() { + this.new_tbl = null; + } + + // Returns true if field new_tbl is set (has been asigned a value) and false otherwise + public boolean isSetNew_tbl() { + return this.new_tbl != null; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DBNAME: + if (value == null) { + unsetDbname(); + } else { + setDbname((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_TBL: + if (value == null) { + unsetNew_tbl(); + } else { + setNew_tbl((Table)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DBNAME: + return getDbname(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_TBL: + return getNew_tbl(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DBNAME: + return isSetDbname(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_TBL: + return isSetNew_tbl(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_args) + return this.equals((alter_table_args)that); + return false; + } + + public boolean equals(alter_table_args that) { + if (that == null) + return false; + + boolean this_present_dbname = true && this.isSetDbname(); + boolean that_present_dbname = true && that.isSetDbname(); + if (this_present_dbname || that_present_dbname) { + if (!(this_present_dbname && that_present_dbname)) + return false; + if (!this.dbname.equals(that.dbname)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_new_tbl = true && this.isSetNew_tbl(); + boolean that_present_new_tbl = true && that.isSetNew_tbl(); + if (this_present_new_tbl || that_present_new_tbl) { + if (!(this_present_new_tbl && that_present_new_tbl)) + return false; + if (!this.new_tbl.equals(that.new_tbl)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 DBNAME: + if (field.type == TType.STRING) { + this.dbname = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case NEW_TBL: + if (field.type == TType.STRUCT) { + this.new_tbl = new Table(); + this.new_tbl.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.dbname != null) { + oprot.writeFieldBegin(DBNAME_FIELD_DESC); + oprot.writeString(this.dbname); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.new_tbl != null) { + oprot.writeFieldBegin(NEW_TBL_FIELD_DESC); + this.new_tbl.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("alter_table_args("); + boolean first = true; + + sb.append("dbname:"); + if (this.dbname == null) { + sb.append("null"); + } else { + sb.append(this.dbname); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_tbl:"); + if (this.new_tbl == null) { + sb.append("null"); + } else { + sb.append(this.new_tbl); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class alter_table_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_table_result"); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + + private InvalidOperationException o1; + public static final int O1 = 1; + private MetaException o2; + public static final int O2 = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(alter_table_result.class, metaDataMap); + } + + public alter_table_result() { + } + + public alter_table_result( + InvalidOperationException o1, + MetaException o2) + { + this(); + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public alter_table_result(alter_table_result other) { + if (other.isSetO1()) { + this.o1 = new InvalidOperationException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + @Override + public alter_table_result clone() { + return new alter_table_result(this); + } + + public InvalidOperationException getO1() { + return this.o1; + } + + public void setO1(InvalidOperationException o1) { + this.o1 = o1; + } + + public void unsetO1() { + this.o1 = null; + } + + // Returns true if field o1 is set (has been asigned a value) and false otherwise + public boolean isSetO1() { + return this.o1 != null; + } + + public 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidOperationException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case O1: + return getO1(); + + case O2: + return getO2(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case O1: + return isSetO1(); + case O2: + return isSetO2(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof alter_table_result) + return this.equals((alter_table_result)that); + return false; + } + + public boolean equals(alter_table_result that) { + if (that == null) + return false; + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 O1: + if (field.type == TType.STRUCT) { + this.o1 = new InvalidOperationException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("alter_table_result("); + boolean first = true; + + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class add_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_partition_args"); + private static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)1); + + private Partition new_part; + public static final int NEW_PART = 1; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(add_partition_args.class, metaDataMap); + } + + public add_partition_args() { + } + + public add_partition_args( + Partition new_part) + { + this(); + this.new_part = new_part; + } + + /** + * Performs a deep copy on other. + */ + public add_partition_args(add_partition_args other) { + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); + } + } + + @Override + public add_partition_args clone() { + return new add_partition_args(this); + } + + public Partition getNew_part() { + return this.new_part; + } + + public void setNew_part(Partition new_part) { + this.new_part = new_part; + } + + public void unsetNew_part() { + this.new_part = null; + } + + // Returns true if field new_part is set (has been asigned a value) and false otherwise + public boolean isSetNew_part() { + return this.new_part != null; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case NEW_PART: + if (value == null) { + unsetNew_part(); + } else { + setNew_part((Partition)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case NEW_PART: + return getNew_part(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case NEW_PART: + return isSetNew_part(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partition_args) + return this.equals((add_partition_args)that); + return false; + } + + public boolean equals(add_partition_args that) { + if (that == null) + return false; + + boolean this_present_new_part = true && this.isSetNew_part(); + boolean that_present_new_part = true && that.isSetNew_part(); + if (this_present_new_part || that_present_new_part) { + if (!(this_present_new_part && that_present_new_part)) + return false; + if (!this.new_part.equals(that.new_part)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 NEW_PART: + if (field.type == TType.STRUCT) { + this.new_part = new Partition(); + this.new_part.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + this.new_part.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("add_partition_args("); + boolean first = true; + + sb.append("new_part:"); + if (this.new_part == null) { + sb.append("null"); + } else { + sb.append(this.new_part); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class add_partition_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_partition_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private Partition success; + public static final int SUCCESS = 0; + private InvalidObjectException o1; + public static final int O1 = 1; + private AlreadyExistsException o2; + public static final int O2 = 2; + private MetaException o3; + public static final int O3 = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(add_partition_result.class, metaDataMap); + } + + public add_partition_result() { + } + + public add_partition_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public add_partition_result(add_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + @Override + public add_partition_result clone() { + return new add_partition_result(this); + } + + 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 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof add_partition_result) + return this.equals((add_partition_result)that); + return false; + } + + public boolean equals(add_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 SUCCESS: + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new InvalidObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("add_partition_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class append_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("append_partition_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private List part_vals; + public static final int PART_VALS = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + }}); + + static { + 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; + } + } + + @Override + public append_partition_args clone() { + return new append_partition_args(this); + } + + 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_args) + return this.equals((append_partition_args)that); + return false; + } + + public boolean equals(append_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PART_VALS: + if (field.type == TType.LIST) { + { + TList _list126 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list126.size); + for (int _i127 = 0; _i127 < _list126.size; ++_i127) + { + String _elem128; + _elem128 = iprot.readString(); + this.part_vals.add(_elem128); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter129 : this.part_vals) { + oprot.writeString(_iter129); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class append_partition_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("append_partition_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private Partition success; + public static final int SUCCESS = 0; + private InvalidObjectException o1; + public static final int O1 = 1; + private AlreadyExistsException o2; + public static final int O2 = 2; + private MetaException o3; + public static final int O3 = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(append_partition_result.class, metaDataMap); + } + + public append_partition_result() { + } + + public append_partition_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_result(append_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + @Override + public append_partition_result clone() { + return new append_partition_result(this); + } + + 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 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_result) + return this.equals((append_partition_result)that); + return false; + } + + public boolean equals(append_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 SUCCESS: + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new InvalidObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class append_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private String part_name; + public static final int PART_NAME = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(append_partition_by_name_args.class, metaDataMap); + } + + public append_partition_by_name_args() { + } + + public append_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_by_name_args(append_partition_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + } + + @Override + public append_partition_by_name_args clone() { + return new append_partition_by_name_args(this); + } + + 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_by_name_args) + return this.equals((append_partition_by_name_args)that); + return false; + } + + public boolean equals(append_partition_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PART_NAME: + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class append_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + + private Partition success; + public static final int SUCCESS = 0; + private InvalidObjectException o1; + public static final int O1 = 1; + private AlreadyExistsException o2; + public static final int O2 = 2; + private MetaException o3; + public static final int O3 = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); + } + + public append_partition_by_name_result() { + } + + public append_partition_by_name_result( + Partition success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) + { + this(); + this.success = success; + this.o1 = o1; + this.o2 = o2; + this.o3 = o3; + } + + /** + * Performs a deep copy on other. + */ + public append_partition_by_name_result(append_partition_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); + } + } + + @Override + public append_partition_by_name_result clone() { + return new append_partition_by_name_result(this); + } + + 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 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 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof append_partition_by_name_result) + return this.equals((append_partition_by_name_result)that); + return false; + } + + public boolean equals(append_partition_by_name_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 SUCCESS: + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new InvalidObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("append_partition_by_name_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class drop_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_partition_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); + + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private List part_vals; + public static final int PART_VALS = 3; + private boolean deleteData; + public static final int DELETEDATA = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean deleteData = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(drop_partition_args.class, metaDataMap); + } + + public drop_partition_args() { + } + + public drop_partition_args( + String db_name, + String tbl_name, + List part_vals, + boolean deleteData) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.deleteData = deleteData; + this.__isset.deleteData = true; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_args(drop_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; + } + __isset.deleteData = other.__isset.deleteData; + this.deleteData = other.deleteData; + } + + @Override + public drop_partition_args clone() { + return new drop_partition_args(this); + } + + 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 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 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 boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + this.__isset.deleteData = true; + } + + public void unsetDeleteData() { + this.__isset.deleteData = false; + } + + // Returns true if field deleteData is set (has been asigned a value) and false otherwise + public boolean isSetDeleteData() { + return this.__isset.deleteData; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case DELETEDATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_VALS: + return getPart_vals(); + + case DELETEDATA: + return new Boolean(isDeleteData()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case DELETEDATA: + return isSetDeleteData(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_args) + return this.equals((drop_partition_args)that); + return false; + } + + public boolean equals(drop_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PART_VALS: + if (field.type == TType.LIST) { + { + TList _list130 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list130.size); + for (int _i131 = 0; _i131 < _list130.size; ++_i131) + { + String _elem132; + _elem132 = iprot.readString(); + this.part_vals.add(_elem132); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DELETEDATA: + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + this.__isset.deleteData = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter133 : this.part_vals) { + oprot.writeString(_iter133); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class drop_partition_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_partition_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + + private boolean success; + public static final int SUCCESS = 0; + private NoSuchObjectException o1; + public static final int O1 = 1; + private MetaException o2; + public static final int O2 = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean success = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(drop_partition_result.class, metaDataMap); + } + + public drop_partition_result() { + } + + public drop_partition_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.__isset.success = true; + this.o1 = o1; + this.o2 = o2; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_result(drop_partition_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + + @Override + public drop_partition_result clone() { + return new drop_partition_result(this); + } + + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + this.__isset.success = true; + } + + public void unsetSuccess() { + this.__isset.success = false; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_result) + return this.equals((drop_partition_result)that); + return false; + } + + public boolean equals(drop_partition_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) + return false; + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public 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 SUCCESS: + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + validate(); + } + + public void write(TProtocol oprot) throws TException { + oprot.writeStructBegin(STRUCT_DESC); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_partition_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + public static class drop_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("drop_partition_by_name_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); + + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private String part_name; + public static final int PART_NAME = 3; + private boolean deleteData; + public static final int DELETEDATA = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean deleteData = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(drop_partition_by_name_args.class, metaDataMap); + } + + public drop_partition_by_name_args() { + } + + public drop_partition_by_name_args( + String db_name, + String tbl_name, + String part_name, + boolean deleteData) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.deleteData = deleteData; + this.__isset.deleteData = true; + } + + /** + * Performs a deep copy on other. + */ + public drop_partition_by_name_args(drop_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; + } + __isset.deleteData = other.__isset.deleteData; + this.deleteData = other.deleteData; + } + + @Override + public drop_partition_by_name_args clone() { + return new drop_partition_by_name_args(this); + } + + 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 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 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 boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + this.__isset.deleteData = true; + } + + public void unsetDeleteData() { + this.__isset.deleteData = false; + } + + // Returns true if field deleteData is set (has been asigned a value) and false otherwise + public boolean isSetDeleteData() { + return this.__isset.deleteData; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); } - oprot.writeMessageBegin(new TMessage("create_database", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + case DELETEDATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case PART_NAME: + return getPart_name(); + + case DELETEDATA: + return new Boolean(isDeleteData()); + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); + case DELETEDATA: + return isSetDeleteData(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + } + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof drop_partition_by_name_args) + return this.equals((drop_partition_by_name_args)that); + return false; } - 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(); - args.read(iprot); - 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 boolean equals(drop_partition_by_name_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; } + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) + return false; + } + + return true; } - private class drop_database implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + @Override + public int hashCode() { + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) { - drop_database_args args = new drop_database_args(); - args.read(iprot); - 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; + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; } - oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + switch (field.id) + { + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PART_NAME: + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DELETEDATA: + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + this.__isset.deleteData = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; + } + iprot.readFieldEnd(); } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_partition_by_name_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + 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.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; + public static final int SUCCESS = 0; + private NoSuchObjectException o1; + public static final int O1 = 1; + private MetaException o2; + public static final int O2 = 2; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean success = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(drop_partition_by_name_result.class, metaDataMap); + } + + public drop_partition_by_name_result() { + } + + public drop_partition_by_name_result( + boolean success, + NoSuchObjectException o1, + MetaException o2) + { + this(); + this.success = success; + this.__isset.success = true; + this.o1 = o1; + this.o2 = o2; } - 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(); - args.read(iprot); - 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(); + /** + * Performs a deep copy on other. + */ + public drop_partition_by_name_result(drop_partition_by_name_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); + } + } + @Override + public drop_partition_by_name_result clone() { + return new drop_partition_by_name_result(this); } - 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(); - args.read(iprot); - iprot.readMessageEnd(); - get_all_databases_result result = new get_all_databases_result(); - try { - result.success = iface_.get_all_databases(); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_all_databases", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_databases"); - oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + public boolean isSuccess() { + return this.success; + } + public void setSuccess(boolean success) { + this.success = success; + this.__isset.success = true; } - 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(); - args.read(iprot); - 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(); - } + public void unsetSuccess() { + this.__isset.success = false; + } + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; } - 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(); - args.read(iprot); - iprot.readMessageEnd(); - create_type_result result = new create_type_result(); - try { - result.success = iface_.create_type(args.type); - result.__isset.success = 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(); - } + public NoSuchObjectException getO1() { + return this.o1; + } + public void setO1(NoSuchObjectException o1) { + this.o1 = o1; } - 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(); - args.read(iprot); - iprot.readMessageEnd(); - drop_type_result result = new drop_type_result(); - try { - result.success = iface_.drop_type(args.type); - result.__isset.success = 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(); - } + 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; } - 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(); - args.read(iprot); - 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(); - } + public MetaException getO2() { + return this.o2; + } + public void setO2(MetaException o2) { + this.o2 = o2; } - 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(); - args.read(iprot); - iprot.readMessageEnd(); - get_fields_result result = new get_fields_result(); - try { - result.success = iface_.get_fields(args.db_name, args.table_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (UnknownTableException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_fields", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_fields"); - oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + public 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; } - 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(); - args.read(iprot); - iprot.readMessageEnd(); - get_schema_result result = new get_schema_result(); - try { - result.success = iface_.get_schema(args.db_name, args.table_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (UnknownTableException o2) { - result.o2 = o2; - } catch (UnknownDBException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_schema", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_schema"); - oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); } - oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + break; - } + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; - private class create_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - create_table_args args = new create_table_args(); - args.read(iprot); - iprot.readMessageEnd(); - create_table_result result = new create_table_result(); - try { - iface_.create_table(args.tbl); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (NoSuchObjectException o4) { - result.o4 = o4; - } catch (Throwable th) { - LOGGER.error("Internal error processing create_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_table"); - oprot.writeMessageBegin(new TMessage("create_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } - oprot.writeMessageBegin(new TMessage("create_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case SUCCESS: + return new Boolean(isSuccess()); + + case O1: + return getO1(); + + case O2: + return getO2(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } } - private class drop_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_table_args args = new drop_table_args(); - args.read(iprot); - iprot.readMessageEnd(); - drop_table_result result = new drop_table_result(); - try { - iface_.drop_table(args.dbname, args.name, args.deleteData); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_table"); - oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + } + @Override + 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); + return false; } - private class get_tables implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_tables_args args = new get_tables_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_tables_result result = new get_tables_result(); - try { - result.success = iface_.get_tables(args.db_name, args.pattern); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_tables", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_tables"); - oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public boolean equals(drop_partition_by_name_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; } - private class get_all_tables implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + @Override + public int hashCode() { + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) { - get_all_tables_args args = new get_all_tables_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_all_tables_result result = new get_all_tables_result(); - try { - result.success = iface_.get_all_tables(args.db_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_all_tables", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_all_tables"); - oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; } - oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + switch (field.id) + { + case SUCCESS: + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); + break; + } + iprot.readFieldEnd(); } + iprot.readStructEnd(); + validate(); } - private class get_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_table_args args = new get_table_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_table_result result = new get_table_result(); - try { - result.success = iface_.get_table(args.dbname, args.tbl_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_table"); - oprot.writeMessageBegin(new TMessage("get_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public 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(); } - private class alter_table implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - alter_table_args args = new alter_table_args(); - args.read(iprot); - iprot.readMessageEnd(); - alter_table_result result = new alter_table_result(); - try { - iface_.alter_table(args.dbname, args.tbl_name, args.new_tbl); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing alter_table", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_table"); - oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + @Override + public String toString() { + StringBuilder sb = new StringBuilder("drop_partition_by_name_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 + // check that fields of type enum have valid values } - private class add_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - add_partition_args args = new add_partition_args(); - args.read(iprot); - iprot.readMessageEnd(); - add_partition_result result = new add_partition_result(); - try { - result.success = iface_.add_partition(args.new_part); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing add_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_partition"); - oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + } + + public static class get_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private List part_vals; + public static final int PART_VALS = 3; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { } - private class append_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - append_partition_args args = new append_partition_args(); - args.read(iprot); - iprot.readMessageEnd(); - append_partition_result result = new append_partition_result(); - try { - result.success = iface_.append_partition(args.db_name, args.tbl_name, args.part_vals); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing append_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition"); - oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + }}); + static { + FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); } - private class append_partition_by_name implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - append_partition_by_name_args args = new append_partition_by_name_args(); - args.read(iprot); - iprot.readMessageEnd(); - append_partition_by_name_result result = new append_partition_by_name_result(); - try { - result.success = iface_.append_partition_by_name(args.db_name, args.tbl_name, args.part_name); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing append_partition_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing append_partition_by_name"); - oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + public get_partition_args() { + } + public get_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; } - private class drop_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_partition_args args = new drop_partition_args(); - args.read(iprot); - iprot.readMessageEnd(); - drop_partition_result result = new drop_partition_result(); - try { - result.success = iface_.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); - result.__isset.success = true; - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition"); - oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + /** + * 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); } - oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + this.part_vals = __this__part_vals; } + } + @Override + public get_partition_args clone() { + return new get_partition_args(this); } - private class drop_partition_by_name implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - drop_partition_by_name_args args = new drop_partition_by_name_args(); - args.read(iprot); - iprot.readMessageEnd(); - drop_partition_by_name_result result = new drop_partition_by_name_result(); - try { - result.success = iface_.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); - result.__isset.success = true; - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_partition_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_partition_by_name"); - oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + public String getDb_name() { + return this.db_name; + } + public void setDb_name(String db_name) { + this.db_name = db_name; } - private class get_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partition_args args = new get_partition_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_partition_result result = new get_partition_result(); - try { - result.success = iface_.get_partition(args.db_name, args.tbl_name, args.part_vals); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition"); - oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + 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; } - 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(); - args.read(iprot); - iprot.readMessageEnd(); - get_partition_by_name_result result = new get_partition_by_name_result(); - try { - result.success = iface_.get_partition_by_name(args.db_name, args.tbl_name, args.part_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_by_name"); - oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + public String getTbl_name() { + return this.tbl_name; + } + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - private class get_partitions implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partitions_args args = new get_partitions_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_partitions_result result = new get_partitions_result(); - try { - result.success = iface_.get_partitions(args.db_name, args.tbl_name, args.max_parts); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partitions", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions"); - oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + 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; } - private class get_partition_names implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partition_names_args args = new get_partition_names_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_partition_names_result result = new get_partition_names_result(); - try { - result.success = iface_.get_partition_names(args.db_name, args.tbl_name, args.max_parts); - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition_names", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names"); - oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + 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(); } - private class get_partitions_ps implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partitions_ps_args args = new get_partitions_ps_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_partitions_ps_result result = new get_partitions_ps_result(); - try { - result.success = iface_.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partitions_ps", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_ps"); - oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public 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; } - private class get_partition_names_ps implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partition_names_ps_args args = new get_partition_names_ps_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_partition_names_ps_result result = new get_partition_names_ps_result(); - try { - result.success = iface_.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partition_names_ps", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partition_names_ps"); - oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; + } + public void unsetPart_vals() { + this.part_vals = null; } - private class get_partitions_by_filter implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_partitions_by_filter_args args = new get_partitions_by_filter_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_partitions_by_filter_result result = new get_partitions_by_filter_result(); - try { - result.success = iface_.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts); - } catch (MetaException o1) { - result.o1 = o1; - } catch (NoSuchObjectException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_partitions_by_filter", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_partitions_by_filter"); - oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + // 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); } - oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + break; - } + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; - private class alter_partition implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - alter_partition_args args = new alter_partition_args(); - args.read(iprot); - iprot.readMessageEnd(); - alter_partition_result result = new alter_partition_result(); - try { - iface_.alter_partition(args.db_name, args.tbl_name, args.new_part); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing alter_partition", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_partition"); - oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); } - oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + break; + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } } - private class get_config_value implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - get_config_value_args args = new get_config_value_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_config_value_result result = new get_config_value_result(); - try { - result.success = iface_.get_config_value(args.name, args.defaultValue); - } catch (ConfigValSecurityException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_config_value", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_config_value"); - oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case DB_NAME: + return getDb_name(); - } + case TBL_NAME: + return getTbl_name(); - private class partition_name_to_vals implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - partition_name_to_vals_args args = new partition_name_to_vals_args(); - args.read(iprot); - iprot.readMessageEnd(); - partition_name_to_vals_result result = new partition_name_to_vals_result(); - try { - result.success = iface_.partition_name_to_vals(args.part_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing partition_name_to_vals", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_vals"); - oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + case PART_VALS: + return getPart_vals(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } } - private class partition_name_to_spec implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - partition_name_to_spec_args args = new partition_name_to_spec_args(); - args.read(iprot); - iprot.readMessageEnd(); - partition_name_to_spec_result result = new partition_name_to_spec_result(); - try { - result.success = iface_.partition_name_to_spec(args.part_name); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing partition_name_to_spec", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing partition_name_to_spec"); - oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise + public boolean isSet(int fieldID) { + switch (fieldID) { + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + } + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_partition_args) + return this.equals((get_partition_args)that); + return false; } - private class add_index implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - add_index_args args = new add_index_args(); - args.read(iprot); - iprot.readMessageEnd(); - add_index_result result = new add_index_result(); - try { - result.success = iface_.add_index(args.new_index, args.index_table); - } catch (InvalidObjectException o1) { - result.o1 = o1; - } catch (AlreadyExistsException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing add_index", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing add_index"); - oprot.writeMessageBegin(new TMessage("add_index", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("add_index", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + public boolean equals(get_partition_args that) { + if (that == null) + return false; + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; } - } + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } - private class alter_index implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { - alter_index_args args = new alter_index_args(); - args.read(iprot); - iprot.readMessageEnd(); - alter_index_result result = new alter_index_result(); - try { - iface_.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx); - } catch (InvalidOperationException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing alter_index", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing alter_index"); - oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; - } - oprot.writeMessageBegin(new TMessage("alter_index", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) + return false; } + return true; } - private class drop_index_by_name implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + @Override + public int hashCode() { + return 0; + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) { - drop_index_by_name_args args = new drop_index_by_name_args(); - args.read(iprot); - iprot.readMessageEnd(); - drop_index_by_name_result result = new drop_index_by_name_result(); - try { - result.success = iface_.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); - result.__isset.success = true; - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_index_by_name", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_index_by_name"); - oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) + { + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PART_VALS: + if (field.type == TType.LIST) { + { + TList _list134 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list134.size); + for (int _i135 = 0; _i135 < _list134.size; ++_i135) + { + String _elem136; + _elem136 = iprot.readString(); + this.part_vals.add(_elem136); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + break; } - oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + iprot.readFieldEnd(); } + iprot.readStructEnd(); + validate(); } - 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(); - args.read(iprot); - 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(); - } - - } + public void write(TProtocol oprot) throws TException { + validate(); - 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(); - args.read(iprot); - 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.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 _iter137 : this.part_vals) { + oprot.writeString(_iter137); + } + oprot.writeListEnd(); } - oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + oprot.writeFieldEnd(); } - + oprot.writeFieldStop(); + oprot.writeStructEnd(); } - 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(); - args.read(iprot); - 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(); + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_partition_args("); + boolean first = true; + + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); } + first = false; + sb.append(")"); + return sb.toString(); + } + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values } } - 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); + 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.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 database; - public static final int DATABASE = 1; + private Partition success; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + private NoSuchObjectException o2; + public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Database.class))); + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(create_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_result.class, metaDataMap); } - public create_database_args() { + public get_partition_result() { } - public create_database_args( - Database database) + public get_partition_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) { this(); - this.database = database; + this.success = success; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public create_database_args(create_database_args other) { - if (other.isSetDatabase()) { - this.database = new Database(other.database); + public get_partition_result(get_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); } } @Override - public create_database_args clone() { - return new create_database_args(this); + public get_partition_result clone() { + return new get_partition_result(this); } - public Database getDatabase() { - return this.database; + public Partition getSuccess() { + return this.success; } - public void setDatabase(Database database) { - this.database = database; + public void setSuccess(Partition success) { + this.success = success; } - public void unsetDatabase() { - this.database = null; + public void unsetSuccess() { + this.success = 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 success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return 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 setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DATABASE: + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: if (value == null) { - unsetDatabase(); + unsetO2(); } else { - setDatabase((Database)value); + setO2((NoSuchObjectException)value); } break; @@ -2985,8 +17911,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DATABASE: - return getDatabase(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -2996,8 +17928,12 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case DATABASE: - return isSetDatabase(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -3007,21 +17943,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_database_args) - return this.equals((create_database_args)that); + if (that instanceof get_partition_result) + return this.equals((get_partition_result)that); return false; } - public boolean equals(create_database_args that) { + public boolean equals(get_partition_result that) { if (that == null) return false; - boolean this_present_database = true && this.isSetDatabase(); - boolean that_present_database = true && that.isSetDatabase(); - if (this_present_database || that_present_database) { - if (!(this_present_database && that_present_database)) + boolean this_present_success = true && 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.database.equals(that.database)) + 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; } @@ -3044,10 +17998,26 @@ } switch (field.id) { - case DATABASE: + case SUCCESS: if (field.type == TType.STRUCT) { - this.database = new Database(); - this.database.read(iprot); + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -3064,12 +18034,19 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.database != null) { - oprot.writeFieldBegin(DATABASE_FIELD_DESC); - this.database.write(oprot); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + 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(); @@ -3078,14 +18055,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_database_args("); + StringBuilder sb = new StringBuilder("get_partition_result("); boolean first = true; - sb.append("database:"); - if (this.database == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.database); + 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(")"); @@ -3099,144 +18092,254 @@ } - 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); + 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 AlreadyExistsException o1; - public static final int O1 = 1; - private InvalidObjectException o2; - public static final int O2 = 2; - private MetaException o3; - public static final int O3 = 3; + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private List part_vals; + public static final int PART_VALS = 3; + private String user_name; + public static final int USER_NAME = 4; + private List group_names; + public static final int GROUP_NAMES = 5; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); }}); static { - FieldMetaData.addStructMetaDataMap(create_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_with_auth_args.class, metaDataMap); + } + + public get_partition_with_auth_args() { + } + + public get_partition_with_auth_args( + String db_name, + String tbl_name, + List part_vals, + String user_name, + List group_names) + { + this(); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.user_name = user_name; + this.group_names = group_names; + } + + /** + * Performs a deep copy on other. + */ + public get_partition_with_auth_args(get_partition_with_auth_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; + } + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(); + for (String other_element : other.group_names) { + __this__group_names.add(other_element); + } + this.group_names = __this__group_names; + } + } + + @Override + public get_partition_with_auth_args clone() { + return new get_partition_with_auth_args(this); + } + + 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 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 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 create_database_result() { + public void addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); + } + this.part_vals.add(elem); } - public create_database_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3) - { - this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + public List getPart_vals() { + return this.part_vals; } - /** - * Performs a deep copy on other. - */ - public create_database_result(create_database_result other) { - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; } - @Override - public create_database_result clone() { - return new create_database_result(this); + public void unsetPart_vals() { + this.part_vals = null; } - public AlreadyExistsException getO1() { - return this.o1; + // 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 setO1(AlreadyExistsException o1) { - this.o1 = o1; + public String getUser_name() { + return this.user_name; } - public void unsetO1() { - this.o1 = null; + public void setUser_name(String user_name) { + this.user_name = user_name; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + public void unsetUser_name() { + this.user_name = null; } - public InvalidObjectException getO2() { - return this.o2; + // 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 setO2(InvalidObjectException o2) { - this.o2 = o2; + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - public void unsetO2() { - this.o2 = null; + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); } - public MetaException getO3() { - return this.o3; + public List getGroup_names() { + return this.group_names; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setGroup_names(List group_names) { + this.group_names = group_names; } - public void unsetO3() { - this.o3 = null; + public void unsetGroup_names() { + this.group_names = 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 group_names is set (has been asigned a value) and false otherwise + public boolean isSetGroup_names() { + return this.group_names != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case O1: + case DB_NAME: if (value == null) { - unsetO1(); + unsetDb_name(); } else { - setO1((AlreadyExistsException)value); + setDb_name((String)value); } break; - case O2: + case TBL_NAME: if (value == null) { - unsetO2(); + unsetTbl_name(); } else { - setO2((InvalidObjectException)value); + setTbl_name((String)value); } break; - case O3: + case PART_VALS: if (value == null) { - unsetO3(); + unsetPart_vals(); } else { - setO3((MetaException)value); + setPart_vals((List)value); + } + break; + + 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; @@ -3247,14 +18350,20 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case O1: - return getO1(); + case DB_NAME: + return getDb_name(); - case O2: - return getO2(); + case TBL_NAME: + return getTbl_name(); - case O3: - return getO3(); + case PART_VALS: + return getPart_vals(); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -3264,12 +18373,16 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -3279,39 +18392,57 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_database_result) - return this.equals((create_database_result)that); + if (that instanceof get_partition_with_auth_args) + return this.equals((get_partition_with_auth_args)that); return false; } - public boolean equals(create_database_result that) { + public boolean equals(get_partition_with_auth_args that) { if (that == null) return false; - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) return false; - if (!this.o3.equals(that.o3)) + if (!this.part_vals.equals(that.part_vals)) + return false; + } + + 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; } @@ -3334,26 +18465,57 @@ } switch (field.id) { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case PART_VALS: + if (field.type == TType.LIST) { + { + TList _list138 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list138.size); + for (int _i139 = 0; _i139 < _list138.size; ++_i139) + { + String _elem140; + _elem140 = iprot.readString(); + this.part_vals.add(_elem140); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case USER_NAME: + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GROUP_NAMES: + if (field.type == TType.LIST) { + { + TList _list141 = iprot.readListBegin(); + this.group_names = new ArrayList(_list141.size); + for (int _i142 = 0; _i142 < _list141.size; ++_i142) + { + String _elem143; + _elem143 = iprot.readString(); + this.group_names.add(_elem143); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -3370,19 +18532,44 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter144 : this.part_vals) { + oprot.writeString(_iter144); + } + 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 _iter145 : this.group_names) { + oprot.writeString(_iter145); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -3391,30 +18578,46 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_database_result("); + StringBuilder sb = new StringBuilder("get_partition_with_auth_args("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("part_vals:"); + if (this.part_vals == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.part_vals); + } + first = false; + 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(")"); @@ -3428,74 +18631,144 @@ } - 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); + 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 String name; - public static final int NAME = 1; + private Partition success; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + private NoSuchObjectException o2; + public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_with_auth_result.class, metaDataMap); } - public get_database_args() { + public get_partition_with_auth_result() { } - public get_database_args( - String name) + public get_partition_with_auth_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) { this(); - this.name = name; + this.success = success; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_database_args(get_database_args other) { - if (other.isSetName()) { - this.name = other.name; + public get_partition_with_auth_result(get_partition_with_auth_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); } } @Override - public get_database_args clone() { - return new get_database_args(this); + public get_partition_with_auth_result clone() { + return new get_partition_with_auth_result(this); } - public String getName() { - return this.name; + public Partition getSuccess() { + return this.success; } - public void setName(String name) { - this.name = name; + public void setSuccess(Partition success) { + this.success = success; } - public void unsetName() { - this.name = null; + public void unsetSuccess() { + this.success = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise - public boolean isSetName() { - return this.name != null; + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.success != null; + } + + public 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 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case NAME: + case SUCCESS: if (value == null) { - unsetName(); + unsetSuccess(); } else { - setName((String)value); + setSuccess((Partition)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); } break; @@ -3506,8 +18779,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case NAME: - return getName(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -3517,8 +18796,12 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case NAME: - return isSetName(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -3528,21 +18811,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_database_args) - return this.equals((get_database_args)that); + if (that instanceof get_partition_with_auth_result) + return this.equals((get_partition_with_auth_result)that); return false; } - public boolean equals(get_database_args that) { + public boolean equals(get_partition_with_auth_result that) { if (that == null) return false; - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.name.equals(that.name)) + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_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; } @@ -3565,9 +18866,26 @@ } switch (field.id) { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); + case SUCCESS: + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -3584,12 +18902,19 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -3598,14 +18923,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_database_args("); + StringBuilder sb = new StringBuilder("get_partition_with_auth_result("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("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(")"); @@ -3619,144 +18960,144 @@ } - 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); + 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); - private Database success; - public static final int SUCCESS = 0; - private NoSuchObjectException o1; - public static final int O1 = 1; - private MetaException o2; - public static final int O2 = 2; + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private String part_name; + public static final int PART_NAME = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Database.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(get_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_by_name_args.class, metaDataMap); } - public get_database_result() { + public get_partition_by_name_args() { } - public get_database_result( - Database success, - NoSuchObjectException o1, - MetaException o2) + public get_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public get_database_result(get_database_result other) { - if (other.isSetSuccess()) { - this.success = new Database(other.success); + public get_partition_by_name_args(get_partition_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetPart_name()) { + this.part_name = other.part_name; } } @Override - public get_database_result clone() { - return new get_database_result(this); + public get_partition_by_name_args clone() { + return new get_partition_by_name_args(this); } - public Database getSuccess() { - return this.success; + public String getDb_name() { + return this.db_name; } - public void setSuccess(Database success) { - this.success = success; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetSuccess() { - this.success = null; + public void unsetDb_name() { + this.db_name = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; + // Returns true if field db_name is set (has been asigned a value) and false otherwise + public boolean isSetDb_name() { + return this.db_name != null; } - public NoSuchObjectException getO1() { - return this.o1; + public String getTbl_name() { + return this.tbl_name; } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO1() { - this.o1 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public MetaException getO2() { - return this.o2; + public String getPart_name() { + return this.part_name; } - public void setO2(MetaException o2) { - this.o2 = o2; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetO2() { - this.o2 = null; + public void unsetPart_name() { + this.part_name = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; + // 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((Database)value); + setDb_name((String)value); } break; - case O1: + case TBL_NAME: if (value == null) { - unsetO1(); + unsetTbl_name(); } else { - setO1((NoSuchObjectException)value); + setTbl_name((String)value); } break; - case O2: + case PART_NAME: if (value == null) { - unsetO2(); + unsetPart_name(); } else { - setO2((MetaException)value); + setPart_name((String)value); } break; @@ -3767,14 +19108,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case SUCCESS: - return getSuccess(); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TBL_NAME: + return getTbl_name(); - case O2: - return getO2(); + case PART_NAME: + return getPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -3784,12 +19125,12 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_NAME: + return isSetPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -3799,39 +19140,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_database_result) - return this.equals((get_database_result)that); + if (that instanceof get_partition_by_name_args) + return this.equals((get_partition_by_name_args)that); return false; } - public boolean equals(get_database_result that) { + public boolean equals(get_partition_by_name_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.success.equals(that.success)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.part_name.equals(that.part_name)) return false; } @@ -3854,26 +19195,23 @@ } switch (field.id) { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Database(); - this.success.read(iprot); + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + case PART_NAME: + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -3890,19 +19228,22 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -3911,30 +19252,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_database_result("); + StringBuilder sb = new StringBuilder("get_partition_by_name_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.part_name); } first = false; sb.append(")"); @@ -3948,111 +19289,144 @@ } - 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); + 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 O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private String name; - public static final int NAME = 1; - private boolean deleteData; - public static final int DELETEDATA = 2; + private Partition success; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; + private NoSuchObjectException o2; + public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean deleteData = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); } - public drop_database_args() { + public get_partition_by_name_result() { } - public drop_database_args( - String name, - boolean deleteData) + public get_partition_by_name_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) { this(); - this.name = name; - this.deleteData = deleteData; - this.__isset.deleteData = true; + this.success = success; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public drop_database_args(drop_database_args other) { - if (other.isSetName()) { - this.name = other.name; + public get_partition_by_name_result(get_partition_by_name_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); } - __isset.deleteData = other.__isset.deleteData; - this.deleteData = other.deleteData; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } } @Override - public drop_database_args clone() { - return new drop_database_args(this); + public get_partition_by_name_result clone() { + return new get_partition_by_name_result(this); } - public String getName() { - return this.name; + public Partition getSuccess() { + return this.success; } - public void setName(String name) { - this.name = name; + public void setSuccess(Partition success) { + this.success = success; } - public void unsetName() { - this.name = null; + public void unsetSuccess() { + this.success = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise - public boolean isSetName() { - return this.name != null; + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.success != null; } - public boolean isDeleteData() { - return this.deleteData; + public MetaException getO1() { + return this.o1; } - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - this.__isset.deleteData = true; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetDeleteData() { - this.__isset.deleteData = false; + public void unsetO1() { + this.o1 = null; } - // Returns true if field deleteData is set (has been asigned a value) and false otherwise - public boolean isSetDeleteData() { - return this.__isset.deleteData; + // Returns true if field o1 is set (has been asigned a value) and false otherwise + public boolean isSetO1() { + return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case NAME: + case SUCCESS: if (value == null) { - unsetName(); + unsetSuccess(); } else { - setName((String)value); + setSuccess((Partition)value); } break; - case DELETEDATA: + case O1: if (value == null) { - unsetDeleteData(); + unsetO1(); } else { - setDeleteData((Boolean)value); + setO1((MetaException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); } break; @@ -4063,11 +19437,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case NAME: - return getName(); + case SUCCESS: + return getSuccess(); - case DELETEDATA: - return new Boolean(isDeleteData()); + case O1: + return getO1(); + + case O2: + return getO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -4077,10 +19454,12 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case NAME: - return isSetName(); - case DELETEDATA: - return isSetDeleteData(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -4090,30 +19469,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_database_args) - return this.equals((drop_database_args)that); + if (that instanceof get_partition_by_name_result) + return this.equals((get_partition_by_name_result)that); return false; } - public boolean equals(drop_database_args that) { + public boolean equals(get_partition_by_name_result that) { if (that == null) return false; - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.name.equals(that.name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) return false; - if (this.deleteData != that.deleteData) + if (!this.o1.equals(that.o1)) + return false; + } + + boolean this_present_o2 = true && this.isSetO2(); + boolean that_present_o2 = true && that.isSetO2(); + if (this_present_o2 || that_present_o2) { + if (!(this_present_o2 && that_present_o2)) + return false; + if (!this.o2.equals(that.o2)) return false; } @@ -4136,17 +19524,26 @@ } switch (field.id) { - case NAME: - if (field.type == TType.STRING) { - this.name = iprot.readString(); + case SUCCESS: + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DELETEDATA: - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new NoSuchObjectException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -4163,36 +19560,52 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO2()) { + oprot.writeFieldBegin(O2_FIELD_DESC); + this.o2.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_database_args("); + StringBuilder sb = new StringBuilder("get_partition_by_name_result("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); + } first = false; sb.append(")"); return sb.toString(); @@ -4205,144 +19618,148 @@ } - 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); + 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 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 NoSuchObjectException o1; - public static final int O1 = 1; - private InvalidOperationException o2; - public static final int O2 = 2; - private MetaException o3; - public static final int O3 = 3; + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private short max_parts; + public static final int MAX_PARTS = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean max_parts = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); } - public drop_database_result() { + public get_partitions_args() { + this.max_parts = (short)-1; + } - public drop_database_result( - NoSuchObjectException o1, - InvalidOperationException o2, - MetaException o3) + public get_partitions_args( + String db_name, + String tbl_name, + short max_parts) { this(); - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + this.__isset.max_parts = true; } /** * 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_partitions_args(get_partitions_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; } + __isset.max_parts = other.__isset.max_parts; + this.max_parts = other.max_parts; } @Override - public drop_database_result clone() { - return new drop_database_result(this); + public get_partitions_args clone() { + return new get_partitions_args(this); } - public NoSuchObjectException getO1() { - return this.o1; + public String getDb_name() { + return this.db_name; } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetO1() { - this.o1 = null; + public void unsetDb_name() { + this.db_name = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + // Returns true if field db_name is set (has been asigned a value) and false otherwise + public boolean isSetDb_name() { + return this.db_name != null; } - public InvalidOperationException getO2() { - return this.o2; + public String getTbl_name() { + return this.tbl_name; } - public void setO2(InvalidOperationException o2) { - this.o2 = o2; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public void unsetO2() { - this.o2 = null; + public void unsetTbl_name() { + this.tbl_name = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; + // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + public boolean isSetTbl_name() { + return this.tbl_name != null; } - public MetaException getO3() { - return this.o3; + public short getMax_parts() { + return this.max_parts; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + this.__isset.max_parts = true; } - public void unsetO3() { - this.o3 = null; + public void unsetMax_parts() { + this.__isset.max_parts = false; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; + // Returns true if field max_parts is set (has been asigned a value) and false otherwise + public boolean isSetMax_parts() { + return this.__isset.max_parts; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case O1: + case DB_NAME: if (value == null) { - unsetO1(); + unsetDb_name(); } else { - setO1((NoSuchObjectException)value); + setDb_name((String)value); } break; - case O2: + case TBL_NAME: if (value == null) { - unsetO2(); + unsetTbl_name(); } else { - setO2((InvalidOperationException)value); + setTbl_name((String)value); } break; - case O3: + case MAX_PARTS: if (value == null) { - unsetO3(); + unsetMax_parts(); } else { - setO3((MetaException)value); + setMax_parts((Short)value); } break; @@ -4353,14 +19770,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case O1: - return getO1(); + case DB_NAME: + return getDb_name(); - case O2: - return getO2(); + case TBL_NAME: + return getTbl_name(); - case O3: - return getO3(); + case MAX_PARTS: + return new Short(getMax_parts()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -4370,12 +19787,12 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -4385,39 +19802,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_database_result) - return this.equals((drop_database_result)that); + if (that instanceof get_partitions_args) + return this.equals((get_partitions_args)that); return false; } - public boolean equals(drop_database_result that) { + public boolean equals(get_partitions_args that) { if (that == null) return false; - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o2.equals(that.o2)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_max_parts = true; + boolean that_present_max_parts = true; + if (this_present_max_parts || that_present_max_parts) { + if (!(this_present_max_parts && that_present_max_parts)) return false; - if (!this.o3.equals(that.o3)) + if (this.max_parts != that.max_parts) return false; } @@ -4440,26 +19857,24 @@ } switch (field.id) { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new InvalidOperationException(); - this.o2.read(iprot); + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case MAX_PARTS: + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + this.__isset.max_parts = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -4476,52 +19891,49 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_database_result("); + StringBuilder sb = new StringBuilder("get_partitions_args("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.tbl_name); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } + sb.append("max_parts:"); + sb.append(this.max_parts); first = false; sb.append(")"); return sb.toString(); @@ -4534,74 +19946,164 @@ } - 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); + 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 String pattern; - public static final int PATTERN = 1; + private List success; + public static final int SUCCESS = 0; + private NoSuchObjectException o1; + public static final int O1 = 1; + private MetaException o2; + public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Partition.class)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_databases_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_result.class, metaDataMap); } - public get_databases_args() { + public get_partitions_result() { } - public get_databases_args( - String pattern) + public get_partitions_result( + List success, + NoSuchObjectException o1, + MetaException o2) { this(); - this.pattern = pattern; + this.success = success; + this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_databases_args(get_databases_args other) { - if (other.isSetPattern()) { - this.pattern = other.pattern; + public get_partitions_result(get_partitions_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } @Override - public get_databases_args clone() { - return new get_databases_args(this); + public get_partitions_result clone() { + return new get_partitions_result(this); } - public String getPattern() { - return this.pattern; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setPattern(String pattern) { - this.pattern = pattern; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetPattern() { - this.pattern = null; + public void addToSuccess(Partition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - // Returns true if field pattern is set (has been asigned a value) and false otherwise - public boolean isSetPattern() { - return this.pattern != null; + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.success != null; + } + + public 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 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case PATTERN: + case SUCCESS: if (value == null) { - unsetPattern(); + unsetSuccess(); } else { - setPattern((String)value); + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -4612,8 +20114,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case PATTERN: - return getPattern(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -4623,8 +20131,12 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case PATTERN: - return isSetPattern(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); + case O2: + return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -4634,21 +20146,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_databases_args) - return this.equals((get_databases_args)that); + if (that instanceof get_partitions_result) + return this.equals((get_partitions_result)that); return false; } - public boolean equals(get_databases_args that) { + public boolean equals(get_partitions_result 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_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.pattern.equals(that.pattern)) + if (!this.o2.equals(that.o2)) return false; } @@ -4671,9 +20201,36 @@ } switch (field.id) { - case PATTERN: - if (field.type == TType.STRING) { - this.pattern = iprot.readString(); + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list146 = iprot.readListBegin(); + this.success = new ArrayList(_list146.size); + for (int _i147 = 0; _i147 < _list146.size; ++_i147) + { + Partition _elem148; + _elem148 = new Partition(); + _elem148.read(iprot); + this.success.add(_elem148); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new NoSuchObjectException(); + this.o1.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new MetaException(); + this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -4690,12 +20247,25 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter149 : this.success) { + _iter149.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(); @@ -4704,14 +20274,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_databases_args("); + StringBuilder sb = new StringBuilder("get_partitions_result("); boolean first = true; - sb.append("pattern:"); - if (this.pattern == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.pattern); + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); + } + first = false; + if (!first) sb.append(", "); + sb.append("o2:"); + if (this.o2 == null) { + sb.append("null"); + } else { + sb.append(this.o2); } first = false; sb.append(")"); @@ -4725,129 +20311,238 @@ } - 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); + 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 List success; - public static final int SUCCESS = 0; - private MetaException o1; - public static final int O1 = 1; + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private short max_parts; + public static final int MAX_PARTS = 3; + private String user_name; + public static final int USER_NAME = 4; + private List group_names; + public static final int GROUP_NAMES = 5; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean max_parts = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_args.class, metaDataMap); } - public get_databases_result() { + public get_partitions_with_auth_args() { + this.max_parts = (short)-1; + } - public get_databases_result( - List success, - MetaException o1) + public get_partitions_with_auth_args( + String db_name, + String tbl_name, + short max_parts, + String user_name, + List group_names) { this(); - this.success = success; - this.o1 = o1; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + this.__isset.max_parts = true; + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public get_databases_result(get_databases_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; + public get_partitions_with_auth_args(get_partitions_with_auth_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + __isset.max_parts = other.__isset.max_parts; + 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; } } @Override - public get_databases_result clone() { - return new get_databases_result(this); + public get_partitions_with_auth_args clone() { + return new get_partitions_with_auth_args(this); } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public String getDb_name() { + return this.db_name; } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + public void unsetDb_name() { + this.db_name = null; } - public List getSuccess() { - return this.success; + // Returns true if field db_name is set (has been asigned a value) and false otherwise + public boolean isSetDb_name() { + return this.db_name != null; } - public void setSuccess(List success) { - this.success = success; + public String getTbl_name() { + return this.tbl_name; } - public void unsetSuccess() { - this.success = null; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; + public void unsetTbl_name() { + this.tbl_name = null; } - public MetaException getO1() { - return this.o1; + // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + public boolean isSetTbl_name() { + return this.tbl_name != null; + } + + public short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + this.__isset.max_parts = true; + } + + public void unsetMax_parts() { + this.__isset.max_parts = false; + } + + // Returns true if field max_parts is set (has been asigned a value) and false otherwise + public boolean isSetMax_parts() { + return this.__isset.max_parts; + } + + 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 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 setO1(MetaException o1) { - this.o1 = o1; + public void setGroup_names(List group_names) { + this.group_names = group_names; } - public void unsetO1() { - this.o1 = null; + public void unsetGroup_names() { + this.group_names = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + // Returns true if field group_names is set (has been asigned a value) and false otherwise + public boolean isSetGroup_names() { + return this.group_names != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case SUCCESS: + case DB_NAME: if (value == null) { - unsetSuccess(); + unsetDb_name(); } else { - setSuccess((List)value); + setDb_name((String)value); } break; - case O1: + case TBL_NAME: if (value == null) { - unsetO1(); + unsetTbl_name(); } else { - setO1((MetaException)value); + setTbl_name((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); } break; @@ -4858,11 +20553,20 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case SUCCESS: - return getSuccess(); + case DB_NAME: + return getDb_name(); - case O1: - return getO1(); + case TBL_NAME: + return getTbl_name(); + + case MAX_PARTS: + return new Short(getMax_parts()); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -4872,10 +20576,16 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -4885,199 +20595,59 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_databases_result) - return this.equals((get_databases_result)that); + if (that instanceof get_partitions_with_auth_args) + return this.equals((get_partitions_with_auth_args)that); return false; } - public boolean equals(get_databases_result that) { + public boolean equals(get_partitions_with_auth_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.success.equals(that.success)) + if (!this.db_name.equals(that.db_name)) return false; } - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.tbl_name.equals(that.tbl_name)) return false; } - return true; - } - - @Override - public int hashCode() { - return 0; - } - - 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 SUCCESS: - if (field.type == TType.LIST) { - { - TList _list58 = iprot.readListBegin(); - this.success = new ArrayList(_list58.size); - for (int _i59 = 0; _i59 < _list58.size; ++_i59) - { - String _elem60; - _elem60 = iprot.readString(); - this.success.add(_elem60); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 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); - break; - } - 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 _iter61 : this.success) { - oprot.writeString(_iter61); - } - 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 - // check that fields of type enum have valid values - } - - } - - 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 final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - }}); - - static { - 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) { - } - - @Override - public get_all_databases_args clone() { - return new get_all_databases_args(this); - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + 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; } - } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + 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; } - } - @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; + 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; } @@ -5098,6 +20668,52 @@ } switch (field.id) { + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case MAX_PARTS: + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + this.__isset.max_parts = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case USER_NAME: + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GROUP_NAMES: + if (field.type == TType.LIST) { + { + TList _list150 = iprot.readListBegin(); + this.group_names = new ArrayList(_list150.size); + for (int _i151 = 0; _i151 < _list150.size; ++_i151) + { + String _elem152; + _elem152 = iprot.readString(); + this.group_names.add(_elem152); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; default: TProtocolUtil.skip(iprot, field.type); break; @@ -5113,15 +20729,79 @@ 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(); + } + 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 _iter153 : this.group_names) { + oprot.writeString(_iter153); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_databases_args("); + StringBuilder sb = new StringBuilder("get_partitions_with_auth_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("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(); } @@ -5133,15 +20813,18 @@ } - public static class get_all_databases_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_all_databases_result"); + public static class get_partitions_with_auth_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 List success; public static final int SUCCESS = 0; - private MetaException o1; + private NoSuchObjectException o1; public static final int O1 = 1; + private MetaException o2; + public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -5150,68 +20833,75 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); + new StructMetaData(TType.STRUCT, Partition.class)))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_all_databases_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_with_auth_result.class, metaDataMap); } - public get_all_databases_result() { + public get_partitions_with_auth_result() { } - public get_all_databases_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_databases_result(get_all_databases_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); } } @Override - public get_all_databases_result clone() { - return new get_all_databases_result(this); + public get_partitions_with_auth_result clone() { + return new get_partitions_with_auth_result(this); } 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; } @@ -5224,11 +20914,11 @@ return this.success != null; } - public MetaException getO1() { + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -5241,13 +20931,30 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -5255,7 +20962,15 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -5272,6 +20987,9 @@ case O1: return getO1(); + case O2: + return getO2(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -5284,6 +21002,8 @@ return isSetSuccess(); case O1: return isSetO1(); + case O2: + return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -5293,12 +21013,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_partitions_with_auth_result) + return this.equals((get_partitions_with_auth_result)that); return false; } - public boolean equals(get_all_databases_result that) { + public boolean equals(get_partitions_with_auth_result that) { if (that == null) return false; @@ -5320,6 +21040,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; } @@ -5342,13 +21071,14 @@ case SUCCESS: if (field.type == TType.LIST) { { - TList _list62 = iprot.readListBegin(); - this.success = new ArrayList(_list62.size); - for (int _i63 = 0; _i63 < _list62.size; ++_i63) + TList _list154 = iprot.readListBegin(); + this.success = new ArrayList(_list154.size); + for (int _i155 = 0; _i155 < _list154.size; ++_i155) { - String _elem64; - _elem64 = iprot.readString(); - this.success.add(_elem64); + Partition _elem156; + _elem156 = new Partition(); + _elem156.read(iprot); + this.success.add(_elem156); } iprot.readListEnd(); } @@ -5358,12 +21088,20 @@ break; case 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 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); break; @@ -5381,9 +21119,9 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter65 : this.success) { - oprot.writeString(_iter65); + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter157 : this.success) { + _iter157.write(oprot); } oprot.writeListEnd(); } @@ -5392,6 +21130,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(); @@ -5399,7 +21141,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_databases_result("); + StringBuilder sb = new StringBuilder("get_partitions_with_auth_result("); boolean first = true; sb.append("success:"); @@ -5417,6 +21159,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(); } @@ -5428,74 +21178,148 @@ } - 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); + 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 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 name; - public static final int NAME = 1; + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private short max_parts; + public static final int MAX_PARTS = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean max_parts = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); }}); static { - FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_args.class, metaDataMap); } - public get_type_args() { + public get_partition_names_args() { + this.max_parts = (short)-1; + } - public get_type_args( - String name) + public get_partition_names_args( + String db_name, + String tbl_name, + short max_parts) { this(); - this.name = name; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + this.__isset.max_parts = true; } /** * Performs a deep copy on other. */ - public get_type_args(get_type_args other) { - if (other.isSetName()) { - this.name = other.name; + public get_partition_names_args(get_partition_names_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + __isset.max_parts = other.__isset.max_parts; + this.max_parts = other.max_parts; } @Override - public get_type_args clone() { - return new get_type_args(this); + public get_partition_names_args clone() { + return new get_partition_names_args(this); } - 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 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 short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + this.__isset.max_parts = true; + } + + public void unsetMax_parts() { + this.__isset.max_parts = false; + } + + // Returns true if field max_parts is set (has been asigned a value) and false otherwise + public boolean isSetMax_parts() { + return this.__isset.max_parts; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - 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 MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); } break; @@ -5506,8 +21330,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case NAME: - return getName(); + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case MAX_PARTS: + return new Short(getMax_parts()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -5517,8 +21347,12 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case NAME: - return isSetName(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case MAX_PARTS: + return isSetMax_parts(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -5528,21 +21362,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_type_args) - return this.equals((get_type_args)that); + if (that instanceof get_partition_names_args) + return this.equals((get_partition_names_args)that); return false; } - public boolean equals(get_type_args that) { + public boolean equals(get_partition_names_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_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; } @@ -5565,9 +21417,24 @@ } switch (field.id) { - case NAME: + case DB_NAME: if (field.type == TType.STRING) { - this.name = iprot.readString(); + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case MAX_PARTS: + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + this.__isset.max_parts = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -5587,27 +21454,47 @@ 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(); } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_args("); + StringBuilder sb = new StringBuilder("get_partition_names_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("max_parts:"); + sb.append(this.max_parts); + first = false; sb.append(")"); return sb.toString(); } @@ -5615,22 +21502,19 @@ public void validate() throws TException { // check for required fields // check that fields of type enum have valid values - } - - } - - 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; + } + + 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.LIST, (short)0); + private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); + + private List success; public static final int SUCCESS = 0; - private MetaException o1; - public static final int O1 = 1; - private NoSuchObjectException o2; - public static final int O2 = 2; + private MetaException o2; + public static final int O2 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -5638,56 +21522,69 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Type.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_type_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); } - public get_type_result() { + public get_partition_names_result() { } - public get_type_result( - Type 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_type_result(get_type_result other) { + public get_partition_names_result(get_partition_names_result other) { if (other.isSetSuccess()) { - this.success = new Type(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); } } @Override - public get_type_result clone() { - return new get_type_result(this); + public get_partition_names_result clone() { + return new get_partition_names_result(this); } - public Type 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(Type success) { + public void setSuccess(List success) { this.success = success; } @@ -5700,28 +21597,11 @@ return 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 NoSuchObjectException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(NoSuchObjectException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -5740,15 +21620,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((Type)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); + setSuccess((List)value); } break; @@ -5756,7 +21628,7 @@ if (value == null) { unsetO2(); } else { - setO2((NoSuchObjectException)value); + setO2((MetaException)value); } break; @@ -5770,9 +21642,6 @@ case SUCCESS: return getSuccess(); - case O1: - return getO1(); - case O2: return getO2(); @@ -5786,8 +21655,6 @@ switch (fieldID) { case SUCCESS: return isSetSuccess(); - case O1: - return isSetO1(); case O2: return isSetO2(); default: @@ -5799,12 +21666,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 get_partition_names_result) + return this.equals((get_partition_names_result)that); return false; } - public boolean equals(get_type_result that) { + public boolean equals(get_partition_names_result that) { if (that == null) return false; @@ -5817,15 +21684,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) { @@ -5855,24 +21713,25 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Type(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + if (field.type == TType.LIST) { + { + TList _list158 = iprot.readListBegin(); + this.success = new ArrayList(_list158.size); + for (int _i159 = 0; _i159 < _list158.size; ++_i159) + { + String _elem160; + _elem160 = iprot.readString(); + this.success.add(_elem160); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; case O2: if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); + this.o2 = new MetaException(); this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -5894,11 +21753,13 @@ 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 _iter161 : this.success) { + oprot.writeString(_iter161); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); @@ -5911,7 +21772,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_result("); + StringBuilder sb = new StringBuilder("get_partition_names_result("); boolean first = true; sb.append("success:"); @@ -5922,14 +21783,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"); @@ -5941,81 +21794,210 @@ return sb.toString(); } - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values + public void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + 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 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; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private List part_vals; + public static final int PART_VALS = 3; + private short max_parts; + public static final int MAX_PARTS = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean max_parts = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(get_partitions_ps_args.class, metaDataMap); + } + + public get_partitions_ps_args() { + this.max_parts = (short)-1; + + } + + public get_partitions_ps_args( + String db_name, + String tbl_name, + 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; + this.__isset.max_parts = true; + } + + /** + * Performs a deep copy on other. + */ + public get_partitions_ps_args(get_partitions_ps_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; + } + __isset.max_parts = other.__isset.max_parts; + this.max_parts = other.max_parts; + } + + @Override + public get_partitions_ps_args clone() { + return new get_partitions_ps_args(this); + } + + 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 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); + // 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 Type type; - public static final int TYPE = 1; + public String getTbl_name() { + return this.tbl_name; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Type.class))); - }}); + public void unsetTbl_name() { + this.tbl_name = null; + } - static { - FieldMetaData.addStructMetaDataMap(create_type_args.class, metaDataMap); + // 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 create_type_args() { + public int getPart_valsSize() { + return (this.part_vals == null) ? 0 : this.part_vals.size(); } - public create_type_args( - Type type) - { - this(); - this.type = type; + public java.util.Iterator getPart_valsIterator() { + return (this.part_vals == null) ? null : this.part_vals.iterator(); } - /** - * 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 addToPart_vals(String elem) { + if (this.part_vals == null) { + this.part_vals = new ArrayList(); } + this.part_vals.add(elem); } - @Override - public create_type_args clone() { - return new create_type_args(this); + public List getPart_vals() { + return this.part_vals; } - public Type getType() { - return this.type; + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; } - public void setType(Type type) { - this.type = type; + public void unsetPart_vals() { + this.part_vals = null; } - public void unsetType() { - this.type = 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 type is set (has been asigned a value) and false otherwise - public boolean isSetType() { - return this.type != null; + public short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + this.__isset.max_parts = true; + } + + public void unsetMax_parts() { + this.__isset.max_parts = false; + } + + // Returns true if field max_parts is set (has been asigned a value) and false otherwise + public boolean isSetMax_parts() { + return this.__isset.max_parts; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - 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; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); } break; @@ -6026,8 +22008,17 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case TYPE: - return getType(); + 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()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -6037,8 +22028,14 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case TYPE: - return isSetType(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -6048,21 +22045,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_type_args) - return this.equals((create_type_args)that); + if (that instanceof get_partitions_ps_args) + return this.equals((get_partitions_ps_args)that); return false; } - public boolean equals(create_type_args that) { + public boolean equals(get_partitions_ps_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; + } + + 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; } @@ -6085,10 +22109,41 @@ } switch (field.id) { - case TYPE: - if (field.type == TType.STRUCT) { - this.type = new Type(); - this.type.read(iprot); + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PART_VALS: + if (field.type == TType.LIST) { + { + TList _list162 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list162.size); + for (int _i163 = 0; _i163 < _list162.size; ++_i163) + { + String _elem164; + _elem164 = iprot.readString(); + this.part_vals.add(_elem164); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case MAX_PARTS: + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + this.__isset.max_parts = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -6108,27 +22163,66 @@ 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 _iter165 : this.part_vals) { + oprot.writeString(_iter165); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("create_type_args("); + StringBuilder sb = new StringBuilder("get_partitions_ps_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.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.type); + sb.append(this.tbl_name); } first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); + } + first = false; + if (!first) sb.append(", "); + sb.append("max_parts:"); + sb.append(this.max_parts); + first = false; sb.append(")"); return sb.toString(); } @@ -6140,104 +22234,102 @@ } - 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); + 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 static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); - private boolean success; + private List success; public static final int SUCCESS = 0; - private AlreadyExistsException o1; + private MetaException o1; public static final int O1 = 1; - private InvalidObjectException o2; - public static final int O2 = 2; - private MetaException o3; - public static final int O3 = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Partition.class)))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(create_type_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); } - public create_type_result() { + public get_partitions_ps_result() { } - public create_type_result( - boolean success, - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3) + public get_partitions_ps_result( + List success, + MetaException o1) { this(); this.success = success; - this.__isset.success = 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.success = other.__isset.success; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); + 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.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } @Override - public create_type_result clone() { - return new create_type_result(this); + public get_partitions_ps_result clone() { + return new get_partitions_ps_result(this); } - public boolean isSuccess() { + 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(boolean success) { + public void setSuccess(List success) { this.success = success; - this.__isset.success = true; } public void unsetSuccess() { - this.__isset.success = false; + this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { - return this.__isset.success; + return this.success != null; } - public AlreadyExistsException getO1() { + public MetaException getO1() { return this.o1; } - public void setO1(AlreadyExistsException o1) { + public void setO1(MetaException o1) { this.o1 = o1; } @@ -6250,47 +22342,13 @@ return 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 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((Boolean)value); + setSuccess((List)value); } break; @@ -6298,23 +22356,7 @@ 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); + setO1((MetaException)value); } break; @@ -6326,17 +22368,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return new Boolean(isSuccess()); + return getSuccess(); case O1: return getO1(); - case O2: - return getO2(); - - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -6349,10 +22385,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -6362,21 +22394,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 get_partitions_ps_result) + return this.equals((get_partitions_ps_result)that); return false; } - public boolean equals(create_type_result that) { + public boolean equals(get_partitions_ps_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; } @@ -6389,24 +22421,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; } @@ -6427,37 +22441,31 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - this.__isset.success = true; + if (field.type == TType.LIST) { + { + TList _list166 = iprot.readListBegin(); + this.success = new ArrayList(_list166.size); + for (int _i167 = 0; _i167 < _list166.size; ++_i167) + { + Partition _elem168; + _elem168 = new Partition(); + _elem168.read(iprot); + this.success.add(_elem168); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; case O1: if (field.type == TType.STRUCT) { - this.o1 = new AlreadyExistsException(); + this.o1 = new MetaException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 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); break; @@ -6474,20 +22482,18 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter169 : this.success) { + _iter169.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(); @@ -6495,34 +22501,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_type_result("); + StringBuilder sb = new StringBuilder("get_partitions_ps_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) { + 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(")"); @@ -6536,74 +22530,293 @@ } - 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); + 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 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 String type; - public static final int TYPE = 1; + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private List part_vals; + public static final int PART_VALS = 3; + private short max_parts; + public static final int MAX_PARTS = 4; + private String user_name; + public static final int USER_NAME = 5; + private List group_names; + public static final int GROUP_NAMES = 6; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean max_parts = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_type_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_with_auth_args.class, metaDataMap); } - public drop_type_args() { + public get_partitions_ps_with_auth_args() { + this.max_parts = (short)-1; + } - public drop_type_args( - String type) + 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.type = type; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + this.__isset.max_parts = true; + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public drop_type_args(drop_type_args other) { - if (other.isSetType()) { - this.type = other.type; + public get_partitions_ps_with_auth_args(get_partitions_ps_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; + } + __isset.max_parts = other.__isset.max_parts; + 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; } } @Override - public drop_type_args clone() { - return new drop_type_args(this); + public get_partitions_ps_with_auth_args clone() { + return new get_partitions_ps_with_auth_args(this); } - 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 db_name is set (has been asigned a value) and false otherwise + public boolean isSetDb_name() { + return 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 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); } - // Returns true if field type is set (has been asigned a value) and false otherwise - public boolean isSetType() { - return this.type != null; - } + 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 short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + this.__isset.max_parts = true; + } + + public void unsetMax_parts() { + this.__isset.max_parts = false; + } + + // Returns true if field max_parts is set (has been asigned a value) and false otherwise + public boolean isSetMax_parts() { + return this.__isset.max_parts; + } + + 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 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_VALS: + if (value == null) { + unsetPart_vals(); + } else { + setPart_vals((List)value); + } + break; + + case 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; - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case TYPE: + case GROUP_NAMES: if (value == null) { - unsetType(); + unsetGroup_names(); } else { - setType((String)value); + setGroup_names((List)value); } break; @@ -6614,8 +22827,23 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case TYPE: - return getType(); + 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(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -6625,8 +22853,18 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case TYPE: - return isSetType(); + 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(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -6636,21 +22874,66 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_type_args) - return this.equals((drop_type_args)that); + if (that instanceof get_partitions_ps_with_auth_args) + return this.equals((get_partitions_ps_with_auth_args)that); return false; } - public boolean equals(drop_type_args that) { + public boolean equals(get_partitions_ps_with_auth_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; + } + + 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; } @@ -6673,9 +22956,65 @@ } switch (field.id) { - case TYPE: + case DB_NAME: if (field.type == TType.STRING) { - this.type = iprot.readString(); + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PART_VALS: + if (field.type == TType.LIST) { + { + TList _list170 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list170.size); + for (int _i171 = 0; _i171 < _list170.size; ++_i171) + { + String _elem172; + _elem172 = iprot.readString(); + this.part_vals.add(_elem172); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case MAX_PARTS: + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + this.__isset.max_parts = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case USER_NAME: + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GROUP_NAMES: + if (field.type == TType.LIST) { + { + TList _list173 = iprot.readListBegin(); + this.group_names = new ArrayList(_list173.size); + for (int _i174 = 0; _i174 < _list173.size; ++_i174) + { + String _elem175; + _elem175 = iprot.readString(); + this.group_names.add(_elem175); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -6695,9 +23034,44 @@ 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_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter176 : this.part_vals) { + oprot.writeString(_iter176); + } + 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 _iter177 : this.group_names) { + oprot.writeString(_iter177); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -6706,14 +23080,50 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_type_args("); + StringBuilder sb = new StringBuilder("get_partitions_ps_with_auth_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; + 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(")"); @@ -6726,28 +23136,28 @@ } } - - 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); + + 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.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 boolean success; + private List success; public static final int SUCCESS = 0; - private MetaException o1; + private NoSuchObjectException o1; public static final int O1 = 1; - private NoSuchObjectException o2; + private MetaException o2; public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Partition.class)))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, @@ -6755,20 +23165,19 @@ }}); static { - FieldMetaData.addStructMetaDataMap(drop_type_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_with_auth_result.class, metaDataMap); } - public drop_type_result() { + public get_partitions_ps_with_auth_result() { } - public drop_type_result( - boolean success, - MetaException o1, - NoSuchObjectException o2) + public get_partitions_ps_with_auth_result( + List success, + NoSuchObjectException o1, + MetaException o2) { this(); this.success = success; - this.__isset.success = true; this.o1 = o1; this.o2 = o2; } @@ -6776,45 +23185,64 @@ /** * Performs a deep copy on other. */ - public drop_type_result(drop_type_result other) { - __isset.success = other.__isset.success; - this.success = other.success; + public get_partitions_ps_with_auth_result(get_partitions_ps_with_auth_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); + } + this.success = __this__success; + } if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + this.o2 = new MetaException(other.o2); } } @Override - public drop_type_result clone() { - return new drop_type_result(this); + public get_partitions_ps_with_auth_result clone() { + return new get_partitions_ps_with_auth_result(this); } - public boolean isSuccess() { + 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(boolean success) { + public void setSuccess(List success) { this.success = success; - this.__isset.success = true; } public void unsetSuccess() { - this.__isset.success = false; + this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { - return this.__isset.success; + return this.success != null; } - public MetaException getO1() { + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -6827,11 +23255,11 @@ return 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; } @@ -6850,7 +23278,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((Boolean)value); + setSuccess((List)value); } break; @@ -6858,7 +23286,7 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((NoSuchObjectException)value); } break; @@ -6866,7 +23294,7 @@ if (value == null) { unsetO2(); } else { - setO2((NoSuchObjectException)value); + setO2((MetaException)value); } break; @@ -6878,7 +23306,7 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return new Boolean(isSuccess()); + return getSuccess(); case O1: return getO1(); @@ -6909,21 +23337,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 get_partitions_ps_with_auth_result) + return this.equals((get_partitions_ps_with_auth_result)that); return false; } - public boolean equals(drop_type_result that) { + public boolean equals(get_partitions_ps_with_auth_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; } @@ -6965,16 +23393,26 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - this.__isset.success = true; + if (field.type == TType.LIST) { + { + TList _list178 = iprot.readListBegin(); + this.success = new ArrayList(_list178.size); + for (int _i179 = 0; _i179 < _list178.size; ++_i179) + { + Partition _elem180; + _elem180 = new Partition(); + _elem180.read(iprot); + this.success.add(_elem180); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; case O1: if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); + this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -6982,7 +23420,7 @@ break; case O2: if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); + this.o2 = new MetaException(); this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -7004,7 +23442,13 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter181 : this.success) { + _iter181.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -7021,11 +23465,15 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_type_result("); + StringBuilder sb = new StringBuilder("get_partitions_ps_with_auth_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:"); @@ -7054,74 +23502,203 @@ } - 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); + 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 name; - public static final int NAME = 1; + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private List part_vals; + public static final int PART_VALS = 3; + private short max_parts; + public static final int MAX_PARTS = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean max_parts = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); }}); static { - FieldMetaData.addStructMetaDataMap(get_type_all_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); } - public get_type_all_args() { + public get_partition_names_ps_args() { + this.max_parts = (short)-1; + } - public get_type_all_args( - String name) + public get_partition_names_ps_args( + String db_name, + String tbl_name, + List part_vals, + short max_parts) { this(); - this.name = name; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + this.__isset.max_parts = 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 get_partition_names_ps_args(get_partition_names_ps_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; } + __isset.max_parts = other.__isset.max_parts; + this.max_parts = other.max_parts; + } + + @Override + public get_partition_names_ps_args clone() { + return new get_partition_names_ps_args(this); + } + + 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 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 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; } - @Override - public get_type_all_args clone() { - return new get_type_all_args(this); + // 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 String getName() { - return this.name; + public short getMax_parts() { + return this.max_parts; } - public void setName(String name) { - this.name = name; + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + this.__isset.max_parts = true; } - public void unsetName() { - this.name = null; + public void unsetMax_parts() { + this.__isset.max_parts = false; } - // 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 max_parts is set (has been asigned a value) and false otherwise + public boolean isSetMax_parts() { + return this.__isset.max_parts; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - 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 MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); } break; @@ -7132,8 +23709,17 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case NAME: - return getName(); + 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()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -7143,8 +23729,14 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case NAME: - return isSetName(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case PART_VALS: + return isSetPart_vals(); + case MAX_PARTS: + return isSetMax_parts(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -7154,21 +23746,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 get_partition_names_ps_args) + return this.equals((get_partition_names_ps_args)that); return false; } - public boolean equals(get_type_all_args that) { + public boolean equals(get_partition_names_ps_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_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; } @@ -7191,9 +23810,41 @@ } switch (field.id) { - case NAME: + case DB_NAME: if (field.type == TType.STRING) { - this.name = iprot.readString(); + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PART_VALS: + if (field.type == TType.LIST) { + { + TList _list182 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list182.size); + for (int _i183 = 0; _i183 < _list182.size; ++_i183) + { + String _elem184; + _elem184 = iprot.readString(); + this.part_vals.add(_elem184); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case MAX_PARTS: + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + this.__isset.max_parts = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -7213,27 +23864,66 @@ 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 _iter185 : this.part_vals) { + oprot.writeString(_iter185); + } + 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("get_type_all_args("); + StringBuilder sb = new StringBuilder("get_partition_names_ps_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("max_parts:"); + sb.append(this.max_parts); + first = false; sb.append(")"); return sb.toString(); } @@ -7245,15 +23935,15 @@ } - 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); + 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.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private Map success; + private List success; public static final int SUCCESS = 0; - private MetaException o2; - public static final int O2 = 1; + private MetaException o1; + public static final int O1 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -7261,74 +23951,69 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new StructMetaData(TType.STRUCT, Type.class)))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); } - public get_type_all_result() { + public get_partition_names_ps_result() { } - public get_type_all_result( - Map success, - MetaException o2) + public get_partition_names_ps_result( + List success, + MetaException o1) { this(); this.success = success; - this.o2 = o2; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_type_all_result(get_type_all_result other) { + public get_partition_names_ps_result(get_partition_names_ps_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); + 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); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } @Override - public get_type_all_result clone() { - return new get_type_all_result(this); + public get_partition_names_ps_result clone() { + return new get_partition_names_ps_result(this); } public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } - public void putToSuccess(String key, Type val) { + 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 HashMap(); + this.success = new ArrayList(); } - this.success.put(key, val); + this.success.add(elem); } - public Map getSuccess() { + public List getSuccess() { return this.success; } - public void setSuccess(Map success) { + public void setSuccess(List success) { this.success = success; } @@ -7341,21 +24026,21 @@ return 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 setFieldValue(int fieldID, Object value) { @@ -7364,15 +24049,15 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((Map)value); + setSuccess((List)value); } break; - case O2: + case O1: if (value == null) { - unsetO2(); + unsetO1(); } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -7386,8 +24071,8 @@ case SUCCESS: return getSuccess(); - case O2: - return getO2(); + case O1: + return getO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -7399,8 +24084,8 @@ switch (fieldID) { case SUCCESS: return isSetSuccess(); - case O2: - return isSetO2(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -7410,12 +24095,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_type_all_result) - return this.equals((get_type_all_result)that); + if (that instanceof get_partition_names_ps_result) + return this.equals((get_partition_names_ps_result)that); return false; } - public boolean equals(get_type_all_result that) { + public boolean equals(get_partition_names_ps_result that) { if (that == null) return false; @@ -7428,12 +24113,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_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; } @@ -7457,29 +24142,26 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.MAP) { + if (field.type == TType.LIST) { { - TMap _map66 = iprot.readMapBegin(); - this.success = new HashMap(2*_map66.size); - for (int _i67 = 0; _i67 < _map66.size; ++_i67) + TList _list186 = iprot.readListBegin(); + this.success = new ArrayList(_list186.size); + for (int _i187 = 0; _i187 < _list186.size; ++_i187) { - String _key68; - Type _val69; - _key68 = iprot.readString(); - _val69 = new Type(); - _val69.read(iprot); - this.success.put(_key68, _val69); + String _elem188; + _elem188 = iprot.readString(); + this.success.add(_elem188); } - iprot.readMapEnd(); + iprot.readListEnd(); } } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 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); } @@ -7501,17 +24183,16 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size())); - for (Map.Entry _iter70 : this.success.entrySet()) { - oprot.writeString(_iter70.getKey()); - _iter70.getValue().write(oprot); + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter189 : this.success) { + oprot.writeString(_iter189); } - oprot.writeMapEnd(); + oprot.writeListEnd(); } 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(); @@ -7520,7 +24201,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_all_result("); + StringBuilder sb = new StringBuilder("get_partition_names_ps_result("); boolean first = true; sb.append("success:"); @@ -7531,11 +24212,11 @@ } 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(")"); @@ -7549,58 +24230,81 @@ } - public static class get_fields_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_fields_args"); + public static class get_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 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 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; public static final int DB_NAME = 1; - private String table_name; - public static final int TABLE_NAME = 2; + private String tbl_name; + public static final int TBL_NAME = 2; + private String filter; + public static final int FILTER = 3; + private short max_parts; + public static final int MAX_PARTS = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean max_parts = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(FILTER, new FieldMetaData("filter", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); }}); static { - FieldMetaData.addStructMetaDataMap(get_fields_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); } - public get_fields_args() { + public get_partitions_by_filter_args() { + this.max_parts = (short)-1; + } - public get_fields_args( + public get_partitions_by_filter_args( String db_name, - String table_name) + String tbl_name, + String filter, + short max_parts) { this(); this.db_name = db_name; - this.table_name = table_name; + this.tbl_name = tbl_name; + this.filter = filter; + this.max_parts = max_parts; + this.__isset.max_parts = true; } /** * Performs a deep copy on other. */ - public get_fields_args(get_fields_args other) { + public get_partitions_by_filter_args(get_partitions_by_filter_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.isSetFilter()) { + this.filter = other.filter; + } + __isset.max_parts = other.__isset.max_parts; + this.max_parts = other.max_parts; } @Override - public get_fields_args clone() { - return new get_fields_args(this); + public get_partitions_by_filter_args clone() { + return new get_partitions_by_filter_args(this); } public String getDb_name() { @@ -7620,21 +24324,56 @@ return this.db_name != null; } - 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 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 short getMax_parts() { + return this.max_parts; + } + + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + this.__isset.max_parts = true; + } + + public void unsetMax_parts() { + this.__isset.max_parts = false; + } + + // Returns true if field max_parts is set (has been asigned a value) and false otherwise + public boolean isSetMax_parts() { + return this.__isset.max_parts; } public void setFieldValue(int fieldID, Object value) { @@ -7647,11 +24386,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 FILTER: + if (value == null) { + unsetFilter(); + } else { + setFilter((String)value); + } + break; + + case MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); } break; @@ -7665,8 +24420,14 @@ case DB_NAME: return getDb_name(); - case TABLE_NAME: - return getTable_name(); + case TBL_NAME: + return getTbl_name(); + + case FILTER: + return getFilter(); + + case MAX_PARTS: + return new Short(getMax_parts()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -7678,8 +24439,12 @@ switch (fieldID) { case DB_NAME: return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); + case TBL_NAME: + return isSetTbl_name(); + case FILTER: + return isSetFilter(); + case MAX_PARTS: + return isSetMax_parts(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -7689,12 +24454,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 get_partitions_by_filter_args) + return this.equals((get_partitions_by_filter_args)that); return false; } - public boolean equals(get_fields_args that) { + public boolean equals(get_partitions_by_filter_args that) { if (that == null) return false; @@ -7707,12 +24472,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_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)) + return false; + if (this.max_parts != that.max_parts) return false; } @@ -7742,9 +24525,24 @@ TProtocolUtil.skip(iprot, field.type); } break; - case TABLE_NAME: + case 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 FILTER: + if (field.type == TType.STRING) { + this.filter = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case MAX_PARTS: + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + this.__isset.max_parts = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -7769,18 +24567,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.filter != null) { + oprot.writeFieldBegin(FILTER_FIELD_DESC); + oprot.writeString(this.filter); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); + oprot.writeI16(this.max_parts); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_fields_args("); + StringBuilder sb = new StringBuilder("get_partitions_by_filter_args("); boolean first = true; sb.append("db_name:"); @@ -7791,13 +24597,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("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); + first = false; sb.append(")"); return sb.toString(); } @@ -7809,21 +24627,18 @@ } - public static class get_fields_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_fields_result"); + public static class get_partitions_by_filter_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.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 List success; public static final int SUCCESS = 0; private MetaException o1; public static final int O1 = 1; - private UnknownTableException o2; + private NoSuchObjectException o2; public static final int O2 = 2; - private UnknownDBException o3; - public static final int O3 = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -7832,43 +24647,39 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, FieldSchema.class)))); + new StructMetaData(TType.STRUCT, Partition.class)))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_result.class, metaDataMap); } - public get_fields_result() { + public get_partitions_by_filter_result() { } - public get_fields_result( - List success, + public get_partitions_by_filter_result( + List 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_fields_result(get_fields_result other) { + public get_partitions_by_filter_result(get_partitions_by_filter_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (FieldSchema other_element : other.success) { - __this__success.add(new FieldSchema(other_element)); + List __this__success = new ArrayList(); + for (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); } this.success = __this__success; } @@ -7876,38 +24687,35 @@ 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); } } @Override - public get_fields_result clone() { - return new get_fields_result(this); + public get_partitions_by_filter_result clone() { + return new get_partitions_by_filter_result(this); } 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(FieldSchema 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; } @@ -7937,11 +24745,11 @@ return this.o1 != null; } - public UnknownTableException getO2() { + public NoSuchObjectException getO2() { return this.o2; } - public void setO2(UnknownTableException o2) { + public void setO2(NoSuchObjectException o2) { this.o2 = o2; } @@ -7954,30 +24762,13 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -7993,15 +24784,7 @@ if (value == null) { unsetO2(); } else { - setO2((UnknownTableException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); + setO2((NoSuchObjectException)value); } break; @@ -8021,9 +24804,6 @@ case O2: return getO2(); - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -8038,8 +24818,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -8049,12 +24827,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_fields_result) - return this.equals((get_fields_result)that); + if (that instanceof get_partitions_by_filter_result) + return this.equals((get_partitions_by_filter_result)that); return false; } - public boolean equals(get_fields_result that) { + public boolean equals(get_partitions_by_filter_result that) { if (that == null) return false; @@ -8085,15 +24863,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; } @@ -8116,14 +24885,14 @@ case SUCCESS: if (field.type == TType.LIST) { { - TList _list71 = iprot.readListBegin(); - this.success = new ArrayList(_list71.size); - for (int _i72 = 0; _i72 < _list71.size; ++_i72) + TList _list190 = iprot.readListBegin(); + this.success = new ArrayList(_list190.size); + for (int _i191 = 0; _i191 < _list190.size; ++_i191) { - FieldSchema _elem73; - _elem73 = new FieldSchema(); - _elem73.read(iprot); - this.success.add(_elem73); + Partition _elem192; + _elem192 = new Partition(); + _elem192.read(iprot); + this.success.add(_elem192); } iprot.readListEnd(); } @@ -8141,20 +24910,12 @@ break; case 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 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); break; @@ -8173,8 +24934,8 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (FieldSchema _iter74 : this.success) { - _iter74.write(oprot); + for (Partition _iter193 : this.success) { + _iter193.write(oprot); } oprot.writeListEnd(); } @@ -8187,10 +24948,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(); @@ -8198,7 +24955,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_fields_result("); + StringBuilder sb = new StringBuilder("get_partitions_by_filter_result("); boolean first = true; sb.append("success:"); @@ -8224,14 +24981,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(); } @@ -8243,15 +24992,18 @@ } - 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 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 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 NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)3); private String db_name; public static final int DB_NAME = 1; - private String table_name; - public static final int TABLE_NAME = 2; + private String tbl_name; + public static final int TBL_NAME = 2; + private Partition new_part; + public static final int NEW_PART = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -8260,41 +25012,48 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + put(NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); }}); static { - FieldMetaData.addStructMetaDataMap(get_schema_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); } - public get_schema_args() { + public alter_partition_args() { } - public get_schema_args( + public alter_partition_args( String db_name, - String table_name) + String tbl_name, + Partition new_part) { this(); this.db_name = db_name; - this.table_name = table_name; + this.tbl_name = tbl_name; + this.new_part = new_part; } /** * Performs a deep copy on other. */ - public get_schema_args(get_schema_args other) { + public alter_partition_args(alter_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.isSetNew_part()) { + this.new_part = new Partition(other.new_part); } } @Override - public get_schema_args clone() { - return new get_schema_args(this); + public alter_partition_args clone() { + return new alter_partition_args(this); } public String getDb_name() { @@ -8314,21 +25073,38 @@ return this.db_name != null; } - 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 Partition getNew_part() { + return this.new_part; + } + + public void setNew_part(Partition new_part) { + this.new_part = new_part; + } + + public void unsetNew_part() { + this.new_part = null; + } + + // Returns true if field new_part is set (has been asigned a value) and false otherwise + public boolean isSetNew_part() { + return this.new_part != null; } public void setFieldValue(int fieldID, Object value) { @@ -8341,11 +25117,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 NEW_PART: + if (value == null) { + unsetNew_part(); + } else { + setNew_part((Partition)value); } break; @@ -8359,8 +25143,11 @@ case DB_NAME: return getDb_name(); - case TABLE_NAME: - return getTable_name(); + case TBL_NAME: + return getTbl_name(); + + case NEW_PART: + return getNew_part(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -8372,8 +25159,10 @@ switch (fieldID) { case DB_NAME: return isSetDb_name(); - case TABLE_NAME: - return isSetTable_name(); + case TBL_NAME: + return isSetTbl_name(); + case NEW_PART: + return isSetNew_part(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -8383,12 +25172,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 alter_partition_args) + return this.equals((alter_partition_args)that); return false; } - public boolean equals(get_schema_args that) { + public boolean equals(alter_partition_args that) { if (that == null) return false; @@ -8401,12 +25190,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_new_part = true && this.isSetNew_part(); + boolean that_present_new_part = true && that.isSetNew_part(); + if (this_present_new_part || that_present_new_part) { + if (!(this_present_new_part && that_present_new_part)) + return false; + if (!this.new_part.equals(that.new_part)) return false; } @@ -8436,9 +25234,17 @@ TProtocolUtil.skip(iprot, field.type); } break; - case TABLE_NAME: + case 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 NEW_PART: + if (field.type == TType.STRUCT) { + this.new_part = new Partition(); + this.new_part.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -8463,9 +25269,14 @@ 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.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + this.new_part.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -8474,7 +25285,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_schema_args("); + StringBuilder sb = new StringBuilder("alter_partition_args("); boolean first = true; sb.append("db_name:"); @@ -8485,11 +25296,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("new_part:"); + if (this.new_part == null) { + sb.append("null"); + } else { + sb.append(this.new_part); } first = false; sb.append(")"); @@ -8503,122 +25322,65 @@ } - 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); + 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 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; - public static final int SUCCESS = 0; - private MetaException o1; + private InvalidOperationException o1; public static final int O1 = 1; - private UnknownTableException o2; + private MetaException o2; public static final int O2 = 2; - private UnknownDBException o3; - public static final int O3 = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, FieldSchema.class)))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_schema_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_partition_result.class, metaDataMap); } - public get_schema_result() { + public alter_partition_result() { } - public get_schema_result( - List success, - MetaException o1, - UnknownTableException o2, - UnknownDBException o3) + public alter_partition_result( + InvalidOperationException o1, + MetaException 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) { - 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 alter_partition_result(alter_partition_result other) { if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + this.o1 = new InvalidOperationException(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); } } @Override - public get_schema_result clone() { - return new get_schema_result(this); - } - - 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 alter_partition_result clone() { + return new alter_partition_result(this); } - public MetaException getO1() { + public InvalidOperationException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(InvalidOperationException o1) { this.o1 = o1; } @@ -8631,11 +25393,11 @@ return this.o1 != null; } - public UnknownTableException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(UnknownTableException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -8648,38 +25410,13 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - case O1: if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((InvalidOperationException)value); } break; @@ -8687,15 +25424,7 @@ if (value == null) { unsetO2(); } else { - setO2((UnknownTableException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); + setO2((MetaException)value); } break; @@ -8706,18 +25435,12 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case SUCCESS: - return getSuccess(); - case O1: return getO1(); case O2: return getO2(); - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -8726,14 +25449,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case SUCCESS: - return isSetSuccess(); case O1: return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -8743,24 +25462,15 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_schema_result) - return this.equals((get_schema_result)that); + if (that instanceof alter_partition_result) + return this.equals((alter_partition_result)that); return false; } - public boolean equals(get_schema_result that) { + public boolean equals(alter_partition_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - boolean this_present_o1 = true && this.isSetO1(); boolean that_present_o1 = true && that.isSetO1(); if (this_present_o1 || that_present_o1) { @@ -8779,15 +25489,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; } @@ -8807,27 +25508,9 @@ } switch (field.id) { - case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list75 = iprot.readListBegin(); - this.success = new ArrayList(_list75.size); - for (int _i76 = 0; _i76 < _list75.size; ++_i76) - { - FieldSchema _elem77; - _elem77 = new FieldSchema(); - _elem77.read(iprot); - this.success.add(_elem77); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; case O1: if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); + this.o1 = new InvalidOperationException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -8835,20 +25518,12 @@ break; case 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 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); break; @@ -8863,17 +25538,7 @@ 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 _iter78 : this.success) { - _iter78.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { + if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); @@ -8881,10 +25546,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(); @@ -8892,17 +25553,9 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_schema_result("); + StringBuilder sb = new StringBuilder("alter_partition_result("); boolean first = true; - sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } - first = false; - if (!first) sb.append(", "); sb.append("o1:"); if (this.o1 == null) { sb.append("null"); @@ -8918,14 +25571,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(); } @@ -8937,74 +25582,109 @@ } - public static class create_table_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("create_table_args"); - private static final TField TBL_FIELD_DESC = new TField("tbl", TType.STRUCT, (short)1); + 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 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 Table tbl; - public static final int TBL = 1; + private String name; + public static final int NAME = 1; + private String defaultValue; + public static final int DEFAULTVALUE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TBL, new FieldMetaData("tbl", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); + put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(DEFAULTVALUE, new FieldMetaData("defaultValue", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); } - public create_table_args() { + public get_config_value_args() { } - public create_table_args( - Table tbl) + public get_config_value_args( + String name, + String defaultValue) { this(); - this.tbl = tbl; + this.name = name; + this.defaultValue = defaultValue; } /** * Performs a deep copy on other. */ - public create_table_args(create_table_args other) { - if (other.isSetTbl()) { - this.tbl = new Table(other.tbl); + public get_config_value_args(get_config_value_args other) { + if (other.isSetName()) { + this.name = other.name; + } + if (other.isSetDefaultValue()) { + this.defaultValue = other.defaultValue; } } @Override - public create_table_args clone() { - return new create_table_args(this); + public get_config_value_args clone() { + return new get_config_value_args(this); } - public Table getTbl() { - return this.tbl; + public String getName() { + return this.name; } - public void setTbl(Table tbl) { - this.tbl = tbl; + public void setName(String name) { + this.name = name; } - public void unsetTbl() { - this.tbl = null; + public void unsetName() { + this.name = null; } - // Returns true if field tbl is set (has been asigned a value) and false otherwise - public boolean isSetTbl() { - return this.tbl != null; + // Returns true if field name is set (has been asigned a value) and false otherwise + public boolean isSetName() { + return this.name != null; + } + + public String getDefaultValue() { + return this.defaultValue; + } + + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + + public void unsetDefaultValue() { + this.defaultValue = 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case TBL: + case NAME: if (value == null) { - unsetTbl(); + unsetName(); } else { - setTbl((Table)value); + setName((String)value); + } + break; + + case DEFAULTVALUE: + if (value == null) { + unsetDefaultValue(); + } else { + setDefaultValue((String)value); } break; @@ -9015,8 +25695,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case TBL: - return getTbl(); + case NAME: + return getName(); + + case DEFAULTVALUE: + return getDefaultValue(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -9026,8 +25709,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case TBL: - return isSetTbl(); + case NAME: + return isSetName(); + case DEFAULTVALUE: + return isSetDefaultValue(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -9037,21 +25722,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_table_args) - return this.equals((create_table_args)that); + if (that instanceof get_config_value_args) + return this.equals((get_config_value_args)that); return false; } - public boolean equals(create_table_args that) { + public boolean equals(get_config_value_args that) { if (that == null) return false; - boolean this_present_tbl = true && this.isSetTbl(); - boolean that_present_tbl = true && that.isSetTbl(); - if (this_present_tbl || that_present_tbl) { - if (!(this_present_tbl && that_present_tbl)) + 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.tbl.equals(that.tbl)) + 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)) + return false; + if (!this.defaultValue.equals(that.defaultValue)) return false; } @@ -9074,10 +25768,16 @@ } switch (field.id) { - case TBL: - if (field.type == TType.STRUCT) { - this.tbl = new Table(); - this.tbl.read(iprot); + case NAME: + if (field.type == TType.STRING) { + this.name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DEFAULTVALUE: + if (field.type == TType.STRING) { + this.defaultValue = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -9097,9 +25797,14 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.tbl != null) { - oprot.writeFieldBegin(TBL_FIELD_DESC); - this.tbl.write(oprot); + 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); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -9108,14 +25813,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_table_args("); + StringBuilder sb = new StringBuilder("get_config_value_args("); boolean first = true; - sb.append("tbl:"); - if (this.tbl == null) { + sb.append("name:"); + if (this.name == null) { sb.append("null"); } else { - sb.append(this.tbl); + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("defaultValue:"); + if (this.defaultValue == null) { + sb.append("null"); + } else { + sb.append(this.defaultValue); } first = false; sb.append(")"); @@ -9129,179 +25842,109 @@ } - public static class create_table_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("create_table_result"); + public static class get_config_value_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.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 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 String success; + public static final int SUCCESS = 0; + private ConfigValSecurityException o1; public static final int O1 = 1; - private InvalidObjectException o2; - public static final int O2 = 2; - private MetaException o3; - public static final int O3 = 3; - private NoSuchObjectException o4; - public static final int O4 = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O4, new FieldMetaData("o4", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_config_value_result.class, metaDataMap); } - public create_table_result() { + public get_config_value_result() { } - public create_table_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3, - NoSuchObjectException o4) + public get_config_value_result( + String success, + ConfigValSecurityException o1) { 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) { - if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + public get_config_value_result(get_config_value_result other) { + if (other.isSetSuccess()) { + this.success = other.success; } - if (other.isSetO4()) { - this.o4 = new NoSuchObjectException(other.o4); + if (other.isSetO1()) { + this.o1 = new ConfigValSecurityException(other.o1); } } @Override - public create_table_result clone() { - return new create_table_result(this); - } - - 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 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 get_config_value_result clone() { + return new get_config_value_result(this); } - public MetaException getO3() { - return this.o3; + public String getSuccess() { + return this.success; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setSuccess(String success) { + this.success = success; } - public void unsetO3() { - this.o3 = null; + public void unsetSuccess() { + this.success = 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 success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.success != null; } - public NoSuchObjectException getO4() { - return this.o4; + public ConfigValSecurityException getO1() { + return this.o1; } - public void setO4(NoSuchObjectException o4) { - this.o4 = o4; + public void setO1(ConfigValSecurityException o1) { + this.o1 = o1; } - public void unsetO4() { - this.o4 = null; + public void unsetO1() { + this.o1 = null; } - // Returns true if field o4 is set (has been asigned a value) and false otherwise - public boolean isSetO4() { - return this.o4 != null; + // Returns true if field o1 is set (has been asigned a value) and false otherwise + public boolean isSetO1() { + return this.o1 != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((AlreadyExistsException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: + case SUCCESS: if (value == null) { - unsetO3(); + unsetSuccess(); } else { - setO3((MetaException)value); + setSuccess((String)value); } break; - case O4: + case O1: if (value == null) { - unsetO4(); + unsetO1(); } else { - setO4((NoSuchObjectException)value); + setO1((ConfigValSecurityException)value); } break; @@ -9312,18 +25955,12 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { + case SUCCESS: + return getSuccess(); + case O1: return getO1(); - case O2: - return getO2(); - - case O3: - return getO3(); - - case O4: - return getO4(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -9332,14 +25969,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { + case SUCCESS: + return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -9349,15 +25982,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_config_value_result) + return this.equals((get_config_value_result)that); return false; } - public boolean equals(create_table_result that) { + public boolean equals(get_config_value_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) { @@ -9367,33 +26009,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; - } - - 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; } @@ -9413,34 +26028,17 @@ } switch (field.id) { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new AlreadyExistsException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); - this.o2.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case SUCCESS: + if (field.type == TType.STRING) { + this.success = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O4: + case O1: if (field.type == TType.STRUCT) { - this.o4 = new NoSuchObjectException(); - this.o4.read(iprot); + this.o1 = new ConfigValSecurityException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -9459,21 +26057,13 @@ 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); + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(this.success); oprot.writeFieldEnd(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -9482,38 +26072,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_table_result("); + StringBuilder sb = new StringBuilder("get_config_value_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("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.o4); + sb.append(this.o1); } first = false; sb.append(")"); @@ -9527,146 +26101,74 @@ } - public static class drop_table_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_table_args"); - private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)2); - private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)3); + 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 PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); - private String dbname; - public static final int DBNAME = 1; - private String name; - public static final int NAME = 2; - private boolean deleteData; - public static final int DELETEDATA = 3; + private String part_name; + public static final int PART_NAME = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean deleteData = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_vals_args.class, metaDataMap); } - public drop_table_args() { + public partition_name_to_vals_args() { } - public drop_table_args( - String dbname, - String name, - boolean deleteData) + public partition_name_to_vals_args( + String part_name) { this(); - this.dbname = dbname; - this.name = name; - this.deleteData = deleteData; - this.__isset.deleteData = true; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public drop_table_args(drop_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetName()) { - this.name = other.name; + public partition_name_to_vals_args(partition_name_to_vals_args other) { + if (other.isSetPart_name()) { + this.part_name = other.part_name; } - __isset.deleteData = other.__isset.deleteData; - this.deleteData = other.deleteData; } @Override - public drop_table_args clone() { - return new drop_table_args(this); - } - - 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 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 partition_name_to_vals_args clone() { + return new partition_name_to_vals_args(this); } - public boolean isDeleteData() { - return this.deleteData; + public String getPart_name() { + return this.part_name; } - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - this.__isset.deleteData = true; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetDeleteData() { - this.__isset.deleteData = false; + 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 this.__isset.deleteData; + // 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case NAME: - if (value == null) { - unsetName(); - } else { - setName((String)value); - } - break; - - case DELETEDATA: + case PART_NAME: if (value == null) { - unsetDeleteData(); + unsetPart_name(); } else { - setDeleteData((Boolean)value); + setPart_name((String)value); } break; @@ -9677,14 +26179,8 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DBNAME: - return getDbname(); - - case NAME: - return getName(); - - case DELETEDATA: - return new Boolean(isDeleteData()); + case PART_NAME: + return getPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -9694,12 +26190,8 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case DBNAME: - return isSetDbname(); - case NAME: - return isSetName(); - case DELETEDATA: - return isSetDeleteData(); + case PART_NAME: + return isSetPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -9709,39 +26201,21 @@ 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 partition_name_to_vals_args) + return this.equals((partition_name_to_vals_args)that); return false; } - public boolean equals(drop_table_args that) { + public boolean equals(partition_name_to_vals_args that) { if (that == null) return false; - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) - return false; - if (!this.name.equals(that.name)) - return false; - } - - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) + 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; } @@ -9764,24 +26238,9 @@ } switch (field.id) { - case DBNAME: - if (field.type == TType.STRING) { - this.dbname = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case NAME: + case PART_NAME: if (field.type == TType.STRING) { - this.name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case DELETEDATA: - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -9801,47 +26260,27 @@ 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); + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("drop_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) { + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("partition_name_to_vals_args("); + boolean first = true; + + sb.append("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.name); + 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(); } @@ -9853,109 +26292,129 @@ } - public static class drop_table_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_table_result"); + public static class partition_name_to_vals_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.LIST, (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 NoSuchObjectException o1; + private List success; + public static final int SUCCESS = 0; + private MetaException o1; public static final int O1 = 1; - private MetaException o3; - public static final int O3 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); } - public drop_table_result() { + public partition_name_to_vals_result() { } - public drop_table_result( - NoSuchObjectException o1, - MetaException o3) + public partition_name_to_vals_result( + List success, + MetaException o1) { this(); + this.success = success; this.o1 = o1; - this.o3 = o3; } /** * Performs a deep copy on other. */ - public drop_table_result(drop_table_result other) { - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + public partition_name_to_vals_result(partition_name_to_vals_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (String other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } @Override - public drop_table_result clone() { - return new drop_table_result(this); + public partition_name_to_vals_result clone() { + return new partition_name_to_vals_result(this); } - public NoSuchObjectException getO1() { - return this.o1; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setO1(NoSuchObjectException 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 MetaException getO3() { - return this.o3; + public void setSuccess(List success) { + this.success = success; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void unsetSuccess() { + this.success = null; } - public void unsetO3() { - this.o3 = 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 o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case O1: + case SUCCESS: if (value == null) { - unsetO1(); + unsetSuccess(); } else { - setO1((NoSuchObjectException)value); + setSuccess((List)value); } break; - case O3: + case O1: if (value == null) { - unsetO3(); + unsetO1(); } else { - setO3((MetaException)value); + setO1((MetaException)value); } break; @@ -9966,12 +26425,12 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { + case SUCCESS: + return getSuccess(); + case O1: return getO1(); - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -9980,10 +26439,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { + case SUCCESS: + return isSetSuccess(); case O1: return isSetO1(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -9993,15 +26452,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 partition_name_to_vals_result) + return this.equals((partition_name_to_vals_result)that); return false; } - public boolean equals(drop_table_result that) { + public boolean equals(partition_name_to_vals_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) { @@ -10011,15 +26479,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; } @@ -10039,18 +26498,27 @@ } switch (field.id) { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list194 = iprot.readListBegin(); + this.success = new ArrayList(_list194.size); + for (int _i195 = 0; _i195 < _list194.size; ++_i195) + { + String _elem196; + _elem196 = iprot.readString(); + this.success.add(_elem196); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 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); } @@ -10069,14 +26537,20 @@ 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 _iter197 : this.success) { + oprot.writeString(_iter197); + } + oprot.writeListEnd(); + } + 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); - oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -10084,22 +26558,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_table_result("); + StringBuilder sb = new StringBuilder("partition_name_to_vals_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("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(")"); @@ -10113,109 +26587,74 @@ } - public static class get_tables_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_tables_args"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)2); + public static class partition_name_to_spec_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_spec_args"); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); - private String db_name; - public static final int DB_NAME = 1; - private String pattern; - public static final int PATTERN = 2; + private String part_name; + public static final int PART_NAME = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, + put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_spec_args.class, metaDataMap); } - public get_tables_args() { + public partition_name_to_spec_args() { } - public get_tables_args( - String db_name, - String pattern) + public partition_name_to_spec_args( + String part_name) { this(); - this.db_name = db_name; - this.pattern = pattern; - } - - /** - * Performs a deep copy on other. - */ - public get_tables_args(get_tables_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetPattern()) { - this.pattern = other.pattern; - } - } - - @Override - public get_tables_args clone() { - return new get_tables_args(this); - } - - public String getDb_name() { - return this.db_name; - } - - public void setDb_name(String db_name) { - this.db_name = db_name; + this.part_name = part_name; } - public void unsetDb_name() { - this.db_name = null; + /** + * 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; + } } - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; + @Override + public partition_name_to_spec_args clone() { + return new partition_name_to_spec_args(this); } - public String getPattern() { - return this.pattern; + public String getPart_name() { + return this.part_name; } - public void setPattern(String pattern) { - this.pattern = pattern; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetPattern() { - this.pattern = null; + public void unsetPart_name() { + this.part_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 part_name is set (has been asigned a value) and false otherwise + public boolean isSetPart_name() { + return this.part_name != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case PATTERN: + case PART_NAME: if (value == null) { - unsetPattern(); + unsetPart_name(); } else { - setPattern((String)value); + setPart_name((String)value); } break; @@ -10226,11 +26665,8 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case PATTERN: - return getPattern(); + case PART_NAME: + return getPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -10240,10 +26676,8 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case PATTERN: - return isSetPattern(); + case PART_NAME: + return isSetPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -10253,30 +26687,21 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_tables_args) - return this.equals((get_tables_args)that); + if (that instanceof partition_name_to_spec_args) + return this.equals((partition_name_to_spec_args)that); return false; } - public boolean equals(get_tables_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_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_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.pattern.equals(that.pattern)) + if (!this.part_name.equals(that.part_name)) return false; } @@ -10299,16 +26724,9 @@ } switch (field.id) { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PATTERN: + case PART_NAME: if (field.type == TType.STRING) { - this.pattern = iprot.readString(); + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -10328,14 +26746,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.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -10344,22 +26757,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_tables_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("pattern:"); - if (this.pattern == null) { + sb.append("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.pattern); + sb.append(this.part_name); } first = false; sb.append(")"); @@ -10373,12 +26778,12 @@ } - 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); + 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.MAP, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private List success; + private Map success; public static final int SUCCESS = 0; private MetaException o1; public static final int O1 = 1; @@ -10389,21 +26794,22 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_spec_result.class, metaDataMap); } - public get_tables_result() { + public partition_name_to_spec_result() { } - public get_tables_result( - List success, + public partition_name_to_spec_result( + Map success, MetaException o1) { this(); @@ -10414,11 +26820,19 @@ /** * Performs a deep copy on other. */ - public get_tables_result(get_tables_result other) { + public partition_name_to_spec_result(partition_name_to_spec_result other) { if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); + 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; } @@ -10428,30 +26842,26 @@ } @Override - public get_tables_result clone() { - return new get_tables_result(this); + public partition_name_to_spec_result clone() { + return new partition_name_to_spec_result(this); } 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) { + public void putToSuccess(String key, String val) { if (this.success == null) { - this.success = new ArrayList(); + this.success = new HashMap(); } - this.success.add(elem); + this.success.put(key, val); } - public List getSuccess() { + public Map getSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(Map success) { this.success = success; } @@ -10487,7 +26897,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Map)value); } break; @@ -10533,12 +26943,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 partition_name_to_spec_result) + return this.equals((partition_name_to_spec_result)that); return false; } - public boolean equals(get_tables_result that) { + public boolean equals(partition_name_to_spec_result that) { if (that == null) return false; @@ -10580,17 +26990,19 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.LIST) { + if (field.type == TType.MAP) { { - TList _list79 = iprot.readListBegin(); - this.success = new ArrayList(_list79.size); - for (int _i80 = 0; _i80 < _list79.size; ++_i80) + TMap _map198 = iprot.readMapBegin(); + this.success = new HashMap(2*_map198.size); + for (int _i199 = 0; _i199 < _map198.size; ++_i199) { - String _elem81; - _elem81 = iprot.readString(); - this.success.add(_elem81); + String _key200; + String _val201; + _key200 = iprot.readString(); + _val201 = iprot.readString(); + this.success.put(_key200, _val201); } - iprot.readListEnd(); + iprot.readMapEnd(); } } else { TProtocolUtil.skip(iprot, field.type); @@ -10621,11 +27033,12 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter82 : this.success) { - oprot.writeString(_iter82); + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size())); + for (Map.Entry _iter202 : this.success.entrySet()) { + oprot.writeString(_iter202.getKey()); + oprot.writeString(_iter202.getValue()); } - oprot.writeListEnd(); + oprot.writeMapEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { @@ -10639,7 +27052,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_tables_result("); + StringBuilder sb = new StringBuilder("partition_name_to_spec_result("); boolean first = true; sb.append("success:"); @@ -10668,74 +27081,109 @@ } - public static class get_all_tables_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_all_tables_args"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + 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 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; - public static final int DB_NAME = 1; + private Index new_index; + public static final int NEW_INDEX = 1; + private Table index_table; + public static final int INDEX_TABLE = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + put(NEW_INDEX, new FieldMetaData("new_index", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Index.class))); + put(INDEX_TABLE, new FieldMetaData("index_table", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); }}); static { - FieldMetaData.addStructMetaDataMap(get_all_tables_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); } - public get_all_tables_args() { + public add_index_args() { + } + + public add_index_args( + Index new_index, + Table index_table) + { + this(); + this.new_index = new_index; + this.index_table = index_table; + } + + /** + * 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); + } + if (other.isSetIndex_table()) { + this.index_table = new Table(other.index_table); + } + } + + @Override + public add_index_args clone() { + return new add_index_args(this); + } + + public Index getNew_index() { + return this.new_index; } - public get_all_tables_args( - String db_name) - { - this(); - this.db_name = db_name; + public void setNew_index(Index new_index) { + this.new_index = new_index; } - /** - * Performs a deep copy on other. - */ - public get_all_tables_args(get_all_tables_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } + public void unsetNew_index() { + this.new_index = null; } - @Override - public get_all_tables_args clone() { - return new get_all_tables_args(this); + // 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 String getDb_name() { - return this.db_name; + public Table getIndex_table() { + return this.index_table; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setIndex_table(Table index_table) { + this.index_table = index_table; } - public void unsetDb_name() { - this.db_name = null; + public void unsetIndex_table() { + this.index_table = 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 index_table is set (has been asigned a value) and false otherwise + public boolean isSetIndex_table() { + return this.index_table != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DB_NAME: + case NEW_INDEX: if (value == null) { - unsetDb_name(); + unsetNew_index(); } else { - setDb_name((String)value); + setNew_index((Index)value); + } + break; + + case INDEX_TABLE: + if (value == null) { + unsetIndex_table(); + } else { + setIndex_table((Table)value); } break; @@ -10746,8 +27194,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); + case NEW_INDEX: + return getNew_index(); + + case INDEX_TABLE: + return getIndex_table(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -10757,8 +27208,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case DB_NAME: - return isSetDb_name(); + case NEW_INDEX: + return isSetNew_index(); + case INDEX_TABLE: + return isSetIndex_table(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -10768,21 +27221,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_all_tables_args) - return this.equals((get_all_tables_args)that); + if (that instanceof add_index_args) + return this.equals((add_index_args)that); return false; } - public boolean equals(get_all_tables_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)) + 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.db_name.equals(that.db_name)) + if (!this.new_index.equals(that.new_index)) + 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)) + return false; + if (!this.index_table.equals(that.index_table)) return false; } @@ -10805,9 +27267,18 @@ } switch (field.id) { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + case 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 INDEX_TABLE: + if (field.type == TType.STRUCT) { + this.index_table = new Table(); + this.index_table.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -10827,9 +27298,14 @@ 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.index_table != null) { + oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); + this.index_table.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -10838,14 +27314,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_tables_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("index_table:"); + if (this.index_table == null) { + sb.append("null"); + } else { + sb.append(this.index_table); } first = false; sb.append(")"); @@ -10859,15 +27343,21 @@ } - 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); + 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.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 Index success; public static final int SUCCESS = 0; - private MetaException o1; + private InvalidObjectException o1; public static final int O1 = 1; + private AlreadyExistsException o2; + public static final int O2 = 2; + private MetaException o3; + public static final int O3 = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -10875,69 +27365,63 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); + new StructMetaData(TType.STRUCT, Index.class))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); } - public get_all_tables_result() { + public add_index_result() { } - public get_all_tables_result( - List success, - MetaException o1) + 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_all_tables_result(get_all_tables_result other) { + public add_index_result(add_index_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); + this.o1 = new InvalidObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); } } @Override - public get_all_tables_result clone() { - return new get_all_tables_result(this); - } - - 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 add_index_result clone() { + return new add_index_result(this); } - public List getSuccess() { + public Index getSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(Index success) { this.success = success; } @@ -10950,11 +27434,11 @@ return 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; } @@ -10967,13 +27451,47 @@ return 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 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Index)value); } break; @@ -10981,7 +27499,23 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((InvalidObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); } break; @@ -10998,6 +27532,12 @@ case O1: return getO1(); + case O2: + return getO2(); + + case O3: + return getO3(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -11010,6 +27550,10 @@ return isSetSuccess(); case O1: return isSetO1(); + case O2: + return isSetO2(); + case O3: + return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -11019,12 +27563,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 add_index_result) + return this.equals((add_index_result)that); return false; } - public boolean equals(get_all_tables_result that) { + public boolean equals(add_index_result that) { if (that == null) return false; @@ -11046,6 +27590,24 @@ 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; } @@ -11066,30 +27628,37 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list83 = iprot.readListBegin(); - this.success = new ArrayList(_list83.size); - for (int _i84 = 0; _i84 < _list83.size; ++_i84) - { - String _elem85; - _elem85 = iprot.readString(); - this.success.add(_elem85); - } - iprot.readListEnd(); - } + if (field.type == TType.STRUCT) { + this.success = new Index(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case O1: if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); + this.o1 = new InvalidObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; + case O2: + if (field.type == TType.STRUCT) { + this.o2 = new AlreadyExistsException(); + this.o2.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 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); break; @@ -11106,18 +27675,20 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter86 : this.success) { - oprot.writeString(_iter86); - } - 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(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -11125,7 +27696,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_tables_result("); + StringBuilder sb = new StringBuilder("add_index_result("); boolean first = true; sb.append("success:"); @@ -11143,6 +27714,22 @@ 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(); } @@ -11154,15 +27741,21 @@ } - 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 alter_index_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("alter_index_args"); private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField 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 dbname; public static final int DBNAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; + private String base_tbl_name; + public static final int BASE_TBL_NAME = 2; + private String idx_name; + public static final int IDX_NAME = 3; + private Index new_idx; + public static final int NEW_IDX = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -11171,41 +27764,55 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(BASE_TBL_NAME, new FieldMetaData("base_tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(IDX_NAME, new FieldMetaData("idx_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + put(NEW_IDX, new FieldMetaData("new_idx", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Index.class))); }}); static { - FieldMetaData.addStructMetaDataMap(get_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_index_args.class, metaDataMap); } - public get_table_args() { + public alter_index_args() { } - public get_table_args( + public alter_index_args( String dbname, - String tbl_name) + String base_tbl_name, + String idx_name, + Index new_idx) { this(); this.dbname = dbname; - this.tbl_name = tbl_name; + this.base_tbl_name = base_tbl_name; + this.idx_name = idx_name; + this.new_idx = new_idx; } /** * Performs a deep copy on other. */ - public get_table_args(get_table_args other) { + 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; + } + if (other.isSetIdx_name()) { + this.idx_name = other.idx_name; + } + if (other.isSetNew_idx()) { + this.new_idx = new Index(other.new_idx); } } @Override - public get_table_args clone() { - return new get_table_args(this); + public alter_index_args clone() { + return new alter_index_args(this); } public String getDbname() { @@ -11225,21 +27832,55 @@ return this.dbname != null; } - public String getTbl_name() { - return this.tbl_name; + public String getBase_tbl_name() { + return this.base_tbl_name; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setBase_tbl_name(String base_tbl_name) { + this.base_tbl_name = base_tbl_name; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetBase_tbl_name() { + this.base_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; + // 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 String getIdx_name() { + return this.idx_name; + } + + public void setIdx_name(String idx_name) { + this.idx_name = idx_name; + } + + public void unsetIdx_name() { + this.idx_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 Index getNew_idx() { + return this.new_idx; + } + + public void setNew_idx(Index new_idx) { + this.new_idx = new_idx; + } + + public void unsetNew_idx() { + this.new_idx = null; + } + + // Returns true if field new_idx is set (has been asigned a value) and false otherwise + public boolean isSetNew_idx() { + return this.new_idx != null; } public void setFieldValue(int fieldID, Object value) { @@ -11252,11 +27893,27 @@ } 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 IDX_NAME: + if (value == null) { + unsetIdx_name(); + } else { + setIdx_name((String)value); + } + break; + + case NEW_IDX: + if (value == null) { + unsetNew_idx(); + } else { + setNew_idx((Index)value); } break; @@ -11270,8 +27927,14 @@ case DBNAME: return getDbname(); - case TBL_NAME: - return getTbl_name(); + case BASE_TBL_NAME: + return getBase_tbl_name(); + + case IDX_NAME: + return getIdx_name(); + + case NEW_IDX: + return getNew_idx(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -11283,8 +27946,12 @@ switch (fieldID) { case DBNAME: return isSetDbname(); - case TBL_NAME: - return isSetTbl_name(); + case BASE_TBL_NAME: + return isSetBase_tbl_name(); + case IDX_NAME: + return isSetIdx_name(); + case NEW_IDX: + return isSetNew_idx(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -11294,12 +27961,12 @@ 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 alter_index_args) + return this.equals((alter_index_args)that); return false; } - public boolean equals(get_table_args that) { + public boolean equals(alter_index_args that) { if (that == null) return false; @@ -11308,16 +27975,34 @@ if (this_present_dbname || that_present_dbname) { if (!(this_present_dbname && that_present_dbname)) return false; - if (!this.dbname.equals(that.dbname)) + 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)) + return false; + if (!this.idx_name.equals(that.idx_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_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.tbl_name.equals(that.tbl_name)) + if (!this.new_idx.equals(that.new_idx)) return false; } @@ -11347,9 +28032,24 @@ TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 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 IDX_NAME: + if (field.type == TType.STRING) { + this.idx_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case NEW_IDX: + if (field.type == TType.STRUCT) { + this.new_idx = new Index(); + this.new_idx.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -11374,9 +28074,19 @@ 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(); + } + 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(); @@ -11385,7 +28095,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_table_args("); + StringBuilder sb = new StringBuilder("alter_index_args("); boolean first = true; sb.append("dbname:"); @@ -11396,11 +28106,27 @@ } 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("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(")"); @@ -11414,17 +28140,14 @@ } - public static class get_table_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_table_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + 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 O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private Table success; - public static final int SUCCESS = 0; - private MetaException o1; + private InvalidOperationException o1; public static final int O1 = 1; - private NoSuchObjectException o2; + private MetaException o2; public static final int O2 = 2; private final Isset __isset = new Isset(); @@ -11432,8 +28155,6 @@ } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, @@ -11441,19 +28162,17 @@ }}); static { - FieldMetaData.addStructMetaDataMap(get_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_index_result.class, metaDataMap); } - public get_table_result() { + public alter_index_result() { } - public get_table_result( - Table success, - MetaException o1, - NoSuchObjectException o2) + public alter_index_result( + InvalidOperationException o1, + MetaException o2) { this(); - this.success = success; this.o1 = o1; this.o2 = o2; } @@ -11461,45 +28180,25 @@ /** * Performs a deep copy on other. */ - public get_table_result(get_table_result other) { - if (other.isSetSuccess()) { - this.success = new Table(other.success); - } + public alter_index_result(alter_index_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); } } @Override - public get_table_result clone() { - return new get_table_result(this); - } - - public Table getSuccess() { - return this.success; - } - - public void setSuccess(Table success) { - this.success = success; - } - - public void unsetSuccess() { - this.success = null; - } - - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; + public alter_index_result clone() { + return new alter_index_result(this); } - public MetaException getO1() { + public InvalidOperationException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(InvalidOperationException o1) { this.o1 = o1; } @@ -11512,11 +28211,11 @@ return 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; } @@ -11531,19 +28230,11 @@ public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((Table)value); - } - break; - case O1: if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((InvalidOperationException)value); } break; @@ -11551,7 +28242,7 @@ if (value == null) { unsetO2(); } else { - setO2((NoSuchObjectException)value); + setO2((MetaException)value); } break; @@ -11562,9 +28253,6 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case SUCCESS: - return getSuccess(); - case O1: return getO1(); @@ -11579,8 +28267,6 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case SUCCESS: - return isSetSuccess(); case O1: return isSetO1(); case O2: @@ -11594,24 +28280,15 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_table_result) - return this.equals((get_table_result)that); + if (that instanceof alter_index_result) + return this.equals((alter_index_result)that); return false; } - public boolean equals(get_table_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)) - 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) { @@ -11649,17 +28326,9 @@ } switch (field.id) { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Table(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; case O1: if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); + this.o1 = new InvalidOperationException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -11667,7 +28336,7 @@ break; case O2: if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); + this.o2 = new MetaException(); this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -11687,11 +28356,7 @@ 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(); @@ -11706,17 +28371,9 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_table_result("); + StringBuilder sb = new StringBuilder("alter_index_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"); @@ -11743,85 +28400,96 @@ } - 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); + 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 NEW_TBL_FIELD_DESC = new TField("new_tbl", TType.STRUCT, (short)3); + 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 dbname; - public static final int DBNAME = 1; + private String db_name; + public static final int DB_NAME = 1; private String tbl_name; public static final int TBL_NAME = 2; - private Table new_tbl; - public static final int NEW_TBL = 3; + private String index_name; + public static final int INDEX_NAME = 3; + private boolean deleteData; + public static final int DELETEDATA = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean deleteData = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(NEW_TBL, new FieldMetaData("new_tbl", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); + put(INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); }}); static { - FieldMetaData.addStructMetaDataMap(alter_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_index_by_name_args.class, metaDataMap); } - public alter_table_args() { + public drop_index_by_name_args() { } - public alter_table_args( - String dbname, + public drop_index_by_name_args( + String db_name, String tbl_name, - Table new_tbl) + String index_name, + boolean deleteData) { this(); - this.dbname = dbname; + this.db_name = db_name; this.tbl_name = tbl_name; - this.new_tbl = new_tbl; + this.index_name = index_name; + this.deleteData = deleteData; + this.__isset.deleteData = true; } /** * Performs a deep copy on other. */ - public alter_table_args(alter_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; + public drop_index_by_name_args(drop_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.isSetNew_tbl()) { - this.new_tbl = new Table(other.new_tbl); + if (other.isSetIndex_name()) { + this.index_name = other.index_name; } + __isset.deleteData = other.__isset.deleteData; + this.deleteData = other.deleteData; } @Override - public alter_table_args clone() { - return new alter_table_args(this); + public drop_index_by_name_args clone() { + return new drop_index_by_name_args(this); } - 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 String getTbl_name() { @@ -11841,30 +28509,48 @@ return this.tbl_name != null; } - public Table getNew_tbl() { - return this.new_tbl; + public String getIndex_name() { + return this.index_name; } - public void setNew_tbl(Table new_tbl) { - this.new_tbl = new_tbl; + public void setIndex_name(String index_name) { + this.index_name = index_name; } - public void unsetNew_tbl() { - this.new_tbl = null; + public void unsetIndex_name() { + this.index_name = null; } - // Returns true if field new_tbl is set (has been asigned a value) and false otherwise - public boolean isSetNew_tbl() { - return this.new_tbl != null; + // Returns true if field index_name is set (has been asigned a value) and false otherwise + public boolean isSetIndex_name() { + return this.index_name != null; + } + + public boolean isDeleteData() { + return this.deleteData; + } + + public void setDeleteData(boolean deleteData) { + this.deleteData = deleteData; + this.__isset.deleteData = true; + } + + public void unsetDeleteData() { + this.__isset.deleteData = false; + } + + // Returns true if field deleteData is set (has been asigned a value) and false otherwise + public boolean isSetDeleteData() { + return this.__isset.deleteData; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DBNAME: + case DB_NAME: if (value == null) { - unsetDbname(); + unsetDb_name(); } else { - setDbname((String)value); + setDb_name((String)value); } break; @@ -11876,11 +28562,19 @@ } break; - case NEW_TBL: + case INDEX_NAME: if (value == null) { - unsetNew_tbl(); + unsetIndex_name(); } else { - setNew_tbl((Table)value); + setIndex_name((String)value); + } + break; + + case DELETEDATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); } break; @@ -11891,14 +28585,17 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DBNAME: - return getDbname(); + case DB_NAME: + return getDb_name(); case TBL_NAME: return getTbl_name(); - case NEW_TBL: - return getNew_tbl(); + case INDEX_NAME: + return getIndex_name(); + + case DELETEDATA: + return new Boolean(isDeleteData()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -11908,12 +28605,14 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case DBNAME: - return isSetDbname(); + case DB_NAME: + return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case NEW_TBL: - return isSetNew_tbl(); + case INDEX_NAME: + return isSetIndex_name(); + case DELETEDATA: + return isSetDeleteData(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -11923,21 +28622,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 drop_index_by_name_args) + return this.equals((drop_index_by_name_args)that); return false; } - public boolean equals(alter_table_args that) { + public boolean equals(drop_index_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; } @@ -11950,12 +28649,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_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.new_tbl.equals(that.new_tbl)) + if (!this.index_name.equals(that.index_name)) + return false; + } + + boolean this_present_deleteData = true; + boolean that_present_deleteData = true; + if (this_present_deleteData || that_present_deleteData) { + if (!(this_present_deleteData && that_present_deleteData)) + return false; + if (this.deleteData != that.deleteData) return false; } @@ -11978,9 +28686,9 @@ } switch (field.id) { - case DBNAME: + case DB_NAME: if (field.type == TType.STRING) { - this.dbname = iprot.readString(); + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -11992,10 +28700,17 @@ TProtocolUtil.skip(iprot, field.type); } break; - case NEW_TBL: - if (field.type == TType.STRUCT) { - this.new_tbl = new Table(); - this.new_tbl.read(iprot); + case INDEX_NAME: + if (field.type == TType.STRING) { + this.index_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DELETEDATA: + if (field.type == TType.BOOL) { + this.deleteData = iprot.readBool(); + this.__isset.deleteData = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -12015,9 +28730,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) { @@ -12025,25 +28740,28 @@ 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.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(this.index_name); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_table_args("); + StringBuilder sb = new StringBuilder("drop_index_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(", "); @@ -12055,13 +28773,17 @@ } first = false; if (!first) sb.append(", "); - sb.append("new_tbl:"); - if (this.new_tbl == null) { + sb.append("index_name:"); + if (this.index_name == null) { sb.append("null"); } else { - sb.append(this.new_tbl); + sb.append(this.index_name); } first = false; + if (!first) sb.append(", "); + sb.append("deleteData:"); + sb.append(this.deleteData); + first = false; sb.append(")"); return sb.toString(); } @@ -12073,21 +28795,27 @@ } - public static class alter_table_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_table_result"); + public static class drop_index_by_name_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.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 InvalidOperationException o1; + private boolean success; + public static final int SUCCESS = 0; + private NoSuchObjectException o1; public static final int O1 = 1; private MetaException o2; public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, @@ -12095,17 +28823,20 @@ }}); static { - FieldMetaData.addStructMetaDataMap(alter_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_index_by_name_result.class, metaDataMap); } - public alter_table_result() { + public drop_index_by_name_result() { } - public alter_table_result( - InvalidOperationException o1, + public drop_index_by_name_result( + boolean success, + NoSuchObjectException o1, MetaException o2) { this(); + this.success = success; + this.__isset.success = true; this.o1 = o1; this.o2 = o2; } @@ -12113,9 +28844,11 @@ /** * Performs a deep copy on other. */ - public alter_table_result(alter_table_result other) { + public drop_index_by_name_result(drop_index_by_name_result other) { + __isset.success = other.__isset.success; + this.success = other.success; if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); + this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { this.o2 = new MetaException(other.o2); @@ -12123,15 +28856,33 @@ } @Override - public alter_table_result clone() { - return new alter_table_result(this); + public drop_index_by_name_result clone() { + return new drop_index_by_name_result(this); } - public InvalidOperationException getO1() { + public boolean isSuccess() { + return this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + this.__isset.success = true; + } + + public void unsetSuccess() { + this.__isset.success = false; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; + } + + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(InvalidOperationException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -12163,11 +28914,19 @@ public void setFieldValue(int fieldID, Object value) { switch (fieldID) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + case O1: if (value == null) { unsetO1(); } else { - setO1((InvalidOperationException)value); + setO1((NoSuchObjectException)value); } break; @@ -12186,6 +28945,9 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { + case SUCCESS: + return new Boolean(isSuccess()); + case O1: return getO1(); @@ -12200,6 +28962,8 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { + case SUCCESS: + return isSetSuccess(); case O1: return isSetO1(); case O2: @@ -12213,15 +28977,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 drop_index_by_name_result) + return this.equals((drop_index_by_name_result)that); return false; } - public boolean equals(alter_table_result that) { + public boolean equals(drop_index_by_name_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) { @@ -12259,9 +29032,17 @@ } switch (field.id) { + case SUCCESS: + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; case O1: if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); + this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -12289,7 +29070,11 @@ public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); - if (this.isSetO1()) { + 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(); @@ -12304,9 +29089,13 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_table_result("); + StringBuilder sb = new StringBuilder("drop_index_by_name_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"); @@ -12333,74 +29122,144 @@ } - public static class add_partition_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("add_partition_args"); - private static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)1); + 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 INDEX_NAME_FIELD_DESC = new TField("index_name", TType.STRING, (short)3); - private Partition new_part; - public static final int NEW_PART = 1; + private String db_name; + public static final int DB_NAME = 1; + private String tbl_name; + public static final int TBL_NAME = 2; + private String index_name; + public static final int INDEX_NAME = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(add_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); } - public add_partition_args() { + public get_index_by_name_args() { } - public add_partition_args( - Partition new_part) + public get_index_by_name_args( + String db_name, + String tbl_name, + String index_name) { this(); - this.new_part = new_part; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; } /** * 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 get_index_by_name_args(get_index_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetIndex_name()) { + this.index_name = other.index_name; } } @Override - public add_partition_args clone() { - return new add_partition_args(this); + public get_index_by_name_args clone() { + return new get_index_by_name_args(this); } - public Partition getNew_part() { - return this.new_part; + public String getDb_name() { + return this.db_name; } - public void setNew_part(Partition new_part) { - this.new_part = new_part; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetNew_part() { - this.new_part = null; + public void unsetDb_name() { + this.db_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; + // 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 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 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; + } + + // 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - 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 INDEX_NAME: + if (value == null) { + unsetIndex_name(); + } else { + setIndex_name((String)value); } break; @@ -12411,8 +29270,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case NEW_PART: - return getNew_part(); + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case INDEX_NAME: + return getIndex_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -12422,8 +29287,12 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case NEW_PART: - return isSetNew_part(); + case DB_NAME: + return isSetDb_name(); + case TBL_NAME: + return isSetTbl_name(); + case INDEX_NAME: + return isSetIndex_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -12433,21 +29302,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof add_partition_args) - return this.equals((add_partition_args)that); + if (that instanceof get_index_by_name_args) + return this.equals((get_index_by_name_args)that); return false; } - public boolean equals(add_partition_args that) { + public boolean equals(get_index_by_name_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; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_index_name = true && this.isSetIndex_name(); + boolean that_present_index_name = true && that.isSetIndex_name(); + if (this_present_index_name || that_present_index_name) { + if (!(this_present_index_name && that_present_index_name)) + return false; + if (!this.index_name.equals(that.index_name)) return false; } @@ -12470,10 +29357,23 @@ } switch (field.id) { - case NEW_PART: - if (field.type == TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TBL_NAME: + if (field.type == TType.STRING) { + this.tbl_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case INDEX_NAME: + if (field.type == TType.STRING) { + this.index_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -12493,9 +29393,19 @@ 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.index_name != null) { + oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); + oprot.writeString(this.index_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -12504,14 +29414,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_partition_args("); + StringBuilder sb = new StringBuilder("get_index_by_name_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("index_name:"); + if (this.index_name == null) { + sb.append("null"); + } else { + sb.append(this.index_name); } first = false; sb.append(")"); @@ -12525,21 +29451,18 @@ } - public static class add_partition_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("add_partition_result"); + public static class get_index_by_name_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.STRUCT, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); - private Partition success; + private Index success; public static final int SUCCESS = 0; - private InvalidObjectException o1; + private MetaException o1; public static final int O1 = 1; - private AlreadyExistsException o2; + private NoSuchObjectException o2; public static final int O2 = 2; - private MetaException o3; - public static final int O3 = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -12547,63 +29470,56 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); + new StructMetaData(TType.STRUCT, Index.class))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(add_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); } - public add_partition_result() { + public get_index_by_name_result() { } - public add_partition_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public get_index_by_name_result( + Index 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 add_partition_result(add_partition_result other) { + public get_index_by_name_result(get_index_by_name_result other) { if (other.isSetSuccess()) { - this.success = new Partition(other.success); + this.success = new Index(other.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); } } @Override - public add_partition_result clone() { - return new add_partition_result(this); + public get_index_by_name_result clone() { + return new get_index_by_name_result(this); } - public Partition getSuccess() { + public Index getSuccess() { return this.success; } - public void setSuccess(Partition success) { + public void setSuccess(Index success) { this.success = success; } @@ -12616,11 +29532,11 @@ return this.success != null; } - public InvalidObjectException getO1() { + public MetaException getO1() { return this.o1; } - public void setO1(InvalidObjectException o1) { + public void setO1(MetaException o1) { this.o1 = o1; } @@ -12633,11 +29549,11 @@ return this.o1 != null; } - public AlreadyExistsException getO2() { + public NoSuchObjectException getO2() { return this.o2; } - public void setO2(AlreadyExistsException o2) { + public void setO2(NoSuchObjectException o2) { this.o2 = o2; } @@ -12650,30 +29566,13 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((Partition)value); + setSuccess((Index)value); } break; @@ -12681,7 +29580,7 @@ if (value == null) { unsetO1(); } else { - setO1((InvalidObjectException)value); + setO1((MetaException)value); } break; @@ -12689,15 +29588,7 @@ if (value == null) { unsetO2(); } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); + setO2((NoSuchObjectException)value); } break; @@ -12717,9 +29608,6 @@ case O2: return getO2(); - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -12734,8 +29622,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -12745,12 +29631,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_index_by_name_result) + return this.equals((get_index_by_name_result)that); return false; } - public boolean equals(add_partition_result that) { + public boolean equals(get_index_by_name_result that) { if (that == null) return false; @@ -12781,15 +29667,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; } @@ -12811,7 +29688,7 @@ { case SUCCESS: if (field.type == TType.STRUCT) { - this.success = new Partition(); + this.success = new Index(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -12819,7 +29696,7 @@ break; case O1: if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); + this.o1 = new MetaException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -12827,20 +29704,12 @@ break; case 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 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); break; @@ -12867,10 +29736,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(); @@ -12878,7 +29743,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_partition_result("); + StringBuilder sb = new StringBuilder("get_index_by_name_result("); boolean first = true; sb.append("success:"); @@ -12904,14 +29769,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(); } @@ -12923,21 +29780,22 @@ } - public static class append_partition_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("append_partition_args"); + public static class get_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 PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + private static final TField MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); private String db_name; public static final int DB_NAME = 1; private String tbl_name; public static final int TBL_NAME = 2; - private List part_vals; - public static final int PART_VALS = 3; + private short max_indexes; + public static final int MAX_INDEXES = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean max_indexes = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ @@ -12945,51 +29803,48 @@ new FieldValueMetaData(TType.STRING))); put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); + put(MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); }}); static { - FieldMetaData.addStructMetaDataMap(append_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); } - public append_partition_args() { + public get_indexes_args() { + this.max_indexes = (short)-1; + } - public append_partition_args( + public get_indexes_args( String db_name, String tbl_name, - List part_vals) + short max_indexes) { this(); this.db_name = db_name; this.tbl_name = tbl_name; - this.part_vals = part_vals; + this.max_indexes = max_indexes; + this.__isset.max_indexes = true; } /** * Performs a deep copy on other. */ - public append_partition_args(append_partition_args other) { + public get_indexes_args(get_indexes_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; - } + __isset.max_indexes = other.__isset.max_indexes; + this.max_indexes = other.max_indexes; } @Override - public append_partition_args clone() { - return new append_partition_args(this); + public get_indexes_args clone() { + return new get_indexes_args(this); } public String getDb_name() { @@ -13026,36 +29881,22 @@ return 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 short getMax_indexes() { + return this.max_indexes; } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public void setMax_indexes(short max_indexes) { + this.max_indexes = max_indexes; + this.__isset.max_indexes = true; } - public void unsetPart_vals() { - this.part_vals = null; + public void unsetMax_indexes() { + this.__isset.max_indexes = false; } - // 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 max_indexes is set (has been asigned a value) and false otherwise + public boolean isSetMax_indexes() { + return this.__isset.max_indexes; } public void setFieldValue(int fieldID, Object value) { @@ -13076,11 +29917,11 @@ } break; - case PART_VALS: + case MAX_INDEXES: if (value == null) { - unsetPart_vals(); + unsetMax_indexes(); } else { - setPart_vals((List)value); + setMax_indexes((Short)value); } break; @@ -13097,8 +29938,8 @@ case TBL_NAME: return getTbl_name(); - case PART_VALS: - return getPart_vals(); + case MAX_INDEXES: + return new Short(getMax_indexes()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -13112,8 +29953,8 @@ return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); + case MAX_INDEXES: + return isSetMax_indexes(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -13123,12 +29964,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_indexes_args) + return this.equals((get_indexes_args)that); return false; } - public boolean equals(append_partition_args that) { + public boolean equals(get_indexes_args that) { if (that == null) return false; @@ -13150,12 +29991,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)) + 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.part_vals.equals(that.part_vals)) + if (this.max_indexes != that.max_indexes) return false; } @@ -13192,19 +30033,10 @@ TProtocolUtil.skip(iprot, field.type); } break; - case PART_VALS: - if (field.type == TType.LIST) { - { - TList _list87 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list87.size); - for (int _i88 = 0; _i88 < _list87.size; ++_i88) - { - String _elem89; - _elem89 = iprot.readString(); - this.part_vals.add(_elem89); - } - iprot.readListEnd(); - } + case MAX_INDEXES: + if (field.type == TType.I16) { + this.max_indexes = iprot.readI16(); + this.__isset.max_indexes = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -13231,27 +30063,19 @@ } 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 _iter90 : this.part_vals) { - oprot.writeString(_iter90); - } - oprot.writeListEnd(); - } + oprot.writeString(this.tbl_name); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(this.max_indexes); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("append_partition_args("); + StringBuilder sb = new StringBuilder("get_indexes_args("); boolean first = true; sb.append("db_name:"); @@ -13270,12 +30094,8 @@ } first = false; if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { - sb.append("null"); - } else { - sb.append(this.part_vals); - } + sb.append("max_indexes:"); + sb.append(this.max_indexes); first = false; sb.append(")"); return sb.toString(); @@ -13288,21 +30108,18 @@ } - public static class append_partition_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("append_partition_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); + 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 static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); - private Partition success; + private List success; public static final int SUCCESS = 0; - private InvalidObjectException o1; + private NoSuchObjectException o1; public static final int O1 = 1; - private AlreadyExistsException o2; + private MetaException o2; public static final int O2 = 2; - private MetaException o3; - public static final int O3 = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -13310,63 +30127,76 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Index.class)))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(append_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); } - public append_partition_result() { + public get_indexes_result() { } - public append_partition_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public get_indexes_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 append_partition_result(append_partition_result other) { + public get_indexes_result(get_indexes_result other) { if (other.isSetSuccess()) { - this.success = new Partition(other.success); + 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 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); } } @Override - public append_partition_result clone() { - return new append_partition_result(this); + public get_indexes_result clone() { + return new get_indexes_result(this); } - 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(Index 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; } @@ -13379,11 +30209,11 @@ return this.success != null; } - public InvalidObjectException getO1() { + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(InvalidObjectException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -13396,11 +30226,11 @@ return this.o1 != null; } - public AlreadyExistsException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(AlreadyExistsException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -13413,30 +30243,13 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((Partition)value); + setSuccess((List)value); } break; @@ -13444,7 +30257,7 @@ if (value == null) { unsetO1(); } else { - setO1((InvalidObjectException)value); + setO1((NoSuchObjectException)value); } break; @@ -13452,15 +30265,7 @@ if (value == null) { unsetO2(); } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); + setO2((MetaException)value); } break; @@ -13480,9 +30285,6 @@ case O2: return getO2(); - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -13497,8 +30299,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -13508,12 +30308,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_indexes_result) + return this.equals((get_indexes_result)that); return false; } - public boolean equals(append_partition_result that) { + public boolean equals(get_indexes_result that) { if (that == null) return false; @@ -13544,15 +30344,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; } @@ -13573,16 +30364,26 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); + if (field.type == TType.LIST) { + { + TList _list203 = iprot.readListBegin(); + this.success = new ArrayList(_list203.size); + for (int _i204 = 0; _i204 < _list203.size; ++_i204) + { + Index _elem205; + _elem205 = new Index(); + _elem205.read(iprot); + this.success.add(_elem205); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; case O1: if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); + this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -13590,20 +30391,12 @@ break; case 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 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); break; @@ -13620,7 +30413,13 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Index _iter206 : this.success) { + _iter206.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -13630,10 +30429,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(); @@ -13641,7 +30436,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("append_partition_result("); + StringBuilder sb = new StringBuilder("get_indexes_result("); boolean first = true; sb.append("success:"); @@ -13667,14 +30462,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(); } @@ -13686,21 +30473,22 @@ } - public static class append_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_args"); + public static class get_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 PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + private static final TField MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); private String db_name; public static final int DB_NAME = 1; private String tbl_name; public static final int TBL_NAME = 2; - private String part_name; - public static final int PART_NAME = 3; + private short max_indexes; + public static final int MAX_INDEXES = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean max_indexes = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ @@ -13708,46 +30496,48 @@ new FieldValueMetaData(TType.STRING))); put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + put(MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); }}); static { - FieldMetaData.addStructMetaDataMap(append_partition_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); } - public append_partition_by_name_args() { + public get_index_names_args() { + this.max_indexes = (short)-1; + } - public append_partition_by_name_args( + public get_index_names_args( String db_name, String tbl_name, - String part_name) + short max_indexes) { this(); this.db_name = db_name; this.tbl_name = tbl_name; - this.part_name = part_name; + this.max_indexes = max_indexes; + this.__isset.max_indexes = true; } /** * Performs a deep copy on other. */ - public append_partition_by_name_args(append_partition_by_name_args other) { + public get_index_names_args(get_index_names_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; - } + __isset.max_indexes = other.__isset.max_indexes; + this.max_indexes = other.max_indexes; } @Override - public append_partition_by_name_args clone() { - return new append_partition_by_name_args(this); + public get_index_names_args clone() { + return new get_index_names_args(this); } public String getDb_name() { @@ -13784,21 +30574,22 @@ return this.tbl_name != null; } - public String getPart_name() { - return this.part_name; + public short getMax_indexes() { + return this.max_indexes; } - public void setPart_name(String part_name) { - this.part_name = part_name; + public void setMax_indexes(short max_indexes) { + this.max_indexes = max_indexes; + this.__isset.max_indexes = true; } - public void unsetPart_name() { - this.part_name = null; + public void unsetMax_indexes() { + this.__isset.max_indexes = false; } - // 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 max_indexes is set (has been asigned a value) and false otherwise + public boolean isSetMax_indexes() { + return this.__isset.max_indexes; } public void setFieldValue(int fieldID, Object value) { @@ -13819,11 +30610,11 @@ } break; - case PART_NAME: + case MAX_INDEXES: if (value == null) { - unsetPart_name(); + unsetMax_indexes(); } else { - setPart_name((String)value); + setMax_indexes((Short)value); } break; @@ -13840,8 +30631,8 @@ case TBL_NAME: return getTbl_name(); - case PART_NAME: - return getPart_name(); + case MAX_INDEXES: + return new Short(getMax_indexes()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -13854,9 +30645,9 @@ case DB_NAME: return isSetDb_name(); case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); + return isSetTbl_name(); + case MAX_INDEXES: + return isSetMax_indexes(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -13866,12 +30657,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_index_names_args) + return this.equals((get_index_names_args)that); return false; } - public boolean equals(append_partition_by_name_args that) { + public boolean equals(get_index_names_args that) { if (that == null) return false; @@ -13893,12 +30684,12 @@ 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_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.part_name.equals(that.part_name)) + if (this.max_indexes != that.max_indexes) return false; } @@ -13935,9 +30726,10 @@ TProtocolUtil.skip(iprot, field.type); } break; - case PART_NAME: - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + case MAX_INDEXES: + if (field.type == TType.I16) { + this.max_indexes = iprot.readI16(); + this.__isset.max_indexes = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -13967,18 +30759,16 @@ 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(MAX_INDEXES_FIELD_DESC); + oprot.writeI16(this.max_indexes); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("append_partition_by_name_args("); + StringBuilder sb = new StringBuilder("get_index_names_args("); boolean first = true; sb.append("db_name:"); @@ -13997,12 +30787,8 @@ } first = false; if (!first) sb.append(", "); - sb.append("part_name:"); - if (this.part_name == null) { - sb.append("null"); - } else { - sb.append(this.part_name); - } + sb.append("max_indexes:"); + sb.append(this.max_indexes); first = false; sb.append(")"); return sb.toString(); @@ -14015,21 +30801,15 @@ } - public static class append_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); - private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + 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 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 Partition success; + private List success; public static final int SUCCESS = 0; - private InvalidObjectException o1; - public static final int O1 = 1; - private AlreadyExistsException o2; - public static final int O2 = 2; - private MetaException o3; - public static final int O3 = 3; + private MetaException o2; + public static final int O2 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -14037,63 +30817,69 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); } - public append_partition_by_name_result() { + public get_index_names_result() { } - public append_partition_by_name_result( - Partition success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public get_index_names_result( + List success, + MetaException 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_index_names_result(get_index_names_result other) { if (other.isSetSuccess()) { - this.success = new Partition(other.success); - } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(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 AlreadyExistsException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + this.o2 = new MetaException(other.o2); } } @Override - public append_partition_by_name_result clone() { - return new append_partition_by_name_result(this); + public get_index_names_result clone() { + return new get_index_names_result(this); } - 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; } @@ -14106,28 +30892,11 @@ return 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 AlreadyExistsException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(AlreadyExistsException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -14140,38 +30909,13 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((Partition)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((InvalidObjectException)value); + setSuccess((List)value); } break; @@ -14179,15 +30923,7 @@ if (value == null) { unsetO2(); } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); + setO2((MetaException)value); } break; @@ -14201,15 +30937,9 @@ case SUCCESS: return getSuccess(); - case O1: - return getO1(); - case O2: return getO2(); - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -14220,12 +30950,8 @@ switch (fieldID) { case SUCCESS: return isSetSuccess(); - case O1: - return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -14235,12 +30961,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_index_names_result) + return this.equals((get_index_names_result)that); return false; } - public boolean equals(append_partition_by_name_result that) { + public boolean equals(get_index_names_result that) { if (that == null) return false; @@ -14253,15 +30979,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) { @@ -14271,15 +30988,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; } @@ -14300,37 +31008,30 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Partition(); - this.success.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); + if (field.type == TType.LIST) { + { + TList _list207 = iprot.readListBegin(); + this.success = new ArrayList(_list207.size); + for (int _i208 = 0; _i208 < _list207.size; ++_i208) + { + String _elem209; + _elem209 = iprot.readString(); + this.success.add(_elem209); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; case 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 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); break; @@ -14347,20 +31048,18 @@ 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 _iter210 : this.success) { + oprot.writeString(_iter210); + } + oprot.writeListEnd(); + } 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(); @@ -14368,7 +31067,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("append_partition_by_name_result("); + StringBuilder sb = new StringBuilder("get_index_names_result("); boolean first = true; sb.append("success:"); @@ -14379,14 +31078,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"); @@ -14394,14 +31085,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(); } @@ -14413,201 +31096,129 @@ } - public static class drop_partition_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_partition_args"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); - private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); + public static class get_user_privilege_set_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_user_privilege_set_args"); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)1); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)2); - private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private List part_vals; - public static final int PART_VALS = 3; - private boolean deleteData; - public static final int DELETEDATA = 4; + private String user_name; + public static final int USER_NAME = 1; + private List group_names; + public static final int GROUP_NAMES = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean deleteData = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + put(GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_user_privilege_set_args.class, metaDataMap); } - public drop_partition_args() { + public get_user_privilege_set_args() { } - public drop_partition_args( - String db_name, - String tbl_name, - List part_vals, - boolean deleteData) + public get_user_privilege_set_args( + String user_name, + List group_names) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.deleteData = deleteData; - this.__isset.deleteData = true; + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public drop_partition_args(drop_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public get_user_privilege_set_args(get_user_privilege_set_args other) { + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(); + for (String other_element : other.group_names) { + __this__group_names.add(other_element); } - this.part_vals = __this__part_vals; + this.group_names = __this__group_names; } - __isset.deleteData = other.__isset.deleteData; - this.deleteData = other.deleteData; } @Override - public drop_partition_args clone() { - return new drop_partition_args(this); - } - - 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 get_user_privilege_set_args clone() { + return new get_user_privilege_set_args(this); } - 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 int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = 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; + 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; - this.__isset.deleteData = true; + public void setGroup_names(List group_names) { + this.group_names = group_names; } - public void unsetDeleteData() { - this.__isset.deleteData = false; + 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 this.__isset.deleteData; + // 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - 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 USER_NAME: if (value == null) { - unsetPart_vals(); + unsetUser_name(); } else { - setPart_vals((List)value); + setUser_name((String)value); } break; - case DELETEDATA: + case GROUP_NAMES: if (value == null) { - unsetDeleteData(); + unsetGroup_names(); } else { - setDeleteData((Boolean)value); + setGroup_names((List)value); } break; @@ -14618,17 +31229,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - 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 DELETEDATA: - return new Boolean(isDeleteData()); + case GROUP_NAMES: + return getGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -14638,14 +31243,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case DELETEDATA: - return isSetDeleteData(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -14655,48 +31256,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_partition_args) - return this.equals((drop_partition_args)that); + if (that instanceof get_user_privilege_set_args) + return this.equals((get_user_privilege_set_args)that); return false; } - public boolean equals(drop_partition_args that) { + public boolean equals(get_user_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)) - 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_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.part_vals.equals(that.part_vals)) + 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; } @@ -14719,30 +31302,23 @@ } switch (field.id) { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: + case USER_NAME: if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PART_VALS: + case GROUP_NAMES: if (field.type == TType.LIST) { { - TList _list91 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list91.size); - for (int _i92 = 0; _i92 < _list91.size; ++_i92) + TList _list211 = iprot.readListBegin(); + this.group_names = new ArrayList(_list211.size); + for (int _i212 = 0; _i212 < _list211.size; ++_i212) { - String _elem93; - _elem93 = iprot.readString(); - this.part_vals.add(_elem93); + String _elem213; + _elem213 = iprot.readString(); + this.group_names.add(_elem213); } iprot.readListEnd(); } @@ -14750,14 +31326,6 @@ TProtocolUtil.skip(iprot, field.type); } break; - case DELETEDATA: - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; default: TProtocolUtil.skip(iprot, field.type); break; @@ -14773,66 +31341,46 @@ 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.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter94 : this.part_vals) { - oprot.writeString(_iter94); + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter214 : this.group_names) { + oprot.writeString(_iter214); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_args("); + StringBuilder sb = new StringBuilder("get_user_privilege_set_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("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("part_vals:"); - if (this.part_vals == null) { + sb.append("group_names:"); + if (this.group_names == null) { sb.append("null"); } else { - sb.append(this.part_vals); + 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(); } @@ -14844,94 +31392,82 @@ } - public static class drop_partition_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_partition_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + public static class get_user_privilege_set_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_user_privilege_set_result"); + private static final TField 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 PrincipalPrivilegeSet success; public static final int SUCCESS = 0; - private NoSuchObjectException o1; + private MetaException o1; public static final int O1 = 1; - private MetaException o2; - public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_user_privilege_set_result.class, metaDataMap); } - public drop_partition_result() { + public get_user_privilege_set_result() { } - public drop_partition_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) + public get_user_privilege_set_result( + PrincipalPrivilegeSet success, + MetaException o1) { this(); this.success = success; - this.__isset.success = true; this.o1 = o1; - this.o2 = o2; } /** * Performs a deep copy on other. */ - public drop_partition_result(drop_partition_result other) { - __isset.success = other.__isset.success; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + public get_user_privilege_set_result(get_user_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); } } @Override - public drop_partition_result clone() { - return new drop_partition_result(this); + public get_user_privilege_set_result clone() { + return new get_user_privilege_set_result(this); } - public boolean isSuccess() { + public PrincipalPrivilegeSet getSuccess() { return this.success; } - public void setSuccess(boolean success) { + public void setSuccess(PrincipalPrivilegeSet success) { this.success = success; - this.__isset.success = true; } public void unsetSuccess() { - this.__isset.success = false; + this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { - return this.__isset.success; + return 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; } @@ -14944,30 +31480,13 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((Boolean)value); + setSuccess((PrincipalPrivilegeSet)value); } break; @@ -14975,15 +31494,7 @@ if (value == null) { unsetO1(); } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -14995,14 +31506,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return new Boolean(isSuccess()); + return getSuccess(); case O1: return getO1(); - case O2: - return getO2(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -15015,8 +31523,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -15026,21 +31532,21 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_partition_result) - return this.equals((drop_partition_result)that); + if (that instanceof get_user_privilege_set_result) + return this.equals((get_user_privilege_set_result)that); return false; } - public boolean equals(drop_partition_result that) { + public boolean equals(get_user_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; } @@ -15053,15 +31559,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; } @@ -15082,29 +31579,21 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - this.__isset.success = true; + if (field.type == TType.STRUCT) { + this.success = new PrincipalPrivilegeSet(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case 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 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); break; @@ -15121,16 +31610,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(); @@ -15138,26 +31623,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_result("); + StringBuilder sb = new StringBuilder("get_user_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(")"); @@ -15171,79 +31652,73 @@ } - 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_db_privilege_set_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_db_privilege_set_args"); private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); - private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); - - private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private String part_name; - public static final int PART_NAME = 3; - private boolean deleteData; - public static final int DELETEDATA = 4; + 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; + public static final int DB_NAME = 1; + private String user_name; + public static final int USER_NAME = 2; + private List group_names; + public static final int GROUP_NAMES = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean deleteData = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + put(GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_partition_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_db_privilege_set_args.class, metaDataMap); } - public drop_partition_by_name_args() { + public get_db_privilege_set_args() { } - public drop_partition_by_name_args( + public get_db_privilege_set_args( String db_name, - String tbl_name, - String part_name, - boolean deleteData) + String user_name, + List group_names) { this(); this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_name = part_name; - this.deleteData = deleteData; - this.__isset.deleteData = true; + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public drop_partition_by_name_args(drop_partition_by_name_args other) { + public get_db_privilege_set_args(get_db_privilege_set_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - if (other.isSetPart_name()) { - this.part_name = other.part_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; } - __isset.deleteData = other.__isset.deleteData; - this.deleteData = other.deleteData; } @Override - public drop_partition_by_name_args clone() { - return new drop_partition_by_name_args(this); + public get_db_privilege_set_args clone() { + return new get_db_privilege_set_args(this); } public String getDb_name() { @@ -15263,56 +31738,53 @@ return 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 String getUser_name() { + return this.user_name; } - public void unsetTbl_name() { - this.tbl_name = null; + public void setUser_name(String user_name) { + this.user_name = user_name; } - // 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 unsetUser_name() { + this.user_name = null; } - public String getPart_name() { - return this.part_name; + // 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 setPart_name(String part_name) { - this.part_name = part_name; + public int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - public void unsetPart_name() { - this.part_name = null; + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - // 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 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; - this.__isset.deleteData = true; + public void setGroup_names(List group_names) { + this.group_names = group_names; } - public void unsetDeleteData() { - this.__isset.deleteData = false; + 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 this.__isset.deleteData; + // 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 setFieldValue(int fieldID, Object value) { @@ -15325,27 +31797,19 @@ } break; - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case PART_NAME: + case USER_NAME: if (value == null) { - unsetPart_name(); + unsetUser_name(); } else { - setPart_name((String)value); + setUser_name((String)value); } break; - case DELETEDATA: + case GROUP_NAMES: if (value == null) { - unsetDeleteData(); + unsetGroup_names(); } else { - setDeleteData((Boolean)value); + setGroup_names((List)value); } break; @@ -15359,14 +31823,11 @@ case DB_NAME: return getDb_name(); - case TBL_NAME: - return getTbl_name(); - - case PART_NAME: - return getPart_name(); + case USER_NAME: + return getUser_name(); - case DELETEDATA: - return new Boolean(isDeleteData()); + case GROUP_NAMES: + return getGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -15378,12 +31839,10 @@ switch (fieldID) { case DB_NAME: return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); - case DELETEDATA: - return isSetDeleteData(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -15393,12 +31852,12 @@ 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_db_privilege_set_args) + return this.equals((get_db_privilege_set_args)that); return false; } - public boolean equals(drop_partition_by_name_args that) { + public boolean equals(get_db_privilege_set_args that) { if (that == null) return false; @@ -15411,30 +31870,21 @@ 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_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.part_name.equals(that.part_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; } @@ -15464,24 +31914,26 @@ TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PART_NAME: + case USER_NAME: if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DELETEDATA: - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; + case GROUP_NAMES: + if (field.type == TType.LIST) { + { + TList _list215 = iprot.readListBegin(); + this.group_names = new ArrayList(_list215.size); + for (int _i216 = 0; _i216 < _list215.size; ++_i216) + { + String _elem217; + _elem217 = iprot.readString(); + this.group_names.add(_elem217); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -15506,26 +31958,29 @@ 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.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); } - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter218 : this.group_names) { + oprot.writeString(_iter218); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_by_name_args("); + StringBuilder sb = new StringBuilder("get_db_privilege_set_args("); boolean first = true; sb.append("db_name:"); @@ -15536,25 +31991,21 @@ } 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("part_name:"); - if (this.part_name == null) { + sb.append("group_names:"); + if (this.group_names == null) { sb.append("null"); } else { - sb.append(this.part_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(); } @@ -15566,94 +32017,82 @@ } - 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.BOOL, (short)0); + public static class get_db_privilege_set_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_db_privilege_set_result"); + private 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 PrincipalPrivilegeSet success; public static final int SUCCESS = 0; - private NoSuchObjectException o1; + private MetaException o1; public static final int O1 = 1; - private MetaException o2; - public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_partition_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_db_privilege_set_result.class, metaDataMap); } - public drop_partition_by_name_result() { + public get_db_privilege_set_result() { } - public drop_partition_by_name_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) + public get_db_privilege_set_result( + PrincipalPrivilegeSet success, + MetaException o1) { this(); this.success = success; - this.__isset.success = 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.success = other.__isset.success; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + public get_db_privilege_set_result(get_db_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); } } @Override - public drop_partition_by_name_result clone() { - return new drop_partition_by_name_result(this); + public get_db_privilege_set_result clone() { + return new get_db_privilege_set_result(this); } - public boolean isSuccess() { + public PrincipalPrivilegeSet getSuccess() { return this.success; } - public void setSuccess(boolean success) { + public void setSuccess(PrincipalPrivilegeSet success) { this.success = success; - this.__isset.success = true; } public void unsetSuccess() { - this.__isset.success = false; + this.success = null; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { - return this.__isset.success; + return 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; } @@ -15666,30 +32105,13 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((Boolean)value); + setSuccess((PrincipalPrivilegeSet)value); } break; @@ -15697,15 +32119,7 @@ if (value == null) { unsetO1(); } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -15717,14 +32131,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return new Boolean(isSuccess()); + return getSuccess(); case O1: return getO1(); - case O2: - return getO2(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -15737,8 +32148,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -15748,21 +32157,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_db_privilege_set_result) + return this.equals((get_db_privilege_set_result)that); return false; } - public boolean equals(drop_partition_by_name_result that) { + public boolean equals(get_db_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; } @@ -15775,15 +32184,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; } @@ -15804,29 +32204,21 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - this.__isset.success = true; + if (field.type == TType.STRUCT) { + this.success = new PrincipalPrivilegeSet(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case 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 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); break; @@ -15843,16 +32235,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(); @@ -15860,26 +32248,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_partition_by_name_result("); + StringBuilder sb = new StringBuilder("get_db_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(")"); @@ -15893,18 +32277,21 @@ } - 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 get_table_privilege_set_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_privilege_set_args"); private static final TField 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 TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)3); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)4); private String db_name; public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private List part_vals; - public static final int PART_VALS = 3; + private String table_name; + public static final int TABLE_NAME = 2; + private String user_name; + public static final int USER_NAME = 3; + private List group_names; + public static final int GROUP_NAMES = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -15913,53 +32300,60 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_table_privilege_set_args.class, metaDataMap); } - public get_partition_args() { + public get_table_privilege_set_args() { } - public get_partition_args( + public get_table_privilege_set_args( String db_name, - String tbl_name, - List part_vals) + String table_name, + String user_name, + List group_names) { this(); this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; + this.table_name = table_name; + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public get_partition_args(get_partition_args other) { + public get_table_privilege_set_args(get_table_privilege_set_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetTable_name()) { + this.table_name = other.table_name; } - if (other.isSetPart_vals()) { - List __this__part_vals = new ArrayList(); - for (String other_element : other.part_vals) { - __this__part_vals.add(other_element); + 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.part_vals = __this__part_vals; + this.group_names = __this__group_names; } } @Override - public get_partition_args clone() { - return new get_partition_args(this); + public get_table_privilege_set_args clone() { + return new get_table_privilege_set_args(this); } public String getDb_name() { @@ -15979,53 +32373,70 @@ return this.db_name != null; } - public String getTbl_name() { - return this.tbl_name; + public String getTable_name() { + return this.table_name; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setTable_name(String table_name) { + this.table_name = table_name; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetTable_name() { + 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; + // 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 int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); + public String getUser_name() { + return this.user_name; } - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); + 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 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.part_vals.add(elem); + this.group_names.add(elem); } - public List getPart_vals() { - return this.part_vals; + public List getGroup_names() { + return this.group_names; } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public void setGroup_names(List group_names) { + this.group_names = group_names; } - public void unsetPart_vals() { - this.part_vals = null; + public void unsetGroup_names() { + this.group_names = 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 group_names is set (has been asigned a value) and false otherwise + public boolean isSetGroup_names() { + return this.group_names != null; } public void setFieldValue(int fieldID, Object value) { @@ -16038,19 +32449,27 @@ } break; - case TBL_NAME: + case TABLE_NAME: if (value == null) { - unsetTbl_name(); + unsetTable_name(); } else { - setTbl_name((String)value); + setTable_name((String)value); } break; - case PART_VALS: + case USER_NAME: if (value == null) { - unsetPart_vals(); + unsetUser_name(); } else { - setPart_vals((List)value); + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); } break; @@ -16064,11 +32483,14 @@ case DB_NAME: return getDb_name(); - case TBL_NAME: - return getTbl_name(); + case TABLE_NAME: + return getTable_name(); - case PART_VALS: - return getPart_vals(); + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -16080,10 +32502,12 @@ switch (fieldID) { case DB_NAME: return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); + case TABLE_NAME: + return isSetTable_name(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -16093,12 +32517,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_args) - return this.equals((get_partition_args)that); + if (that instanceof get_table_privilege_set_args) + return this.equals((get_table_privilege_set_args)that); return false; } - public boolean equals(get_partition_args that) { + public boolean equals(get_table_privilege_set_args that) { if (that == null) return false; @@ -16111,21 +32535,30 @@ 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_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.tbl_name.equals(that.tbl_name)) + if (!this.table_name.equals(that.table_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_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.part_vals.equals(that.part_vals)) + 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; } @@ -16155,23 +32588,30 @@ TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case TABLE_NAME: if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + this.table_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PART_VALS: + case USER_NAME: + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GROUP_NAMES: if (field.type == TType.LIST) { { - TList _list95 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list95.size); - for (int _i96 = 0; _i96 < _list95.size; ++_i96) + TList _list219 = iprot.readListBegin(); + this.group_names = new ArrayList(_list219.size); + for (int _i220 = 0; _i220 < _list219.size; ++_i220) { - String _elem97; - _elem97 = iprot.readString(); - this.part_vals.add(_elem97); + String _elem221; + _elem221 = iprot.readString(); + this.group_names.add(_elem221); } iprot.readListEnd(); } @@ -16199,17 +32639,22 @@ 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.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); oprot.writeFieldEnd(); } - if (this.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + 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.part_vals.size())); - for (String _iter98 : this.part_vals) { - oprot.writeString(_iter98); + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter222 : this.group_names) { + oprot.writeString(_iter222); } oprot.writeListEnd(); } @@ -16221,7 +32666,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_args("); + StringBuilder sb = new StringBuilder("get_table_privilege_set_args("); boolean first = true; sb.append("db_name:"); @@ -16232,19 +32677,27 @@ } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("table_name:"); + if (this.table_name == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.table_name); } first = false; if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.part_vals); + 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(")"); @@ -16258,18 +32711,15 @@ } - public static class get_partition_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_result"); + public static class get_table_privilege_set_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_privilege_set_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 Partition success; + private PrincipalPrivilegeSet success; public static final int SUCCESS = 0; private MetaException o1; public static final int O1 = 1; - private NoSuchObjectException o2; - public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -16277,56 +32727,49 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_table_privilege_set_result.class, metaDataMap); } - public get_partition_result() { + public get_table_privilege_set_result() { } - public get_partition_result( - Partition success, - MetaException o1, - NoSuchObjectException o2) + public get_table_privilege_set_result( + PrincipalPrivilegeSet 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 get_table_privilege_set_result(get_table_privilege_set_result other) { if (other.isSetSuccess()) { - this.success = new Partition(other.success); + this.success = new PrincipalPrivilegeSet(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } } @Override - public get_partition_result clone() { - return new get_partition_result(this); + public get_table_privilege_set_result clone() { + return new get_table_privilege_set_result(this); } - public Partition getSuccess() { + public PrincipalPrivilegeSet getSuccess() { return this.success; } - public void setSuccess(Partition success) { + public void setSuccess(PrincipalPrivilegeSet success) { this.success = success; } @@ -16356,30 +32799,13 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((Partition)value); + setSuccess((PrincipalPrivilegeSet)value); } break; @@ -16391,14 +32817,6 @@ } break; - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -16412,9 +32830,6 @@ case O1: return getO1(); - case O2: - return getO2(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -16427,8 +32842,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -16438,12 +32851,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 get_table_privilege_set_result) + return this.equals((get_table_privilege_set_result)that); return false; } - public boolean equals(get_partition_result that) { + public boolean equals(get_table_privilege_set_result that) { if (that == null) return false; @@ -16465,15 +32878,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; } @@ -16495,7 +32899,7 @@ { case SUCCESS: if (field.type == TType.STRUCT) { - this.success = new Partition(); + this.success = new PrincipalPrivilegeSet(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -16509,14 +32913,6 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 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); break; @@ -16539,10 +32935,6 @@ 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(); @@ -16550,7 +32942,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_result("); + StringBuilder sb = new StringBuilder("get_table_privilege_set_result("); boolean first = true; sb.append("success:"); @@ -16568,14 +32960,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(); } @@ -16587,18 +32971,24 @@ } - public static class get_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_by_name_args"); + public static class get_partition_privilege_set_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_privilege_set_args"); private static final TField 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 TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)4); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)5); private String db_name; public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; + private String table_name; + public static final int TABLE_NAME = 2; private String part_name; public static final int PART_NAME = 3; + private String user_name; + public static final int USER_NAME = 4; + private List group_names; + public static final int GROUP_NAMES = 5; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -16607,48 +32997,67 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partition_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_privilege_set_args.class, metaDataMap); } - public get_partition_by_name_args() { + public get_partition_privilege_set_args() { } - public get_partition_by_name_args( + public get_partition_privilege_set_args( String db_name, - String tbl_name, - String part_name) + String table_name, + String part_name, + String user_name, + List group_names) { this(); this.db_name = db_name; - this.tbl_name = tbl_name; + this.table_name = table_name; this.part_name = part_name; + this.user_name = user_name; + this.group_names = group_names; } /** * Performs a deep copy on other. */ - public get_partition_by_name_args(get_partition_by_name_args other) { + public get_partition_privilege_set_args(get_partition_privilege_set_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetTable_name()) { + this.table_name = other.table_name; } if (other.isSetPart_name()) { this.part_name = other.part_name; } + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + if (other.isSetGroup_names()) { + List __this__group_names = new ArrayList(); + for (String other_element : other.group_names) { + __this__group_names.add(other_element); + } + this.group_names = __this__group_names; + } } @Override - public get_partition_by_name_args clone() { - return new get_partition_by_name_args(this); + public get_partition_privilege_set_args clone() { + return new get_partition_privilege_set_args(this); } public String getDb_name() { @@ -16668,21 +33077,21 @@ return this.db_name != null; } - public String getTbl_name() { - return this.tbl_name; + public String getTable_name() { + return this.table_name; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setTable_name(String table_name) { + this.table_name = table_name; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetTable_name() { + 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; + // 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 String getPart_name() { @@ -16702,6 +33111,55 @@ return this.part_name != null; } + public String getUser_name() { + return this.user_name; + } + + public void setUser_name(String user_name) { + this.user_name = user_name; + } + + public void unsetUser_name() { + this.user_name = null; + } + + // Returns true if field user_name is set (has been asigned a value) and false otherwise + public boolean isSetUser_name() { + return this.user_name != null; + } + + public 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case DB_NAME: @@ -16712,11 +33170,11 @@ } break; - case TBL_NAME: + case TABLE_NAME: if (value == null) { - unsetTbl_name(); + unsetTable_name(); } else { - setTbl_name((String)value); + setTable_name((String)value); } break; @@ -16728,6 +33186,22 @@ } 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; + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -16738,12 +33212,18 @@ case DB_NAME: return getDb_name(); - case TBL_NAME: - return getTbl_name(); + case TABLE_NAME: + return getTable_name(); case PART_NAME: return getPart_name(); + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -16754,10 +33234,14 @@ switch (fieldID) { case DB_NAME: return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); + case TABLE_NAME: + return isSetTable_name(); case PART_NAME: return isSetPart_name(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -16767,12 +33251,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_by_name_args) - return this.equals((get_partition_by_name_args)that); + if (that instanceof get_partition_privilege_set_args) + return this.equals((get_partition_privilege_set_args)that); return false; } - public boolean equals(get_partition_by_name_args that) { + public boolean equals(get_partition_privilege_set_args that) { if (that == null) return false; @@ -16785,12 +33269,12 @@ 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_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.tbl_name.equals(that.tbl_name)) + if (!this.table_name.equals(that.table_name)) return false; } @@ -16803,6 +33287,24 @@ 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; } @@ -16829,9 +33331,9 @@ TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case TABLE_NAME: if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + this.table_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -16843,6 +33345,30 @@ TProtocolUtil.skip(iprot, field.type); } break; + case USER_NAME: + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GROUP_NAMES: + if (field.type == TType.LIST) { + { + TList _list223 = iprot.readListBegin(); + this.group_names = new ArrayList(_list223.size); + for (int _i224 = 0; _i224 < _list223.size; ++_i224) + { + String _elem225; + _elem225 = iprot.readString(); + this.group_names.add(_elem225); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; default: TProtocolUtil.skip(iprot, field.type); break; @@ -16863,9 +33389,9 @@ 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.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); oprot.writeFieldEnd(); } if (this.part_name != null) { @@ -16873,36 +33399,68 @@ oprot.writeString(this.part_name); oprot.writeFieldEnd(); } + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); + oprot.writeFieldEnd(); + } + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter226 : this.group_names) { + oprot.writeString(_iter226); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_by_name_args("); + StringBuilder sb = new StringBuilder("get_partition_privilege_set_args("); boolean first = true; sb.append("db_name:"); if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); } first = false; if (!first) sb.append(", "); - sb.append("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("part_name:"); - if (this.part_name == null) { + sb.append("group_names:"); + if (this.group_names == null) { sb.append("null"); } else { - sb.append(this.part_name); + sb.append(this.group_names); } first = false; sb.append(")"); @@ -16916,18 +33474,15 @@ } - public static class get_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_by_name_result"); + public static class get_partition_privilege_set_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_privilege_set_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 Partition success; + private PrincipalPrivilegeSet success; public static final int SUCCESS = 0; private MetaException o1; public static final int O1 = 1; - private NoSuchObjectException o2; - public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -16935,56 +33490,49 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_privilege_set_result.class, metaDataMap); } - public get_partition_by_name_result() { + public get_partition_privilege_set_result() { } - public get_partition_by_name_result( - Partition success, - MetaException o1, - NoSuchObjectException o2) + public get_partition_privilege_set_result( + PrincipalPrivilegeSet 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 get_partition_privilege_set_result(get_partition_privilege_set_result other) { if (other.isSetSuccess()) { - this.success = new Partition(other.success); + this.success = new PrincipalPrivilegeSet(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } } @Override - public get_partition_by_name_result clone() { - return new get_partition_by_name_result(this); + public get_partition_privilege_set_result clone() { + return new get_partition_privilege_set_result(this); } - public Partition getSuccess() { + public PrincipalPrivilegeSet getSuccess() { return this.success; } - public void setSuccess(Partition success) { + public void setSuccess(PrincipalPrivilegeSet success) { this.success = success; } @@ -17014,30 +33562,13 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((Partition)value); + setSuccess((PrincipalPrivilegeSet)value); } break; @@ -17049,14 +33580,6 @@ } break; - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -17070,9 +33593,6 @@ case O1: return getO1(); - case O2: - return getO2(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -17085,8 +33605,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -17096,12 +33614,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 get_partition_privilege_set_result) + return this.equals((get_partition_privilege_set_result)that); return false; } - public boolean equals(get_partition_by_name_result that) { + public boolean equals(get_partition_privilege_set_result that) { if (that == null) return false; @@ -17123,15 +33641,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; } @@ -17153,7 +33662,7 @@ { case SUCCESS: if (field.type == TType.STRUCT) { - this.success = new Partition(); + this.success = new PrincipalPrivilegeSet(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -17167,14 +33676,6 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 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); break; @@ -17197,10 +33698,6 @@ 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(); @@ -17208,7 +33705,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_by_name_result("); + StringBuilder sb = new StringBuilder("get_partition_privilege_set_result("); boolean first = true; sb.append("success:"); @@ -17226,14 +33723,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(); } @@ -17245,123 +33734,220 @@ } - public static class get_partitions_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partitions_args"); + public static class get_column_privilege_set_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_column_privilege_set_args"); private static final TField 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 TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + private static final TField COLUMN_NAME_FIELD_DESC = new TField("column_name", TType.STRING, (short)4); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)5); + private static final TField GROUP_NAMES_FIELD_DESC = new TField("group_names", TType.LIST, (short)6); private String db_name; public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private short max_parts; - public static final int MAX_PARTS = 3; + private String table_name; + public static final int TABLE_NAME = 2; + private String part_name; + public static final int PART_NAME = 3; + private String column_name; + public static final int COLUMN_NAME = 4; + private String user_name; + public static final int USER_NAME = 5; + private List group_names; + public static final int GROUP_NAMES = 6; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean max_parts = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); + put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMN_NAME, new FieldMetaData("column_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(GROUP_NAMES, new FieldMetaData("group_names", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_column_privilege_set_args.class, metaDataMap); } - public get_partitions_args() { - this.max_parts = (short)-1; - + public get_column_privilege_set_args() { } - public get_partitions_args( + public get_column_privilege_set_args( String db_name, - String tbl_name, - short max_parts) + String table_name, + String part_name, + String column_name, + String user_name, + List group_names) { this(); this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - this.__isset.max_parts = true; + this.table_name = table_name; + this.part_name = part_name; + this.column_name = column_name; + this.user_name = user_name; + this.group_names = group_names; + } + + /** + * Performs a deep copy on other. + */ + public get_column_privilege_set_args(get_column_privilege_set_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + if (other.isSetColumn_name()) { + this.column_name = other.column_name; + } + 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; + } + } + + @Override + public get_column_privilege_set_args clone() { + return new get_column_privilege_set_args(this); + } + + 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 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 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; } - /** - * Performs a deep copy on other. - */ - public get_partitions_args(get_partitions_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; + // 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; } - @Override - public get_partitions_args clone() { - return new get_partitions_args(this); + public String getColumn_name() { + return this.column_name; } - public String getDb_name() { - return this.db_name; + public void setColumn_name(String column_name) { + this.column_name = column_name; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void unsetColumn_name() { + this.column_name = null; } - public void unsetDb_name() { - this.db_name = null; + // Returns true if field column_name is set (has been asigned a value) and false otherwise + public boolean isSetColumn_name() { + return this.column_name != null; } - // 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 getUser_name() { + return this.user_name; } - public String getTbl_name() { - return this.tbl_name; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void unsetUser_name() { + this.user_name = null; } - public void unsetTbl_name() { - 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; } - // 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 int getGroup_namesSize() { + return (this.group_names == null) ? 0 : this.group_names.size(); } - public short getMax_parts() { - return this.max_parts; + public java.util.Iterator getGroup_namesIterator() { + return (this.group_names == null) ? null : this.group_names.iterator(); } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - this.__isset.max_parts = true; + public void addToGroup_names(String elem) { + if (this.group_names == null) { + this.group_names = new ArrayList(); + } + this.group_names.add(elem); } - public void unsetMax_parts() { - this.__isset.max_parts = false; + public List getGroup_names() { + return this.group_names; } - // Returns true if field max_parts is set (has been asigned a value) and false otherwise - public boolean isSetMax_parts() { - return this.__isset.max_parts; + 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 setFieldValue(int fieldID, Object value) { @@ -17374,19 +33960,43 @@ } break; - case TBL_NAME: + case TABLE_NAME: if (value == null) { - unsetTbl_name(); + unsetTable_name(); } else { - setTbl_name((String)value); + setTable_name((String)value); } break; - case MAX_PARTS: + case PART_NAME: if (value == null) { - unsetMax_parts(); + unsetPart_name(); } else { - setMax_parts((Short)value); + setPart_name((String)value); + } + break; + + case COLUMN_NAME: + if (value == null) { + unsetColumn_name(); + } else { + setColumn_name((String)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); + } + break; + + case GROUP_NAMES: + if (value == null) { + unsetGroup_names(); + } else { + setGroup_names((List)value); } break; @@ -17400,11 +34010,20 @@ case DB_NAME: return getDb_name(); - case TBL_NAME: - return getTbl_name(); + case TABLE_NAME: + return getTable_name(); - case MAX_PARTS: - return new Short(getMax_parts()); + case PART_NAME: + return getPart_name(); + + case COLUMN_NAME: + return getColumn_name(); + + case USER_NAME: + return getUser_name(); + + case GROUP_NAMES: + return getGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -17416,10 +34035,16 @@ switch (fieldID) { case DB_NAME: return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_PARTS: - return isSetMax_parts(); + case TABLE_NAME: + return isSetTable_name(); + case PART_NAME: + return isSetPart_name(); + case COLUMN_NAME: + return isSetColumn_name(); + case USER_NAME: + return isSetUser_name(); + case GROUP_NAMES: + return isSetGroup_names(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -17429,12 +34054,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partitions_args) - return this.equals((get_partitions_args)that); + if (that instanceof get_column_privilege_set_args) + return this.equals((get_column_privilege_set_args)that); return false; } - public boolean equals(get_partitions_args that) { + public boolean equals(get_column_privilege_set_args that) { if (that == null) return false; @@ -17447,21 +34072,48 @@ 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_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.tbl_name.equals(that.tbl_name)) + if (!this.table_name.equals(that.table_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_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.max_parts != that.max_parts) + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_column_name = true && this.isSetColumn_name(); + boolean that_present_column_name = true && that.isSetColumn_name(); + if (this_present_column_name || that_present_column_name) { + if (!(this_present_column_name && that_present_column_name)) + return false; + if (!this.column_name.equals(that.column_name)) + return false; + } + + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) + return false; + if (!this.user_name.equals(that.user_name)) + return false; + } + + boolean this_present_group_names = true && this.isSetGroup_names(); + boolean that_present_group_names = true && that.isSetGroup_names(); + if (this_present_group_names || that_present_group_names) { + if (!(this_present_group_names && that_present_group_names)) + return false; + if (!this.group_names.equals(that.group_names)) return false; } @@ -17491,17 +34143,47 @@ TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case TABLE_NAME: if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + this.table_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_PARTS: - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; + case PART_NAME: + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case COLUMN_NAME: + if (field.type == TType.STRING) { + this.column_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case USER_NAME: + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GROUP_NAMES: + if (field.type == TType.LIST) { + { + TList _list227 = iprot.readListBegin(); + this.group_names = new ArrayList(_list227.size); + for (int _i228 = 0; _i228 < _list227.size; ++_i228) + { + String _elem229; + _elem229 = iprot.readString(); + this.group_names.add(_elem229); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -17526,21 +34208,44 @@ 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.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + if (this.column_name != null) { + oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); + oprot.writeString(this.column_name); + oprot.writeFieldEnd(); + } + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); + oprot.writeFieldEnd(); + } + if (this.group_names != null) { + oprot.writeFieldBegin(GROUP_NAMES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.group_names.size())); + for (String _iter230 : this.group_names) { + oprot.writeString(_iter230); + } + 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("get_partitions_args("); + StringBuilder sb = new StringBuilder("get_column_privilege_set_args("); boolean first = true; sb.append("db_name:"); @@ -17551,16 +34256,44 @@ } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("table_name:"); + if (this.table_name == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.table_name); } first = false; if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("column_name:"); + if (this.column_name == null) { + sb.append("null"); + } else { + sb.append(this.column_name); + } + first = false; + 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(); @@ -17573,18 +34306,15 @@ } - 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); + public static class get_column_privilege_set_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_column_privilege_set_result"); + private static final TField 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 PrincipalPrivilegeSet success; public static final int SUCCESS = 0; - private NoSuchObjectException o1; + private MetaException o1; public static final int O1 = 1; - private MetaException o2; - public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -17592,76 +34322,49 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Partition.class)))); + new StructMetaData(TType.STRUCT, PrincipalPrivilegeSet.class))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partitions_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_column_privilege_set_result.class, metaDataMap); } - public get_partitions_result() { + public get_column_privilege_set_result() { } - public get_partitions_result( - List success, - NoSuchObjectException o1, - MetaException o2) + public get_column_privilege_set_result( + PrincipalPrivilegeSet success, + MetaException o1) { this(); this.success = success; this.o1 = o1; - this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_partitions_result(get_partitions_result other) { + public get_column_privilege_set_result(get_column_privilege_set_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 PrincipalPrivilegeSet(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); } } @Override - public get_partitions_result clone() { - return new get_partitions_result(this); - } - - 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 get_column_privilege_set_result clone() { + return new get_column_privilege_set_result(this); } - public List getSuccess() { + public PrincipalPrivilegeSet getSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(PrincipalPrivilegeSet success) { this.success = success; } @@ -17674,11 +34377,11 @@ return 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; } @@ -17691,30 +34394,13 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((PrincipalPrivilegeSet)value); } break; @@ -17722,15 +34408,7 @@ if (value == null) { unsetO1(); } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -17747,9 +34425,6 @@ case O1: return getO1(); - case O2: - return getO2(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -17762,8 +34437,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -17773,12 +34446,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 get_column_privilege_set_result) + return this.equals((get_column_privilege_set_result)that); return false; } - public boolean equals(get_partitions_result that) { + public boolean equals(get_column_privilege_set_result that) { if (that == null) return false; @@ -17800,15 +34473,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; } @@ -17829,39 +34493,21 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list99 = iprot.readListBegin(); - this.success = new ArrayList(_list99.size); - for (int _i100 = 0; _i100 < _list99.size; ++_i100) - { - Partition _elem101; - _elem101 = new Partition(); - _elem101.read(iprot); - this.success.add(_elem101); - } - iprot.readListEnd(); - } + if (field.type == TType.STRUCT) { + this.success = new PrincipalPrivilegeSet(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; case 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 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); break; @@ -17878,22 +34524,12 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter102 : this.success) { - _iter102.write(oprot); - } - 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(); @@ -17901,7 +34537,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_result("); + StringBuilder sb = new StringBuilder("get_column_privilege_set_result("); boolean first = true; sb.append("success:"); @@ -17919,14 +34555,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(); } @@ -17938,148 +34566,144 @@ } - 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 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); + 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 ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1); + private static final TField OWNER_NAME_FIELD_DESC = new TField("owner_name", TType.STRING, (short)2); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)3); + private String role_name; + public static final int ROLE_NAME = 1; + private String owner_name; + public static final int OWNER_NAME = 2; private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private short max_parts; - public static final int MAX_PARTS = 3; + public static final int DB_NAME = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean max_parts = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + put(ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(OWNER_NAME, new FieldMetaData("owner_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partition_names_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(create_role_args.class, metaDataMap); } - public get_partition_names_args() { - this.max_parts = (short)-1; - + public create_role_args() { } - - public get_partition_names_args( - String db_name, - String tbl_name, - short max_parts) + + public create_role_args( + String role_name, + String owner_name, + String db_name) { this(); + this.role_name = role_name; + this.owner_name = owner_name; this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - this.__isset.max_parts = true; } /** * Performs a deep copy on other. */ - public get_partition_names_args(get_partition_names_args other) { + public create_role_args(create_role_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; + } + if (other.isSetOwner_name()) { + this.owner_name = other.owner_name; + } if (other.isSetDb_name()) { this.db_name = other.db_name; } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; } @Override - public get_partition_names_args clone() { - return new get_partition_names_args(this); + public create_role_args clone() { + return new create_role_args(this); } - public String getDb_name() { - return this.db_name; + public String getRole_name() { + return this.role_name; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void unsetDb_name() { - this.db_name = null; + public void unsetRole_name() { + this.role_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 role_name is set (has been asigned a value) and false otherwise + public boolean isSetRole_name() { + return this.role_name != null; } - public String getTbl_name() { - return this.tbl_name; + public String getOwner_name() { + return this.owner_name; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setOwner_name(String owner_name) { + this.owner_name = owner_name; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetOwner_name() { + this.owner_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 owner_name is set (has been asigned a value) and false otherwise + public boolean isSetOwner_name() { + return this.owner_name != null; } - public short getMax_parts() { - return this.max_parts; + public String getDb_name() { + return this.db_name; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - this.__isset.max_parts = true; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetMax_parts() { - this.__isset.max_parts = false; + public void unsetDb_name() { + this.db_name = null; } - // Returns true if field max_parts is set (has been asigned a value) and false otherwise - public boolean isSetMax_parts() { - return this.__isset.max_parts; + // 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DB_NAME: + case ROLE_NAME: if (value == null) { - unsetDb_name(); + unsetRole_name(); } else { - setDb_name((String)value); + setRole_name((String)value); } break; - case TBL_NAME: + case OWNER_NAME: if (value == null) { - unsetTbl_name(); + unsetOwner_name(); } else { - setTbl_name((String)value); + setOwner_name((String)value); } break; - case MAX_PARTS: + case DB_NAME: if (value == null) { - unsetMax_parts(); + unsetDb_name(); } else { - setMax_parts((Short)value); + setDb_name((String)value); } break; @@ -18090,14 +34714,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); + case ROLE_NAME: + return getRole_name(); - case TBL_NAME: - return getTbl_name(); + case OWNER_NAME: + return getOwner_name(); - case MAX_PARTS: - return new Short(getMax_parts()); + case DB_NAME: + return getDb_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -18107,12 +34731,12 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { + case ROLE_NAME: + return isSetRole_name(); + case OWNER_NAME: + return isSetOwner_name(); case DB_NAME: return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_PARTS: - return isSetMax_parts(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -18122,39 +34746,39 @@ 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 create_role_args) + return this.equals((create_role_args)that); return false; } - public boolean equals(get_partition_names_args that) { + public boolean equals(create_role_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_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.db_name.equals(that.db_name)) + if (!this.role_name.equals(that.role_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_owner_name = true && this.isSetOwner_name(); + boolean that_present_owner_name = true && that.isSetOwner_name(); + if (this_present_owner_name || that_present_owner_name) { + if (!(this_present_owner_name && that_present_owner_name)) return false; - if (!this.tbl_name.equals(that.tbl_name)) + if (!this.owner_name.equals(that.owner_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_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.max_parts != that.max_parts) + if (!this.db_name.equals(that.db_name)) return false; } @@ -18177,24 +34801,23 @@ } switch (field.id) { - case DB_NAME: + case ROLE_NAME: if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + this.role_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case OWNER_NAME: if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + this.owner_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_PARTS: - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -18214,46 +34837,52 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); + oprot.writeFieldEnd(); + } + if (this.owner_name != null) { + oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); + oprot.writeString(this.owner_name); + oprot.writeFieldEnd(); + } if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } - 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_partition_names_args("); + StringBuilder sb = new StringBuilder("create_role_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("role_name:"); + if (this.role_name == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.role_name); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("owner_name:"); + if (this.owner_name == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.owner_name); } first = false; if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); + } first = false; sb.append(")"); return sb.toString(); @@ -18266,112 +34895,94 @@ } - 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.LIST, (short)0); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); + 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.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private List success; + private boolean success; public static final int SUCCESS = 0; - private MetaException o2; - public static final int O2 = 1; + private MetaException o1; + public static final int O1 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); - } - - public get_partition_names_result() { - } - - public get_partition_names_result( - List success, - MetaException o2) - { - this(); - this.success = success; - 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; - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } - } - - @Override - public get_partition_names_result clone() { - return new get_partition_names_result(this); + FieldMetaData.addStructMetaDataMap(create_role_result.class, metaDataMap); } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public create_role_result() { } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + public create_role_result( + boolean success, + MetaException o1) + { + this(); + this.success = success; + this.__isset.success = true; + this.o1 = o1; } - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); + /** + * Performs a deep copy on other. + */ + public create_role_result(create_role_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } - this.success.add(elem); } - public List getSuccess() { + @Override + public create_role_result clone() { + return new create_role_result(this); + } + + public boolean isSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(boolean success) { this.success = success; + this.__isset.success = true; } public void unsetSuccess() { - this.success = null; + this.__isset.success = false; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { - return this.success != null; + return this.__isset.success; } - 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 setFieldValue(int fieldID, Object value) { @@ -18380,15 +34991,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; @@ -18400,10 +35011,10 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); - case O2: - return getO2(); + case O1: + return getO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -18415,8 +35026,8 @@ switch (fieldID) { case SUCCESS: return isSetSuccess(); - case O2: - return isSetO2(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -18426,30 +35037,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_names_result) - return this.equals((get_partition_names_result)that); + if (that instanceof create_role_result) + return this.equals((create_role_result)that); return false; } - public boolean equals(get_partition_names_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; } - 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; } @@ -18473,26 +35084,17 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list103 = iprot.readListBegin(); - this.success = new ArrayList(_list103.size); - for (int _i104 = 0; _i104 < _list103.size; ++_i104) - { - String _elem105; - _elem105 = iprot.readString(); - this.success.add(_elem105); - } - iprot.readListEnd(); - } + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 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); } @@ -18513,17 +35115,11 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter106 : this.success) { - oprot.writeString(_iter106); - } - 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(); @@ -18532,22 +35128,18 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_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("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(")"); @@ -18561,203 +35153,109 @@ } - 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 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); + 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 ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)2); + private String role_name; + public static final int ROLE_NAME = 1; private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private List part_vals; - public static final int PART_VALS = 3; - private short max_parts; - public static final int MAX_PARTS = 4; + public static final int DB_NAME = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean max_parts = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + put(ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partitions_ps_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_role_args.class, metaDataMap); } - public get_partitions_ps_args() { - this.max_parts = (short)-1; - + public drop_role_args() { } - public get_partitions_ps_args( - String db_name, - String tbl_name, - List part_vals, - short max_parts) + public drop_role_args( + String role_name, + String db_name) { this(); + this.role_name = role_name; this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - this.__isset.max_parts = true; } /** * Performs a deep copy on other. */ - public get_partitions_ps_args(get_partitions_ps_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 drop_role_args(drop_role_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; - } - - @Override - public get_partitions_ps_args clone() { - return new get_partitions_ps_args(this); - } - - 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 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 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(); + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - this.part_vals.add(elem); } - public List getPart_vals() { - return this.part_vals; + @Override + public drop_role_args clone() { + return new drop_role_args(this); } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public String getRole_name() { + return this.role_name; } - public void unsetPart_vals() { - this.part_vals = null; + public void setRole_name(String role_name) { + this.role_name = role_name; } - // 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 unsetRole_name() { + this.role_name = null; } - public short getMax_parts() { - return this.max_parts; + // 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 setMax_parts(short max_parts) { - this.max_parts = max_parts; - this.__isset.max_parts = true; + public String getDb_name() { + return this.db_name; } - public void unsetMax_parts() { - this.__isset.max_parts = false; + public void setDb_name(String db_name) { + this.db_name = db_name; } - // Returns true if field max_parts is set (has been asigned a value) and false otherwise - public boolean isSetMax_parts() { - return this.__isset.max_parts; + 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - 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 ROLE_NAME: if (value == null) { - unsetPart_vals(); + unsetRole_name(); } else { - setPart_vals((List)value); + setRole_name((String)value); } break; - case MAX_PARTS: + case DB_NAME: if (value == null) { - unsetMax_parts(); + unsetDb_name(); } else { - setMax_parts((Short)value); + setDb_name((String)value); } break; @@ -18768,18 +35266,12 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { + case ROLE_NAME: + return getRole_name(); + 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()); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -18788,14 +35280,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { + case ROLE_NAME: + return isSetRole_name(); case DB_NAME: return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -18805,15 +35293,24 @@ 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_role_args) + return this.equals((drop_role_args)that); return false; } - public boolean equals(get_partitions_ps_args that) { + public boolean equals(drop_role_args that) { if (that == null) return false; + boolean this_present_role_name = true && this.isSetRole_name(); + boolean that_present_role_name = true && that.isSetRole_name(); + if (this_present_role_name || that_present_role_name) { + if (!(this_present_role_name && that_present_role_name)) + return false; + if (!this.role_name.equals(that.role_name)) + return false; + } + boolean this_present_db_name = true && this.isSetDb_name(); boolean that_present_db_name = true && that.isSetDb_name(); if (this_present_db_name || that_present_db_name) { @@ -18823,33 +35320,6 @@ 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_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; } @@ -18869,41 +35339,16 @@ } switch (field.id) { - case DB_NAME: + case ROLE_NAME: if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + this.role_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case DB_NAME: if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case PART_VALS: - if (field.type == TType.LIST) { - { - TList _list107 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list107.size); - for (int _i108 = 0; _i108 < _list107.size; ++_i108) - { - String _elem109; - _elem109 = iprot.readString(); - this.part_vals.add(_elem109); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MAX_PARTS: - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -18923,66 +35368,40 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); + oprot.writeFieldEnd(); + } 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 _iter110 : this.part_vals) { - oprot.writeString(_iter110); - } - 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("get_partitions_ps_args("); + StringBuilder sb = new StringBuilder("drop_role_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("role_name:"); + if (this.role_name == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.role_name); } first = false; if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.db_name); } first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; sb.append(")"); return sb.toString(); } @@ -18994,95 +35413,77 @@ } - 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); + 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.BOOL, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private List success; + private boolean success; public static final int SUCCESS = 0; private MetaException o1; public static final int O1 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Partition.class)))); + new FieldValueMetaData(TType.BOOL))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_role_result.class, metaDataMap); } - public get_partitions_ps_result() { + public drop_role_result() { } - public get_partitions_ps_result( - List success, + public drop_role_result( + boolean success, MetaException o1) { this(); this.success = success; + this.__isset.success = true; this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_partitions_ps_result(get_partitions_ps_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } + public drop_role_result(drop_role_result other) { + __isset.success = other.__isset.success; + this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } } @Override - public get_partitions_ps_result clone() { - return new get_partitions_ps_result(this); - } - - 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 drop_role_result clone() { + return new drop_role_result(this); } - public List getSuccess() { + public boolean isSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(boolean success) { this.success = success; + this.__isset.success = true; } public void unsetSuccess() { - this.success = null; + this.__isset.success = false; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { - return this.success != null; + return this.__isset.success; } public MetaException getO1() { @@ -19108,7 +35509,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Boolean)value); } break; @@ -19128,7 +35529,7 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); @@ -19154,21 +35555,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_role_result) + return this.equals((drop_role_result)that); return false; } - public boolean equals(get_partitions_ps_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; } @@ -19201,19 +35602,9 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list111 = iprot.readListBegin(); - this.success = new ArrayList(_list111.size); - for (int _i112 = 0; _i112 < _list111.size; ++_i112) - { - Partition _elem113; - _elem113 = new Partition(); - _elem113.read(iprot); - this.success.add(_elem113); - } - iprot.readListEnd(); - } + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -19242,13 +35633,7 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter114 : this.success) { - _iter114.write(oprot); - } - oprot.writeListEnd(); - } + oprot.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -19261,15 +35646,11 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_ps_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:"); @@ -19290,203 +35671,218 @@ } - 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); + public static class add_role_member_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_role_member_args"); + private static final TField ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)4); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)5); + private String role_name; + public static final int ROLE_NAME = 1; + private String user_name; + public static final int USER_NAME = 2; + private boolean is_role; + public static final int IS_ROLE = 3; + private boolean is_group; + public static final int IS_GROUP = 4; private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private List part_vals; - public static final int PART_VALS = 3; - private short max_parts; - public static final int MAX_PARTS = 4; + public static final int DB_NAME = 5; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean max_parts = false; + public boolean is_role = false; + public boolean is_group = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + put(ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); + put(IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_role_member_args.class, metaDataMap); } - public get_partition_names_ps_args() { - this.max_parts = (short)-1; - + public add_role_member_args() { } - public get_partition_names_ps_args( - String db_name, - String tbl_name, - List part_vals, - short max_parts) + public add_role_member_args( + String role_name, + String user_name, + boolean is_role, + boolean is_group, + String db_name) { this(); + this.role_name = role_name; + this.user_name = user_name; + this.is_role = is_role; + this.__isset.is_role = true; + this.is_group = is_group; + this.__isset.is_group = true; this.db_name = db_name; - this.tbl_name = tbl_name; - this.part_vals = part_vals; - this.max_parts = max_parts; - this.__isset.max_parts = true; } /** * Performs a deep copy on other. */ - public get_partition_names_ps_args(get_partition_names_ps_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; + public add_role_member_args(add_role_member_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetUser_name()) { + this.user_name = other.user_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; + __isset.is_role = other.__isset.is_role; + this.is_role = other.is_role; + __isset.is_group = other.__isset.is_group; + this.is_group = other.is_group; + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; } @Override - public get_partition_names_ps_args clone() { - return new get_partition_names_ps_args(this); + public add_role_member_args clone() { + return new add_role_member_args(this); } - public String getDb_name() { - return this.db_name; + public String getRole_name() { + return this.role_name; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void unsetDb_name() { - this.db_name = null; + public void unsetRole_name() { + this.role_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 role_name is set (has been asigned a value) and false otherwise + public boolean isSetRole_name() { + return this.role_name != 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 int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); + public boolean isIs_role() { + return this.is_role; } - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); + public void unsetIs_role() { + this.__isset.is_role = false; } - public List getPart_vals() { - return this.part_vals; + // Returns true if field is_role is set (has been asigned a value) and false otherwise + public boolean isSetIs_role() { + return this.__isset.is_role; } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public boolean isIs_group() { + return this.is_group; } - public void unsetPart_vals() { - this.part_vals = null; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; } - // 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 unsetIs_group() { + this.__isset.is_group = false; } - public short getMax_parts() { - return this.max_parts; + // Returns true if field is_group is set (has been asigned a value) and false otherwise + public boolean isSetIs_group() { + return this.__isset.is_group; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - this.__isset.max_parts = true; + public String getDb_name() { + return this.db_name; } - public void unsetMax_parts() { - this.__isset.max_parts = false; + public void setDb_name(String db_name) { + this.db_name = db_name; } - // Returns true if field max_parts is set (has been asigned a value) and false otherwise - public boolean isSetMax_parts() { - return this.__isset.max_parts; + 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 setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case ROLE_NAME: + if (value == null) { + unsetRole_name(); + } else { + setRole_name((String)value); + } + break; + + case USER_NAME: if (value == null) { - unsetDb_name(); + unsetUser_name(); } else { - setDb_name((String)value); + setUser_name((String)value); } break; - case TBL_NAME: + case IS_ROLE: if (value == null) { - unsetTbl_name(); + unsetIs_role(); } else { - setTbl_name((String)value); + setIs_role((Boolean)value); } break; - case PART_VALS: + case IS_GROUP: if (value == null) { - unsetPart_vals(); + unsetIs_group(); } else { - setPart_vals((List)value); + setIs_group((Boolean)value); } break; - case MAX_PARTS: + case DB_NAME: if (value == null) { - unsetMax_parts(); + unsetDb_name(); } else { - setMax_parts((Short)value); + setDb_name((String)value); } break; @@ -19497,17 +35893,20 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); + case ROLE_NAME: + return getRole_name(); - case TBL_NAME: - return getTbl_name(); + case USER_NAME: + return getUser_name(); - case PART_VALS: - return getPart_vals(); + case IS_ROLE: + return new Boolean(isIs_role()); - case MAX_PARTS: - return new Short(getMax_parts()); + case IS_GROUP: + return new Boolean(isIs_group()); + + case DB_NAME: + return getDb_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -19517,14 +35916,16 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { + case ROLE_NAME: + return isSetRole_name(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); case DB_NAME: return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -19534,48 +35935,57 @@ 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 add_role_member_args) + return this.equals((add_role_member_args)that); return false; } - public boolean equals(get_partition_names_ps_args that) { + public boolean equals(add_role_member_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_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.db_name.equals(that.db_name)) + if (!this.role_name.equals(that.role_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_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.tbl_name.equals(that.tbl_name)) + if (!this.user_name.equals(that.user_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_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.part_vals.equals(that.part_vals)) + if (this.is_role != that.is_role) 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_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (this.max_parts != that.max_parts) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) return false; } @@ -19598,41 +36008,39 @@ } switch (field.id) { - case DB_NAME: + case ROLE_NAME: if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + this.role_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case USER_NAME: if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PART_VALS: - if (field.type == TType.LIST) { - { - TList _list115 = iprot.readListBegin(); - this.part_vals = new ArrayList(_list115.size); - for (int _i116 = 0; _i116 < _list115.size; ++_i116) - { - String _elem117; - _elem117 = iprot.readString(); - this.part_vals.add(_elem117); - } - iprot.readListEnd(); - } + case IS_ROLE: + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + this.__isset.is_role = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_PARTS: - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; + case IS_GROUP: + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + this.__isset.is_group = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -19652,66 +36060,67 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); 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.part_vals != null) { - oprot.writeFieldBegin(PART_VALS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter118 : this.part_vals) { - oprot.writeString(_iter118); - } - oprot.writeListEnd(); - } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } - oprot.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("add_role_member_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("role_name:"); + if (this.role_name == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.role_name); } 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("part_vals:"); - if (this.part_vals == null) { + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.db_name); } first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; sb.append(")"); return sb.toString(); } @@ -19723,95 +36132,77 @@ } - 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.LIST, (short)0); + public static class add_role_member_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_role_member_result"); + private static final TField 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; public static final int SUCCESS = 0; private MetaException o1; public static final int O1 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); + new FieldValueMetaData(TType.BOOL))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_role_member_result.class, metaDataMap); } - public get_partition_names_ps_result() { + public add_role_member_result() { } - public get_partition_names_ps_result( - List success, + public add_role_member_result( + boolean success, MetaException o1) { this(); this.success = success; + this.__isset.success = true; this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_partition_names_ps_result(get_partition_names_ps_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } + public add_role_member_result(add_role_member_result other) { + __isset.success = other.__isset.success; + this.success = other.success; if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } - } - - @Override - public get_partition_names_ps_result clone() { - return new get_partition_names_ps_result(this); - } - - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } - - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + this.o1 = new MetaException(other.o1); + } } - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + @Override + public add_role_member_result clone() { + return new add_role_member_result(this); } - public List getSuccess() { + public boolean isSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(boolean success) { this.success = success; + this.__isset.success = true; } public void unsetSuccess() { - this.success = null; + this.__isset.success = false; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { - return this.success != null; + return this.__isset.success; } public MetaException getO1() { @@ -19837,7 +36228,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Boolean)value); } break; @@ -19857,7 +36248,7 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); @@ -19883,21 +36274,21 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_names_ps_result) - return this.equals((get_partition_names_ps_result)that); + if (that instanceof add_role_member_result) + return this.equals((add_role_member_result)that); return false; } - public boolean equals(get_partition_names_ps_result that) { + public boolean equals(add_role_member_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; } @@ -19930,18 +36321,9 @@ switch (field.id) { case 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(); - } + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -19970,13 +36352,7 @@ 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.writeBool(this.success); oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -19989,15 +36365,11 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partition_names_ps_result("); + StringBuilder sb = new StringBuilder("add_role_member_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:"); @@ -20018,183 +36390,218 @@ } - 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 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); + public static class remove_role_member_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("remove_role_member_args"); + private static final TField ROLE_NAME_FIELD_DESC = new TField("role_name", TType.STRING, (short)1); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)4); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)5); + private String role_name; + public static final int ROLE_NAME = 1; + private String user_name; + public static final int USER_NAME = 2; + private boolean is_role; + public static final int IS_ROLE = 3; + private boolean is_group; + public static final int IS_GROUP = 4; private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private String filter; - public static final int FILTER = 3; - private short max_parts; - public static final int MAX_PARTS = 4; + public static final int DB_NAME = 5; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean max_parts = false; + public boolean is_role = false; + public boolean is_group = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + put(ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(FILTER, new FieldMetaData("filter", TFieldRequirementType.DEFAULT, + put(IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(remove_role_member_args.class, metaDataMap); } - public get_partitions_by_filter_args() { - this.max_parts = (short)-1; - + public remove_role_member_args() { } - public get_partitions_by_filter_args( - String db_name, - String tbl_name, - String filter, - short max_parts) + public remove_role_member_args( + String role_name, + String user_name, + boolean is_role, + boolean is_group, + String db_name) { this(); + this.role_name = role_name; + this.user_name = user_name; + this.is_role = is_role; + this.__isset.is_role = true; + this.is_group = is_group; + this.__isset.is_group = true; this.db_name = db_name; - this.tbl_name = tbl_name; - this.filter = filter; - this.max_parts = max_parts; - this.__isset.max_parts = true; } /** * Performs a deep copy on other. */ - public get_partitions_by_filter_args(get_partitions_by_filter_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; + public remove_role_member_args(remove_role_member_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - if (other.isSetFilter()) { - this.filter = other.filter; + __isset.is_role = other.__isset.is_role; + this.is_role = other.is_role; + __isset.is_group = other.__isset.is_group; + this.is_group = other.is_group; + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; } @Override - public get_partitions_by_filter_args clone() { - return new get_partitions_by_filter_args(this); + public remove_role_member_args clone() { + return new remove_role_member_args(this); } - public String getDb_name() { - return this.db_name; + public String getRole_name() { + return this.role_name; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void unsetDb_name() { - this.db_name = null; + public void unsetRole_name() { + this.role_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 role_name is set (has been asigned a value) and false otherwise + public boolean isSetRole_name() { + return this.role_name != 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 String getFilter() { - return this.filter; + public boolean isIs_role() { + return this.is_role; } - public void setFilter(String filter) { - this.filter = filter; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - public void unsetFilter() { - this.filter = null; + public void unsetIs_role() { + this.__isset.is_role = false; } - // Returns true if field filter is set (has been asigned a value) and false otherwise - public boolean isSetFilter() { - return this.filter != null; + // Returns true if field is_role is set (has been asigned a value) and false otherwise + public boolean isSetIs_role() { + return this.__isset.is_role; } - public short getMax_parts() { - return this.max_parts; + public boolean isIs_group() { + return this.is_group; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - this.__isset.max_parts = true; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; } - public void unsetMax_parts() { - this.__isset.max_parts = false; + public void unsetIs_group() { + this.__isset.is_group = false; } - // Returns true if field max_parts is set (has been asigned a value) and false otherwise - public boolean isSetMax_parts() { - return this.__isset.max_parts; + // Returns true if field is_group is set (has been asigned a value) and false otherwise + public boolean isSetIs_group() { + return this.__isset.is_group; + } + + 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DB_NAME: + case ROLE_NAME: if (value == null) { - unsetDb_name(); + unsetRole_name(); } else { - setDb_name((String)value); + setRole_name((String)value); + } + break; + + case USER_NAME: + if (value == null) { + unsetUser_name(); + } else { + setUser_name((String)value); } break; - case TBL_NAME: + case IS_ROLE: if (value == null) { - unsetTbl_name(); + unsetIs_role(); } else { - setTbl_name((String)value); + setIs_role((Boolean)value); } break; - case FILTER: + case IS_GROUP: if (value == null) { - unsetFilter(); + unsetIs_group(); } else { - setFilter((String)value); + setIs_group((Boolean)value); } break; - case MAX_PARTS: + case DB_NAME: if (value == null) { - unsetMax_parts(); + unsetDb_name(); } else { - setMax_parts((Short)value); + setDb_name((String)value); } break; @@ -20205,17 +36612,20 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); + case ROLE_NAME: + return getRole_name(); - case TBL_NAME: - return getTbl_name(); + case USER_NAME: + return getUser_name(); - case FILTER: - return getFilter(); + case IS_ROLE: + return new Boolean(isIs_role()); - case MAX_PARTS: - return new Short(getMax_parts()); + case IS_GROUP: + return new Boolean(isIs_group()); + + case DB_NAME: + return getDb_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -20225,14 +36635,16 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { + case ROLE_NAME: + return isSetRole_name(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); case DB_NAME: return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case FILTER: - return isSetFilter(); - case MAX_PARTS: - return isSetMax_parts(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -20242,48 +36654,57 @@ 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 remove_role_member_args) + return this.equals((remove_role_member_args)that); return false; } - public boolean equals(get_partitions_by_filter_args that) { + public boolean equals(remove_role_member_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_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.db_name.equals(that.db_name)) + if (!this.role_name.equals(that.role_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_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.tbl_name.equals(that.tbl_name)) + if (!this.user_name.equals(that.user_name)) return false; } - boolean this_present_filter = true && this.isSetFilter(); - boolean that_present_filter = true && that.isSetFilter(); - if (this_present_filter || that_present_filter) { - if (!(this_present_filter && that_present_filter)) + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.filter.equals(that.filter)) + if (this.is_role != that.is_role) 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_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (this.max_parts != that.max_parts) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) return false; } @@ -20306,31 +36727,39 @@ } switch (field.id) { - case DB_NAME: + case ROLE_NAME: if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + this.role_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case USER_NAME: if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case FILTER: - if (field.type == TType.STRING) { - this.filter = iprot.readString(); + case IS_ROLE: + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + this.__isset.is_role = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_PARTS: - if (field.type == TType.I16) { - this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; + case IS_GROUP: + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + this.__isset.is_group = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -20350,60 +36779,67 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); 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.filter != null) { - oprot.writeFieldBegin(FILTER_FIELD_DESC); - oprot.writeString(this.filter); + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_by_filter_args("); + StringBuilder sb = new StringBuilder("remove_role_member_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("role_name:"); + if (this.role_name == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.role_name); } 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("filter:"); - if (this.filter == null) { + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.filter); + sb.append(this.db_name); } first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; sb.append(")"); return sb.toString(); } @@ -20415,105 +36851,77 @@ } - 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.LIST, (short)0); + public static class remove_role_member_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("remove_role_member_result"); + private static final TField 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 boolean success; public static final int SUCCESS = 0; private MetaException o1; public static final int O1 = 1; - private NoSuchObjectException o2; - public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Partition.class)))); + new FieldValueMetaData(TType.BOOL))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(remove_role_member_result.class, metaDataMap); } - public get_partitions_by_filter_result() { + public remove_role_member_result() { } - public get_partitions_by_filter_result( - List success, - MetaException o1, - NoSuchObjectException o2) + public remove_role_member_result( + boolean success, + MetaException o1) { this(); this.success = success; + this.__isset.success = true; this.o1 = o1; - this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_partitions_by_filter_result(get_partitions_by_filter_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Partition other_element : other.success) { - __this__success.add(new Partition(other_element)); - } - this.success = __this__success; - } + public remove_role_member_result(remove_role_member_result other) { + __isset.success = other.__isset.success; + this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); - } } @Override - public get_partitions_by_filter_result clone() { - return new get_partitions_by_filter_result(this); - } - - 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 remove_role_member_result clone() { + return new remove_role_member_result(this); } - public List getSuccess() { + public boolean isSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(boolean success) { this.success = success; + this.__isset.success = true; } public void unsetSuccess() { - this.success = null; + this.__isset.success = false; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { - return this.success != null; + return this.__isset.success; } public MetaException getO1() { @@ -20533,30 +36941,13 @@ return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { case SUCCESS: if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Boolean)value); } break; @@ -20568,14 +36959,6 @@ } break; - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -20584,14 +36967,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); - case O2: - return getO2(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -20604,8 +36984,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -20615,21 +36993,21 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partitions_by_filter_result) - return this.equals((get_partitions_by_filter_result)that); + if (that instanceof remove_role_member_result) + return this.equals((remove_role_member_result)that); return false; } - public boolean equals(get_partitions_by_filter_result that) { + public boolean equals(remove_role_member_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; } @@ -20642,15 +37020,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; } @@ -20671,19 +37040,9 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list123 = iprot.readListBegin(); - this.success = new ArrayList(_list123.size); - for (int _i124 = 0; _i124 < _list123.size; ++_i124) - { - Partition _elem125; - _elem125 = new Partition(); - _elem125.read(iprot); - this.success.add(_elem125); - } - iprot.readListEnd(); - } + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -20696,14 +37055,6 @@ TProtocolUtil.skip(iprot, field.type); } break; - case 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); break; @@ -20720,22 +37071,12 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter126 : this.success) { - _iter126.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(); @@ -20743,15 +37084,11 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_partitions_by_filter_result("); + StringBuilder sb = new StringBuilder("remove_role_member_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:"); @@ -20761,14 +37098,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(); } @@ -20780,144 +37109,183 @@ } - 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 NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)3); + 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 PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)4); + private String principal_name; + public static final int PRINCIPAL_NAME = 1; + private boolean is_role; + public static final int IS_ROLE = 2; + private boolean is_group; + public static final int IS_GROUP = 3; private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private Partition new_part; - public static final int NEW_PART = 3; + public static final int DB_NAME = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean is_role = false; + public boolean is_group = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + put(PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); }}); static { - FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_roles_args.class, metaDataMap); } - public alter_partition_args() { + public list_roles_args() { } - public alter_partition_args( - String db_name, - String tbl_name, - Partition new_part) + public list_roles_args( + String principal_name, + boolean is_role, + boolean is_group, + String db_name) { this(); + this.principal_name = principal_name; + this.is_role = is_role; + this.__isset.is_role = true; + this.is_group = is_group; + this.__isset.is_group = true; this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_part = new_part; } /** * Performs a deep copy on other. */ - public alter_partition_args(alter_partition_args other) { + public list_roles_args(list_roles_args other) { + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + __isset.is_role = other.__isset.is_role; + this.is_role = other.is_role; + __isset.is_group = other.__isset.is_group; + this.is_group = other.is_group; 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); - } } @Override - public alter_partition_args clone() { - return new alter_partition_args(this); + public list_roles_args clone() { + return new list_roles_args(this); } - 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 String getTbl_name() { - return this.tbl_name; + public boolean isIs_role() { + return this.is_role; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetIs_role() { + this.__isset.is_role = false; } - // 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 is_role is set (has been asigned a value) and false otherwise + public boolean isSetIs_role() { + return this.__isset.is_role; } - public Partition getNew_part() { - return this.new_part; + public boolean isIs_group() { + return this.is_group; } - public void setNew_part(Partition new_part) { - this.new_part = new_part; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; } - public void unsetNew_part() { - this.new_part = null; + public void unsetIs_group() { + this.__isset.is_group = false; } - // 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 is_group is set (has been asigned a value) and false otherwise + public boolean isSetIs_group() { + return this.__isset.is_group; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case DB_NAME: + 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 setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case PRINCIPAL_NAME: + if (value == null) { + unsetPrincipal_name(); + } else { + setPrincipal_name((String)value); + } + break; + + case IS_ROLE: if (value == null) { - unsetDb_name(); + unsetIs_role(); } else { - setDb_name((String)value); + setIs_role((Boolean)value); } break; - case TBL_NAME: + case IS_GROUP: if (value == null) { - unsetTbl_name(); + unsetIs_group(); } else { - setTbl_name((String)value); + setIs_group((Boolean)value); } break; - case NEW_PART: + case DB_NAME: if (value == null) { - unsetNew_part(); + unsetDb_name(); } else { - setNew_part((Partition)value); + setDb_name((String)value); } break; @@ -20928,14 +37296,17 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); + case PRINCIPAL_NAME: + return getPrincipal_name(); - case TBL_NAME: - return getTbl_name(); + case IS_ROLE: + return new Boolean(isIs_role()); - case NEW_PART: - return getNew_part(); + case IS_GROUP: + return new Boolean(isIs_group()); + + case DB_NAME: + return getDb_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -20945,12 +37316,14 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); case DB_NAME: return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_PART: - return isSetNew_part(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -20960,39 +37333,48 @@ 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 list_roles_args) + return this.equals((list_roles_args)that); return false; } - public boolean equals(alter_partition_args that) { + public boolean equals(list_roles_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_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.tbl_name.equals(that.tbl_name)) + if (this.is_role != that.is_role) return false; } - boolean this_present_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_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.new_part.equals(that.new_part)) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) return false; } @@ -21015,24 +37397,32 @@ } switch (field.id) { - case DB_NAME: + case 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 TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case IS_ROLE: + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + this.__isset.is_role = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case NEW_PART: - if (field.type == TType.STRUCT) { - this.new_part = new Partition(); - this.new_part.read(iprot); + case IS_GROUP: + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + this.__isset.is_group = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -21052,51 +37442,52 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); if (this.db_name != null) { oprot.writeFieldBegin(DB_NAME_FIELD_DESC); oprot.writeString(this.db_name); oprot.writeFieldEnd(); } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - 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.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_partition_args("); + StringBuilder sb = new StringBuilder("list_roles_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("null"); - } else { - sb.append(this.tbl_name); - } + sb.append("is_role:"); + sb.append(this.is_role); first = false; if (!first) sb.append(", "); - sb.append("new_part:"); - if (this.new_part == null) { + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.new_part); + sb.append(this.db_name); } first = false; sb.append(")"); @@ -21110,109 +37501,129 @@ } - public static class alter_partition_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("alter_partition_result"); + public static class list_roles_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 List success; + public static final int SUCCESS = 0; + private MetaException o1; public static final int O1 = 1; - private MetaException o2; - public static final int O2 = 2; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Role.class)))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(alter_partition_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_roles_result.class, metaDataMap); } - public alter_partition_result() { + public list_roles_result() { } - public alter_partition_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_partition_result(alter_partition_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); } } @Override - public alter_partition_result clone() { - return new alter_partition_result(this); + public list_roles_result clone() { + return new list_roles_result(this); } - 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 MetaException getO2() { - return this.o2; + public void setSuccess(List success) { + this.success = success; } - public void setO2(MetaException o2) { - this.o2 = o2; + public void unsetSuccess() { + this.success = null; } - public void unsetO2() { - 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; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - 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; @@ -21223,12 +37634,12 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { + case SUCCESS: + return getSuccess(); + case O1: return getO1(); - case O2: - return getO2(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -21237,10 +37648,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { + case SUCCESS: + return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -21250,15 +37661,24 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof alter_partition_result) - return this.equals((alter_partition_result)that); + if (that instanceof list_roles_result) + return this.equals((list_roles_result)that); return false; } - public boolean equals(alter_partition_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) { @@ -21268,15 +37688,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; } @@ -21296,18 +37707,28 @@ } switch (field.id) { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list231 = iprot.readListBegin(); + this.success = new ArrayList(_list231.size); + for (int _i232 = 0; _i232 < _list231.size; ++_i232) + { + Role _elem233; + _elem233 = new Role(); + _elem233.read(iprot); + this.success.add(_elem233); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 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); } @@ -21326,14 +37747,20 @@ 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 _iter234 : this.success) { + _iter234.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(); @@ -21341,22 +37768,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_partition_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(")"); @@ -21370,109 +37797,148 @@ } - 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 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); + public static class list_security_user_grant_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_user_grant_args"); + private static final TField PRINCIPLA_NAME_FIELD_DESC = new TField("principla_name", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)3); - private String name; - public static final int NAME = 1; - private String defaultValue; - public static final int DEFAULTVALUE = 2; + private String principla_name; + public static final int PRINCIPLA_NAME = 1; + private boolean is_role; + public static final int IS_ROLE = 2; + private boolean is_group; + public static final int IS_GROUP = 3; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean is_role = false; + public boolean is_group = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(DEFAULTVALUE, new FieldMetaData("defaultValue", TFieldRequirementType.DEFAULT, + put(PRINCIPLA_NAME, new FieldMetaData("principla_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); + put(IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); }}); static { - FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_user_grant_args.class, metaDataMap); } - public get_config_value_args() { + public list_security_user_grant_args() { } - public get_config_value_args( - String name, - String defaultValue) + public list_security_user_grant_args( + String principla_name, + boolean is_role, + boolean is_group) { this(); - this.name = name; - this.defaultValue = defaultValue; + this.principla_name = principla_name; + this.is_role = is_role; + this.__isset.is_role = true; + this.is_group = is_group; + this.__isset.is_group = true; } /** * 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 list_security_user_grant_args(list_security_user_grant_args other) { + if (other.isSetPrincipla_name()) { + this.principla_name = other.principla_name; } + __isset.is_role = other.__isset.is_role; + this.is_role = other.is_role; + __isset.is_group = other.__isset.is_group; + this.is_group = other.is_group; } @Override - public get_config_value_args clone() { - return new get_config_value_args(this); + public list_security_user_grant_args clone() { + return new list_security_user_grant_args(this); } - public String getName() { - return this.name; + public String getPrincipla_name() { + return this.principla_name; } - public void setName(String name) { - this.name = name; + public void setPrincipla_name(String principla_name) { + this.principla_name = principla_name; } - public void unsetName() { - this.name = null; + public void unsetPrincipla_name() { + this.principla_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 principla_name is set (has been asigned a value) and false otherwise + public boolean isSetPrincipla_name() { + return this.principla_name != null; } - public String getDefaultValue() { - return this.defaultValue; + public boolean isIs_role() { + return this.is_role; } - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - public void unsetDefaultValue() { - this.defaultValue = null; + public void unsetIs_role() { + this.__isset.is_role = false; } - // 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 is_role is set (has been asigned a value) and false otherwise + public boolean isSetIs_role() { + return this.__isset.is_role; + } + + public boolean isIs_group() { + return this.is_group; + } + + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; + } + + public void unsetIs_group() { + this.__isset.is_group = false; + } + + // Returns true if field is_group is set (has been asigned a value) and false otherwise + public boolean isSetIs_group() { + return this.__isset.is_group; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case NAME: + case PRINCIPLA_NAME: if (value == null) { - unsetName(); + unsetPrincipla_name(); } else { - setName((String)value); + setPrincipla_name((String)value); } break; - case DEFAULTVALUE: + case IS_ROLE: if (value == null) { - unsetDefaultValue(); + unsetIs_role(); } else { - setDefaultValue((String)value); + setIs_role((Boolean)value); + } + break; + + case IS_GROUP: + if (value == null) { + unsetIs_group(); + } else { + setIs_group((Boolean)value); } break; @@ -21483,11 +37949,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case NAME: - return getName(); + case PRINCIPLA_NAME: + return getPrincipla_name(); - case DEFAULTVALUE: - return getDefaultValue(); + case IS_ROLE: + return new Boolean(isIs_role()); + + case IS_GROUP: + return new Boolean(isIs_group()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -21497,10 +37966,12 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case NAME: - return isSetName(); - case DEFAULTVALUE: - return isSetDefaultValue(); + case PRINCIPLA_NAME: + return isSetPrincipla_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -21510,30 +37981,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_config_value_args) - return this.equals((get_config_value_args)that); + if (that instanceof list_security_user_grant_args) + return this.equals((list_security_user_grant_args)that); return false; } - public boolean equals(get_config_value_args that) { + public boolean equals(list_security_user_grant_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_principla_name = true && this.isSetPrincipla_name(); + boolean that_present_principla_name = true && that.isSetPrincipla_name(); + if (this_present_principla_name || that_present_principla_name) { + if (!(this_present_principla_name && that_present_principla_name)) + return false; + if (!this.principla_name.equals(that.principla_name)) + return false; + } + + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.name.equals(that.name)) + if (this.is_role != that.is_role) 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_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.defaultValue.equals(that.defaultValue)) + if (this.is_group != that.is_group) return false; } @@ -21556,16 +38036,25 @@ } switch (field.id) { - case NAME: + case PRINCIPLA_NAME: if (field.type == TType.STRING) { - this.name = iprot.readString(); + this.principla_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DEFAULTVALUE: - if (field.type == TType.STRING) { - this.defaultValue = iprot.readString(); + case IS_ROLE: + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + this.__isset.is_role = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case IS_GROUP: + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + this.__isset.is_group = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -21585,39 +38074,40 @@ 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.principla_name != null) { + oprot.writeFieldBegin(PRINCIPLA_NAME_FIELD_DESC); + oprot.writeString(this.principla_name); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_config_value_args("); + StringBuilder sb = new StringBuilder("list_security_user_grant_args("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("principla_name:"); + if (this.principla_name == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.principla_name); } first = false; if (!first) sb.append(", "); - sb.append("defaultValue:"); - if (this.defaultValue == null) { - sb.append("null"); - } else { - sb.append(this.defaultValue); - } + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); first = false; sb.append(")"); return sb.toString(); @@ -21630,14 +38120,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"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); + public static class list_security_user_grant_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_user_grant_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String success; + private List success; public static final int SUCCESS = 0; - private ConfigValSecurityException o1; + private MetaException o1; public static final int O1 = 1; private final Isset __isset = new Isset(); @@ -21646,21 +38136,22 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, SecurityUser.class)))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_config_value_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_user_grant_result.class, metaDataMap); } - public get_config_value_result() { + public list_security_user_grant_result() { } - public get_config_value_result( - String success, - ConfigValSecurityException o1) + public list_security_user_grant_result( + List success, + MetaException o1) { this(); this.success = success; @@ -21670,25 +38161,44 @@ /** * Performs a deep copy on other. */ - public get_config_value_result(get_config_value_result other) { + public list_security_user_grant_result(list_security_user_grant_result other) { if (other.isSetSuccess()) { - this.success = other.success; + List __this__success = new ArrayList(); + for (SecurityUser other_element : other.success) { + __this__success.add(new SecurityUser(other_element)); + } + this.success = __this__success; } if (other.isSetO1()) { - this.o1 = new ConfigValSecurityException(other.o1); + this.o1 = new MetaException(other.o1); } } @Override - public get_config_value_result clone() { - return new get_config_value_result(this); + public list_security_user_grant_result clone() { + return new list_security_user_grant_result(this); } - public String 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(SecurityUser elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { return this.success; } - public void setSuccess(String success) { + public void setSuccess(List success) { this.success = success; } @@ -21701,11 +38211,11 @@ return this.success != null; } - public ConfigValSecurityException getO1() { + public MetaException getO1() { return this.o1; } - public void setO1(ConfigValSecurityException o1) { + public void setO1(MetaException o1) { this.o1 = o1; } @@ -21724,7 +38234,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((String)value); + setSuccess((List)value); } break; @@ -21732,7 +38242,7 @@ if (value == null) { unsetO1(); } else { - setO1((ConfigValSecurityException)value); + setO1((MetaException)value); } break; @@ -21770,12 +38280,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_config_value_result) - return this.equals((get_config_value_result)that); + if (that instanceof list_security_user_grant_result) + return this.equals((list_security_user_grant_result)that); return false; } - public boolean equals(get_config_value_result that) { + public boolean equals(list_security_user_grant_result that) { if (that == null) return false; @@ -21817,15 +38327,26 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.STRING) { - this.success = iprot.readString(); + if (field.type == TType.LIST) { + { + TList _list235 = iprot.readListBegin(); + this.success = new ArrayList(_list235.size); + for (int _i236 = 0; _i236 < _list235.size; ++_i236) + { + SecurityUser _elem237; + _elem237 = new SecurityUser(); + _elem237.read(iprot); + this.success.add(_elem237); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; case O1: if (field.type == TType.STRUCT) { - this.o1 = new ConfigValSecurityException(); + this.o1 = new MetaException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -21847,7 +38368,13 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityUser _iter238 : this.success) { + _iter238.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -21860,7 +38387,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_config_value_result("); + StringBuilder sb = new StringBuilder("list_security_user_grant_result("); boolean first = true; sb.append("success:"); @@ -21887,76 +38414,185 @@ // check that fields of type enum have valid values } - } - - 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 PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); + } + + public static class list_security_db_grant_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_db_grant_args"); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)4); + + private String principal_name; + public static final int PRINCIPAL_NAME = 1; + private boolean is_group; + public static final int IS_GROUP = 2; + private boolean is_role; + public static final int IS_ROLE = 3; + private String db_name; + public static final int DB_NAME = 4; + + private final Isset __isset = new Isset(); + private static final class Isset implements java.io.Serializable { + public boolean is_group = false; + public boolean is_role = false; + } + + public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ + put(PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(list_security_db_grant_args.class, metaDataMap); + } + + public list_security_db_grant_args() { + } + + public list_security_db_grant_args( + String principal_name, + boolean is_group, + boolean is_role, + String db_name) + { + this(); + this.principal_name = principal_name; + this.is_group = is_group; + this.__isset.is_group = true; + this.is_role = is_role; + this.__isset.is_role = true; + this.db_name = db_name; + } + + /** + * Performs a deep copy on other. + */ + public list_security_db_grant_args(list_security_db_grant_args other) { + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + __isset.is_group = other.__isset.is_group; + this.is_group = other.is_group; + __isset.is_role = other.__isset.is_role; + this.is_role = other.is_role; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + } + + @Override + public list_security_db_grant_args clone() { + return new list_security_db_grant_args(this); + } + + 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; + } - private String part_name; - public static final int PART_NAME = 1; + public boolean isIs_group() { + return this.is_group; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + public void unsetIs_group() { + this.__isset.is_group = false; + } - static { - FieldMetaData.addStructMetaDataMap(partition_name_to_vals_args.class, metaDataMap); + // Returns true if field is_group is set (has been asigned a value) and false otherwise + public boolean isSetIs_group() { + return this.__isset.is_group; } - public partition_name_to_vals_args() { + public boolean isIs_role() { + return this.is_role; } - public partition_name_to_vals_args( - String part_name) - { - this(); - this.part_name = part_name; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - /** - * 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 void unsetIs_role() { + this.__isset.is_role = false; } - @Override - public partition_name_to_vals_args clone() { - return new partition_name_to_vals_args(this); + // Returns true if field is_role is set (has been asigned a value) and false otherwise + public boolean isSetIs_role() { + return this.__isset.is_role; } - public String getPart_name() { - return this.part_name; + public String getDb_name() { + return this.db_name; } - public void setPart_name(String part_name) { - this.part_name = part_name; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetPart_name() { - this.part_name = null; + public void unsetDb_name() { + this.db_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 db_name is set (has been asigned a value) and false otherwise + public boolean isSetDb_name() { + return this.db_name != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case PART_NAME: + case PRINCIPAL_NAME: if (value == null) { - unsetPart_name(); + unsetPrincipal_name(); } else { - setPart_name((String)value); + setPrincipal_name((String)value); + } + break; + + case IS_GROUP: + if (value == null) { + unsetIs_group(); + } else { + setIs_group((Boolean)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIs_role(); + } else { + setIs_role((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); } break; @@ -21967,8 +38603,17 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case PART_NAME: - return getPart_name(); + case PRINCIPAL_NAME: + return getPrincipal_name(); + + case IS_GROUP: + return new Boolean(isIs_group()); + + case IS_ROLE: + return new Boolean(isIs_role()); + + case DB_NAME: + return getDb_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -21978,8 +38623,14 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case PART_NAME: - return isSetPart_name(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case IS_GROUP: + return isSetIs_group(); + case IS_ROLE: + return isSetIs_role(); + case DB_NAME: + return isSetDb_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -21989,21 +38640,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof partition_name_to_vals_args) - return this.equals((partition_name_to_vals_args)that); + if (that instanceof list_security_db_grant_args) + return this.equals((list_security_db_grant_args)that); return false; } - public boolean equals(partition_name_to_vals_args that) { + public boolean equals(list_security_db_grant_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_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.part_name.equals(that.part_name)) + if (!this.principal_name.equals(that.principal_name)) + return false; + } + + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) + return false; + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) + return false; + if (this.is_role != that.is_role) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) return false; } @@ -22026,9 +38704,32 @@ } switch (field.id) { - case PART_NAME: + case PRINCIPAL_NAME: if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + this.principal_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case IS_GROUP: + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + this.__isset.is_group = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case IS_ROLE: + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + this.__isset.is_role = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -22048,9 +38749,20 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -22059,14 +38771,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_vals_args("); + StringBuilder sb = new StringBuilder("list_security_db_grant_args("); boolean first = true; - sb.append("part_name:"); - if (this.part_name == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.part_name); + sb.append(this.principal_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { + sb.append("null"); + } else { + sb.append(this.db_name); } first = false; sb.append(")"); @@ -22080,12 +38808,12 @@ } - public static class partition_name_to_vals_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_vals_result"); + public static class list_security_db_grant_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_db_grant_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 List success; public static final int SUCCESS = 0; private MetaException o1; public static final int O1 = 1; @@ -22097,20 +38825,20 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); + new StructMetaData(TType.STRUCT, SecurityDB.class)))); put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_db_grant_result.class, metaDataMap); } - public partition_name_to_vals_result() { + public list_security_db_grant_result() { } - public partition_name_to_vals_result( - List success, + public list_security_db_grant_result( + List success, MetaException o1) { this(); @@ -22121,11 +38849,11 @@ /** * Performs a deep copy on other. */ - public partition_name_to_vals_result(partition_name_to_vals_result other) { + public list_security_db_grant_result(list_security_db_grant_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 (SecurityDB other_element : other.success) { + __this__success.add(new SecurityDB(other_element)); } this.success = __this__success; } @@ -22135,30 +38863,30 @@ } @Override - public partition_name_to_vals_result clone() { - return new partition_name_to_vals_result(this); + public list_security_db_grant_result clone() { + return new list_security_db_grant_result(this); } 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(SecurityDB 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; } @@ -22194,7 +38922,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -22240,12 +38968,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof partition_name_to_vals_result) - return this.equals((partition_name_to_vals_result)that); + if (that instanceof list_security_db_grant_result) + return this.equals((list_security_db_grant_result)that); return false; } - public boolean equals(partition_name_to_vals_result that) { + public boolean equals(list_security_db_grant_result that) { if (that == null) return false; @@ -22289,13 +39017,14 @@ case SUCCESS: if (field.type == TType.LIST) { { - TList _list127 = iprot.readListBegin(); - this.success = new ArrayList(_list127.size); - for (int _i128 = 0; _i128 < _list127.size; ++_i128) + TList _list239 = iprot.readListBegin(); + this.success = new ArrayList(_list239.size); + for (int _i240 = 0; _i240 < _list239.size; ++_i240) { - String _elem129; - _elem129 = iprot.readString(); - this.success.add(_elem129); + SecurityDB _elem241; + _elem241 = new SecurityDB(); + _elem241.read(iprot); + this.success.add(_elem241); } iprot.readListEnd(); } @@ -22328,9 +39057,9 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter130 : this.success) { - oprot.writeString(_iter130); + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityDB _iter242 : this.success) { + _iter242.write(oprot); } oprot.writeListEnd(); } @@ -22346,7 +39075,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_vals_result("); + StringBuilder sb = new StringBuilder("list_security_db_grant_result("); boolean first = true; sb.append("success:"); @@ -22375,325 +39104,218 @@ } - public static class partition_name_to_spec_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_spec_args"); - private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); + public static class list_security_table_grant_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_table_grant_args"); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)4); + private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)5); - private String part_name; - public static final int PART_NAME = 1; + private String principal_name; + public static final int PRINCIPAL_NAME = 1; + private boolean is_group; + public static final int IS_GROUP = 2; + private boolean is_role; + public static final int IS_ROLE = 3; + private String db_name; + public static final int DB_NAME = 4; + private String table_name; + public static final int TABLE_NAME = 5; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean is_group = false; + public boolean is_role = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + put(PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(partition_name_to_spec_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_table_grant_args.class, metaDataMap); } - public partition_name_to_spec_args() { + public list_security_table_grant_args() { } - public partition_name_to_spec_args( - String part_name) + public list_security_table_grant_args( + String principal_name, + boolean is_group, + boolean is_role, + String db_name, + String table_name) { this(); - this.part_name = part_name; + this.principal_name = principal_name; + this.is_group = is_group; + this.__isset.is_group = true; + this.is_role = is_role; + this.__isset.is_role = true; + this.db_name = db_name; + this.table_name = table_name; } /** * 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; - } - } - - @Override - public partition_name_to_spec_args clone() { - return new partition_name_to_spec_args(this); - } - - 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 setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case PART_NAME: - if (value == null) { - unsetPart_name(); - } else { - setPart_name((String)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case PART_NAME: - return getPart_name(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case PART_NAME: - return isSetPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - 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); - return false; - } - - public boolean equals(partition_name_to_spec_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)) - return false; - if (!this.part_name.equals(that.part_name)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - 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 PART_NAME: - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); - 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) { - sb.append("null"); - } else { - sb.append(this.part_name); + public list_security_table_grant_args(list_security_table_grant_args other) { + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - - } - - 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.MAP, (short)0); - private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - - private Map success; - public static final int SUCCESS = 0; - private MetaException o1; - public static final int O1 = 1; + __isset.is_group = other.__isset.is_group; + this.is_group = other.is_group; + __isset.is_role = other.__isset.is_role; + this.is_role = other.is_role; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + @Override + public list_security_table_grant_args clone() { + return new list_security_table_grant_args(this); } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); + public String getPrincipal_name() { + return this.principal_name; + } - static { - FieldMetaData.addStructMetaDataMap(partition_name_to_spec_result.class, metaDataMap); + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; } - public partition_name_to_spec_result() { + public void unsetPrincipal_name() { + this.principal_name = null; } - public partition_name_to_spec_result( - Map success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; + // 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; } - /** - * Performs a deep copy on other. - */ - public partition_name_to_spec_result(partition_name_to_spec_result other) { - if (other.isSetSuccess()) { - Map __this__success = new HashMap(); - for (Map.Entry other_element : other.success.entrySet()) { + public boolean isIs_group() { + return this.is_group; + } - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; + } - String __this__success_copy_key = other_element_key; + public void unsetIs_group() { + this.__isset.is_group = false; + } - String __this__success_copy_value = other_element_value; + // Returns true if field is_group is set (has been asigned a value) and false otherwise + public boolean isSetIs_group() { + return this.__isset.is_group; + } - __this__success.put(__this__success_copy_key, __this__success_copy_value); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); - } + public boolean isIs_role() { + return this.is_role; } - @Override - public partition_name_to_spec_result clone() { - return new partition_name_to_spec_result(this); + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public void unsetIs_role() { + this.__isset.is_role = false; } - public void putToSuccess(String key, String val) { - if (this.success == null) { - this.success = new HashMap(); - } - this.success.put(key, val); + // Returns true if field is_role is set (has been asigned a value) and false otherwise + public boolean isSetIs_role() { + return this.__isset.is_role; } - public Map getSuccess() { - return this.success; + public String getDb_name() { + return this.db_name; } - public void setSuccess(Map success) { - this.success = success; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetSuccess() { - this.success = null; + public void unsetDb_name() { + this.db_name = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; + // Returns true if field db_name is set (has been asigned a value) and false otherwise + public boolean isSetDb_name() { + return this.db_name != null; } - public MetaException getO1() { - return this.o1; + public String getTable_name() { + return this.table_name; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setTable_name(String table_name) { + this.table_name = table_name; } - public void unsetO1() { - this.o1 = null; + public void unsetTable_name() { + this.table_name = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + // Returns true if field table_name is set (has been asigned a value) and false otherwise + public boolean isSetTable_name() { + return this.table_name != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case SUCCESS: + case PRINCIPAL_NAME: if (value == null) { - unsetSuccess(); + unsetPrincipal_name(); } else { - setSuccess((Map)value); + setPrincipal_name((String)value); } break; - case O1: + case IS_GROUP: if (value == null) { - unsetO1(); + unsetIs_group(); } else { - setO1((MetaException)value); + setIs_group((Boolean)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIs_role(); + } else { + setIs_role((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); } break; @@ -22704,11 +39326,20 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case SUCCESS: - return getSuccess(); + case PRINCIPAL_NAME: + return getPrincipal_name(); - case O1: - return getO1(); + case IS_GROUP: + return new Boolean(isIs_group()); + + case IS_ROLE: + return new Boolean(isIs_role()); + + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -22718,10 +39349,16 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case IS_GROUP: + return isSetIs_group(); + case IS_ROLE: + return isSetIs_role(); + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -22731,30 +39368,57 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof partition_name_to_spec_result) - return this.equals((partition_name_to_spec_result)that); + if (that instanceof list_security_table_grant_args) + return this.equals((list_security_table_grant_args)that); return false; } - public boolean equals(partition_name_to_spec_result that) { + public boolean equals(list_security_table_grant_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) return false; - if (!this.success.equals(that.success)) + if (!this.principal_name.equals(that.principal_name)) return false; } - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) + return false; + if (this.is_role != that.is_role) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) return false; } @@ -22776,30 +39440,40 @@ break; } switch (field.id) - { - case SUCCESS: - if (field.type == TType.MAP) { - { - TMap _map131 = iprot.readMapBegin(); - this.success = new HashMap(2*_map131.size); - for (int _i132 = 0; _i132 < _map131.size; ++_i132) - { - String _key133; - String _val134; - _key133 = iprot.readString(); - _val134 = iprot.readString(); - this.success.put(_key133, _val134); - } - iprot.readMapEnd(); - } + { + case PRINCIPAL_NAME: + if (field.type == TType.STRING) { + this.principal_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case IS_GROUP: + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + this.__isset.is_group = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case IS_ROLE: + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + this.__isset.is_role = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TABLE_NAME: + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -22816,22 +39490,28 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size())); - for (Map.Entry _iter135 : this.success.entrySet()) { - oprot.writeString(_iter135.getKey()); - oprot.writeString(_iter135.getValue()); - } - oprot.writeMapEnd(); - } + oprot.writeStructBegin(STRUCT_DESC); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -22840,22 +39520,38 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_spec_result("); + StringBuilder sb = new StringBuilder("list_security_table_grant_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); } first = false; sb.append(")"); @@ -22869,109 +39565,129 @@ } - 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 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); + public static class list_security_table_grant_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_table_grant_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private Index new_index; - public static final int NEW_INDEX = 1; - private Table index_table; - public static final int INDEX_TABLE = 2; + private List success; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NEW_INDEX, new FieldMetaData("new_index", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); - put(INDEX_TABLE, new FieldMetaData("index_table", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, SecurityTablePartition.class)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_table_grant_result.class, metaDataMap); } - public add_index_args() { + public list_security_table_grant_result() { } - public add_index_args( - Index new_index, - Table index_table) + public list_security_table_grant_result( + List success, + MetaException o1) { this(); - this.new_index = new_index; - this.index_table = index_table; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public add_index_args(add_index_args other) { - if (other.isSetNew_index()) { - this.new_index = new Index(other.new_index); + public list_security_table_grant_result(list_security_table_grant_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (SecurityTablePartition other_element : other.success) { + __this__success.add(new SecurityTablePartition(other_element)); + } + this.success = __this__success; } - if (other.isSetIndex_table()) { - this.index_table = new Table(other.index_table); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } @Override - public add_index_args clone() { - return new add_index_args(this); + public list_security_table_grant_result clone() { + return new list_security_table_grant_result(this); } - public Index getNew_index() { - return this.new_index; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setNew_index(Index new_index) { - this.new_index = new_index; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetNew_index() { - this.new_index = null; + public void addToSuccess(SecurityTablePartition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - // Returns true if field new_index is set (has been asigned a value) and false otherwise - public boolean isSetNew_index() { - return this.new_index != null; + public List getSuccess() { + return this.success; } - public Table getIndex_table() { - return this.index_table; + public void setSuccess(List success) { + this.success = success; } - public void setIndex_table(Table index_table) { - this.index_table = index_table; + public void unsetSuccess() { + this.success = null; } - public void unsetIndex_table() { - this.index_table = 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 index_table is set (has been asigned a value) and false otherwise - public boolean isSetIndex_table() { - return this.index_table != 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case NEW_INDEX: + case SUCCESS: if (value == null) { - unsetNew_index(); + unsetSuccess(); } else { - setNew_index((Index)value); + setSuccess((List)value); } break; - case INDEX_TABLE: + case O1: if (value == null) { - unsetIndex_table(); + unsetO1(); } else { - setIndex_table((Table)value); + setO1((MetaException)value); } break; @@ -22982,11 +39698,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case NEW_INDEX: - return getNew_index(); + case SUCCESS: + return getSuccess(); - case INDEX_TABLE: - return getIndex_table(); + case O1: + return getO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -22996,10 +39712,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case NEW_INDEX: - return isSetNew_index(); - case INDEX_TABLE: - return isSetIndex_table(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -23009,30 +39725,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof add_index_args) - return this.equals((add_index_args)that); + if (that instanceof list_security_table_grant_result) + return this.equals((list_security_table_grant_result)that); return false; } - public boolean equals(add_index_args that) { + public boolean equals(list_security_table_grant_result that) { if (that == null) return false; - boolean this_present_new_index = true && this.isSetNew_index(); - boolean that_present_new_index = true && that.isSetNew_index(); - if (this_present_new_index || that_present_new_index) { - if (!(this_present_new_index && that_present_new_index)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.new_index.equals(that.new_index)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_index_table = true && this.isSetIndex_table(); - boolean that_present_index_table = true && that.isSetIndex_table(); - if (this_present_index_table || that_present_index_table) { - if (!(this_present_index_table && that_present_index_table)) + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) return false; - if (!this.index_table.equals(that.index_table)) + if (!this.o1.equals(that.o1)) return false; } @@ -23055,18 +39771,28 @@ } switch (field.id) { - case NEW_INDEX: - if (field.type == TType.STRUCT) { - this.new_index = new Index(); - this.new_index.read(iprot); + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list243 = iprot.readListBegin(); + this.success = new ArrayList(_list243.size); + for (int _i244 = 0; _i244 < _list243.size; ++_i244) + { + SecurityTablePartition _elem245; + _elem245 = new SecurityTablePartition(); + _elem245.read(iprot); + this.success.add(_elem245); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case INDEX_TABLE: + case O1: if (field.type == TType.STRUCT) { - this.index_table = new Table(); - this.index_table.read(iprot); + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -23083,17 +39809,21 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.new_index != null) { - oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); - this.new_index.write(oprot); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityTablePartition _iter246 : this.success) { + _iter246.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); - } - if (this.index_table != null) { - oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); - this.index_table.write(oprot); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -23102,22 +39832,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_index_args("); + StringBuilder sb = new StringBuilder("list_security_table_grant_result("); boolean first = true; - sb.append("new_index:"); - if (this.new_index == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.new_index); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("index_table:"); - if (this.index_table == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.index_table); + sb.append(this.o1); } first = false; sb.append(")"); @@ -23131,179 +39861,253 @@ } - 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.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); + public static class list_security_partition_grant_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_partition_grant_args"); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)4); + private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)5); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)6); - private Index success; - public static final int SUCCESS = 0; - private InvalidObjectException o1; - public static final int O1 = 1; - private AlreadyExistsException o2; - public static final int O2 = 2; - private MetaException o3; - public static final int O3 = 3; + private String principal_name; + public static final int PRINCIPAL_NAME = 1; + private boolean is_group; + public static final int IS_GROUP = 2; + private boolean is_role; + public static final int IS_ROLE = 3; + private String db_name; + public static final int DB_NAME = 4; + private String table_name; + public static final int TABLE_NAME = 5; + private String part_name; + public static final int PART_NAME = 6; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean is_group = false; + public boolean is_role = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + put(PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_partition_grant_args.class, metaDataMap); } - public add_index_result() { + public list_security_partition_grant_args() { } - public add_index_result( - Index success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public list_security_partition_grant_args( + String principal_name, + boolean is_group, + boolean is_role, + String db_name, + String table_name, + String part_name) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; - this.o3 = o3; + this.principal_name = principal_name; + this.is_group = is_group; + this.__isset.is_group = true; + this.is_role = is_role; + this.__isset.is_role = true; + this.db_name = db_name; + this.table_name = table_name; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public add_index_result(add_index_result other) { - if (other.isSetSuccess()) { - this.success = new Index(other.success); + public list_security_partition_grant_args(list_security_partition_grant_args other) { + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; } - if (other.isSetO1()) { - this.o1 = new InvalidObjectException(other.o1); + __isset.is_group = other.__isset.is_group; + this.is_group = other.is_group; + __isset.is_role = other.__isset.is_role; + this.is_role = other.is_role; + if (other.isSetDb_name()) { + this.db_name = other.db_name; } - if (other.isSetO2()) { - this.o2 = new AlreadyExistsException(other.o2); + if (other.isSetTable_name()) { + this.table_name = other.table_name; } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetPart_name()) { + this.part_name = other.part_name; } } @Override - public add_index_result clone() { - return new add_index_result(this); + public list_security_partition_grant_args clone() { + return new list_security_partition_grant_args(this); } - public Index getSuccess() { - return this.success; + public String getPrincipal_name() { + return this.principal_name; } - public void setSuccess(Index success) { - this.success = success; + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; } - public void unsetSuccess() { - this.success = null; + public void unsetPrincipal_name() { + this.principal_name = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; + // Returns true if field principal_name is set (has been asigned a value) and false otherwise + public boolean isSetPrincipal_name() { + return this.principal_name != null; } - public InvalidObjectException getO1() { - return this.o1; + public boolean isIs_group() { + return this.is_group; } - public void setO1(InvalidObjectException o1) { - this.o1 = o1; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; } - public void unsetO1() { - this.o1 = null; + public void unsetIs_group() { + this.__isset.is_group = false; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + // Returns true if field is_group is set (has been asigned a value) and false otherwise + public boolean isSetIs_group() { + return this.__isset.is_group; } - public AlreadyExistsException getO2() { - return this.o2; + public boolean isIs_role() { + return this.is_role; } - public void setO2(AlreadyExistsException o2) { - this.o2 = o2; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - public void unsetO2() { - this.o2 = null; + public void unsetIs_role() { + this.__isset.is_role = false; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; + // Returns true if field is_role is set (has been asigned a value) and false otherwise + public boolean isSetIs_role() { + return this.__isset.is_role; } - public MetaException getO3() { - return this.o3; + public String getDb_name() { + return this.db_name; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetO3() { - this.o3 = null; + 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 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 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 o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; + // Returns true if field part_name is set (has been asigned a value) and false otherwise + public boolean isSetPart_name() { + return this.part_name != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case SUCCESS: + case PRINCIPAL_NAME: if (value == null) { - unsetSuccess(); + unsetPrincipal_name(); } else { - setSuccess((Index)value); + setPrincipal_name((String)value); } break; - case O1: + case IS_GROUP: if (value == null) { - unsetO1(); + unsetIs_group(); } else { - setO1((InvalidObjectException)value); + setIs_group((Boolean)value); } break; - case O2: + case IS_ROLE: if (value == null) { - unsetO2(); + unsetIs_role(); } else { - setO2((AlreadyExistsException)value); + setIs_role((Boolean)value); } break; - case O3: + case DB_NAME: if (value == null) { - unsetO3(); + unsetDb_name(); } else { - setO3((MetaException)value); + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); } break; @@ -23314,17 +40118,23 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case SUCCESS: - return getSuccess(); + case PRINCIPAL_NAME: + return getPrincipal_name(); - case O1: - return getO1(); + case IS_GROUP: + return new Boolean(isIs_group()); - case O2: - return getO2(); + case IS_ROLE: + return new Boolean(isIs_role()); - case O3: - return getO3(); + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + case PART_NAME: + return getPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -23334,14 +40144,18 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case IS_GROUP: + return isSetIs_group(); + case IS_ROLE: + return isSetIs_role(); + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + case PART_NAME: + return isSetPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -23351,48 +40165,66 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof add_index_result) - return this.equals((add_index_result)that); + if (that instanceof list_security_partition_grant_args) + return this.equals((list_security_partition_grant_args)that); return false; } - public boolean equals(add_index_result that) { + public boolean equals(list_security_partition_grant_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) return false; - if (!this.success.equals(that.success)) + if (!this.principal_name.equals(that.principal_name)) return false; } - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_group != that.is_group) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.o2.equals(that.o2)) + if (this.is_role != that.is_role) return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.o3.equals(that.o3)) + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) return false; } @@ -23415,34 +40247,46 @@ } switch (field.id) { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); + case PRINCIPAL_NAME: + if (field.type == TType.STRING) { + this.principal_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new InvalidObjectException(); - this.o1.read(iprot); + case IS_GROUP: + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + this.__isset.is_group = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new AlreadyExistsException(); - this.o2.read(iprot); + case IS_ROLE: + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + this.__isset.is_role = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case O3: - if (field.type == TType.STRUCT) { - this.o3 = new MetaException(); - this.o3.read(iprot); + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TABLE_NAME: + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PART_NAME: + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -23459,23 +40303,33 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -23484,38 +40338,46 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_index_result("); + StringBuilder sb = new StringBuilder("list_security_partition_grant_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.db_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("table_name:"); + if (this.table_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.table_name); } first = false; if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { + sb.append("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.part_name); } first = false; sb.append(")"); @@ -23529,179 +40391,129 @@ } - 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 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); + public static class list_security_partition_grant_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_partition_grant_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String dbname; - public static final int DBNAME = 1; - private String base_tbl_name; - public static final int BASE_TBL_NAME = 2; - private String idx_name; - public static final int IDX_NAME = 3; - private Index new_idx; - public static final int NEW_IDX = 4; + private List success; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(BASE_TBL_NAME, new FieldMetaData("base_tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(IDX_NAME, new FieldMetaData("idx_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(NEW_IDX, new FieldMetaData("new_idx", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, SecurityTablePartition.class)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(alter_index_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_partition_grant_result.class, metaDataMap); } - public alter_index_args() { + public list_security_partition_grant_result() { } - public alter_index_args( - String dbname, - String base_tbl_name, - String idx_name, - Index new_idx) + public list_security_partition_grant_result( + List success, + MetaException o1) { this(); - this.dbname = dbname; - this.base_tbl_name = base_tbl_name; - this.idx_name = idx_name; - this.new_idx = new_idx; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public alter_index_args(alter_index_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } - if (other.isSetBase_tbl_name()) { - this.base_tbl_name = other.base_tbl_name; - } - if (other.isSetIdx_name()) { - this.idx_name = other.idx_name; + public list_security_partition_grant_result(list_security_partition_grant_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (SecurityTablePartition other_element : other.success) { + __this__success.add(new SecurityTablePartition(other_element)); + } + this.success = __this__success; } - if (other.isSetNew_idx()) { - this.new_idx = new Index(other.new_idx); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } @Override - public alter_index_args clone() { - return new alter_index_args(this); - } - - 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 String getBase_tbl_name() { - return this.base_tbl_name; + public list_security_partition_grant_result clone() { + return new list_security_partition_grant_result(this); } - public void setBase_tbl_name(String base_tbl_name) { - this.base_tbl_name = base_tbl_name; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void unsetBase_tbl_name() { - this.base_tbl_name = null; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - // 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 addToSuccess(SecurityTablePartition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - public String getIdx_name() { - return this.idx_name; + public List getSuccess() { + return this.success; } - public void setIdx_name(String idx_name) { - this.idx_name = idx_name; + public void setSuccess(List success) { + this.success = success; } - public void unsetIdx_name() { - this.idx_name = null; + public void unsetSuccess() { + this.success = null; } - // Returns true if field idx_name is set (has been asigned a value) and false otherwise - public boolean isSetIdx_name() { - return this.idx_name != null; + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.success != null; } - public Index getNew_idx() { - return this.new_idx; + public MetaException getO1() { + return this.o1; } - public void setNew_idx(Index new_idx) { - this.new_idx = new_idx; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetNew_idx() { - this.new_idx = null; + public void unsetO1() { + this.o1 = null; } - // Returns true if field new_idx is set (has been asigned a value) and false otherwise - public boolean isSetNew_idx() { - return this.new_idx != null; + // Returns true if field o1 is set (has been asigned a value) and false otherwise + public boolean isSetO1() { + return this.o1 != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - - case BASE_TBL_NAME: - if (value == null) { - unsetBase_tbl_name(); - } else { - setBase_tbl_name((String)value); - } - break; - - case IDX_NAME: + case SUCCESS: if (value == null) { - unsetIdx_name(); + unsetSuccess(); } else { - setIdx_name((String)value); + setSuccess((List)value); } break; - case NEW_IDX: + case O1: if (value == null) { - unsetNew_idx(); + unsetO1(); } else { - setNew_idx((Index)value); + setO1((MetaException)value); } break; @@ -23712,17 +40524,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DBNAME: - return getDbname(); - - case BASE_TBL_NAME: - return getBase_tbl_name(); - - case IDX_NAME: - return getIdx_name(); + case SUCCESS: + return getSuccess(); - case NEW_IDX: - return getNew_idx(); + case O1: + return getO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -23732,14 +40538,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case DBNAME: - return isSetDbname(); - case BASE_TBL_NAME: - return isSetBase_tbl_name(); - case IDX_NAME: - return isSetIdx_name(); - case NEW_IDX: - return isSetNew_idx(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -23749,48 +40551,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_security_partition_grant_result) + return this.equals((list_security_partition_grant_result)that); return false; } - public boolean equals(alter_index_args that) { + public boolean equals(list_security_partition_grant_result that) { if (that == null) return false; - boolean this_present_dbname = true && this.isSetDbname(); - boolean that_present_dbname = true && that.isSetDbname(); - if (this_present_dbname || that_present_dbname) { - if (!(this_present_dbname && that_present_dbname)) - return false; - if (!this.dbname.equals(that.dbname)) - return false; - } - - boolean this_present_base_tbl_name = true && this.isSetBase_tbl_name(); - boolean that_present_base_tbl_name = true && that.isSetBase_tbl_name(); - if (this_present_base_tbl_name || that_present_base_tbl_name) { - if (!(this_present_base_tbl_name && that_present_base_tbl_name)) - return false; - if (!this.base_tbl_name.equals(that.base_tbl_name)) - return false; - } - - boolean this_present_idx_name = true && this.isSetIdx_name(); - boolean that_present_idx_name = true && that.isSetIdx_name(); - if (this_present_idx_name || that_present_idx_name) { - if (!(this_present_idx_name && that_present_idx_name)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.idx_name.equals(that.idx_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_new_idx = true && this.isSetNew_idx(); - boolean that_present_new_idx = true && that.isSetNew_idx(); - if (this_present_new_idx || that_present_new_idx) { - if (!(this_present_new_idx && that_present_new_idx)) + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) return false; - if (!this.new_idx.equals(that.new_idx)) + if (!this.o1.equals(that.o1)) return false; } @@ -23812,32 +40596,29 @@ break; } switch (field.id) - { - case DBNAME: - if (field.type == TType.STRING) { - this.dbname = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case BASE_TBL_NAME: - if (field.type == TType.STRING) { - this.base_tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case IDX_NAME: - if (field.type == TType.STRING) { - this.idx_name = iprot.readString(); + { + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list247 = iprot.readListBegin(); + this.success = new ArrayList(_list247.size); + for (int _i248 = 0; _i248 < _list247.size; ++_i248) + { + SecurityTablePartition _elem249; + _elem249 = new SecurityTablePartition(); + _elem249.read(iprot); + this.success.add(_elem249); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case NEW_IDX: + case O1: if (field.type == TType.STRUCT) { - this.new_idx = new Index(); - this.new_idx.read(iprot); + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -23854,27 +40635,21 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); - oprot.writeFieldEnd(); - } - if (this.base_tbl_name != null) { - oprot.writeFieldBegin(BASE_TBL_NAME_FIELD_DESC); - oprot.writeString(this.base_tbl_name); - oprot.writeFieldEnd(); - } - if (this.idx_name != null) { - oprot.writeFieldBegin(IDX_NAME_FIELD_DESC); - oprot.writeString(this.idx_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityTablePartition _iter250 : this.success) { + _iter250.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); - } - if (this.new_idx != null) { - oprot.writeFieldBegin(NEW_IDX_FIELD_DESC); - this.new_idx.write(oprot); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -23883,38 +40658,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_index_args("); + StringBuilder sb = new StringBuilder("list_security_partition_grant_result("); boolean first = true; - sb.append("dbname:"); - if (this.dbname == null) { - sb.append("null"); - } else { - sb.append(this.dbname); - } - first = false; - if (!first) sb.append(", "); - sb.append("base_tbl_name:"); - if (this.base_tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.base_tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("idx_name:"); - if (this.idx_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.idx_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("new_idx:"); - if (this.new_idx == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.new_idx); + sb.append(this.o1); } first = false; sb.append(")"); @@ -23928,109 +40687,288 @@ } - 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 O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); + public static class list_security_column_grant_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_column_grant_args"); + private static final TField PRINCIPAL_NAME_FIELD_DESC = new TField("principal_name", TType.STRING, (short)1); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)2); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)3); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)4); + private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)5); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)6); + private static final TField COLUMN_NAME_FIELD_DESC = new TField("column_name", TType.STRING, (short)7); - private InvalidOperationException o1; - public static final int O1 = 1; - private MetaException o2; - public static final int O2 = 2; + private String principal_name; + public static final int PRINCIPAL_NAME = 1; + private boolean is_group; + public static final int IS_GROUP = 2; + private boolean is_role; + public static final int IS_ROLE = 3; + private String db_name; + public static final int DB_NAME = 4; + private String table_name; + public static final int TABLE_NAME = 5; + private String part_name; + public static final int PART_NAME = 6; + private String column_name; + public static final int COLUMN_NAME = 7; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean is_group = false; + public boolean is_role = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + put(PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(COLUMN_NAME, new FieldMetaData("column_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(alter_index_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_column_grant_args.class, metaDataMap); } - public alter_index_result() { + public list_security_column_grant_args() { } - public alter_index_result( - InvalidOperationException o1, - MetaException o2) + public list_security_column_grant_args( + String principal_name, + boolean is_group, + boolean is_role, + String db_name, + String table_name, + String part_name, + String column_name) { this(); - this.o1 = o1; - this.o2 = o2; + this.principal_name = principal_name; + this.is_group = is_group; + this.__isset.is_group = true; + this.is_role = is_role; + this.__isset.is_role = true; + this.db_name = db_name; + this.table_name = table_name; + this.part_name = part_name; + this.column_name = column_name; + } + + /** + * Performs a deep copy on other. + */ + public list_security_column_grant_args(list_security_column_grant_args other) { + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; + } + __isset.is_group = other.__isset.is_group; + this.is_group = other.is_group; + __isset.is_role = other.__isset.is_role; + this.is_role = other.is_role; + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTable_name()) { + this.table_name = other.table_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; + } + if (other.isSetColumn_name()) { + this.column_name = other.column_name; + } + } + + @Override + public list_security_column_grant_args clone() { + return new list_security_column_grant_args(this); + } + + 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 boolean isIs_group() { + return this.is_group; + } + + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; + } + + public void unsetIs_group() { + this.__isset.is_group = false; + } + + // Returns true if field is_group is set (has been asigned a value) and false otherwise + public boolean isSetIs_group() { + return this.__isset.is_group; + } + + public boolean isIs_role() { + return this.is_role; + } + + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; + } + + public void unsetIs_role() { + this.__isset.is_role = false; + } + + // Returns true if field is_role is set (has been asigned a value) and false otherwise + public boolean isSetIs_role() { + return this.__isset.is_role; + } + + 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 String getTable_name() { + return this.table_name; + } + + public void setTable_name(String table_name) { + this.table_name = table_name; } - /** - * Performs a deep copy on other. - */ - public alter_index_result(alter_index_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } + public void unsetTable_name() { + this.table_name = null; } - @Override - public alter_index_result clone() { - return new alter_index_result(this); + // 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 InvalidOperationException getO1() { - return this.o1; + public String getPart_name() { + return this.part_name; } - public void setO1(InvalidOperationException o1) { - this.o1 = o1; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetO1() { - this.o1 = null; + public void unsetPart_name() { + this.part_name = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + // Returns true if field part_name is set (has been asigned a value) and false otherwise + public boolean isSetPart_name() { + return this.part_name != null; } - public MetaException getO2() { - return this.o2; + public String getColumn_name() { + return this.column_name; } - public void setO2(MetaException o2) { - this.o2 = o2; + public void setColumn_name(String column_name) { + this.column_name = column_name; } - public void unsetO2() { - this.o2 = null; + public void unsetColumn_name() { + this.column_name = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; + // Returns true if field column_name is set (has been asigned a value) and false otherwise + public boolean isSetColumn_name() { + return this.column_name != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case O1: + case PRINCIPAL_NAME: if (value == null) { - unsetO1(); + unsetPrincipal_name(); } else { - setO1((InvalidOperationException)value); + setPrincipal_name((String)value); } break; - case O2: + case IS_GROUP: if (value == null) { - unsetO2(); + unsetIs_group(); } else { - setO2((MetaException)value); + setIs_group((Boolean)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIs_role(); + } else { + setIs_role((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + case COLUMN_NAME: + if (value == null) { + unsetColumn_name(); + } else { + setColumn_name((String)value); } break; @@ -24041,11 +40979,26 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case O1: - return getO1(); + case PRINCIPAL_NAME: + return getPrincipal_name(); - case O2: - return getO2(); + case IS_GROUP: + return new Boolean(isIs_group()); + + case IS_ROLE: + return new Boolean(isIs_role()); + + case DB_NAME: + return getDb_name(); + + case TABLE_NAME: + return getTable_name(); + + case PART_NAME: + return getPart_name(); + + case COLUMN_NAME: + return getColumn_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -24055,10 +41008,20 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case PRINCIPAL_NAME: + return isSetPrincipal_name(); + case IS_GROUP: + return isSetIs_group(); + case IS_ROLE: + return isSetIs_role(); + case DB_NAME: + return isSetDb_name(); + case TABLE_NAME: + return isSetTable_name(); + case PART_NAME: + return isSetPart_name(); + case COLUMN_NAME: + return isSetColumn_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -24068,30 +41031,75 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof alter_index_result) - return this.equals((alter_index_result)that); + if (that instanceof list_security_column_grant_args) + return this.equals((list_security_column_grant_args)that); return false; } - public boolean equals(alter_index_result that) { + public boolean equals(list_security_column_grant_args that) { if (that == null) return false; - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) + boolean this_present_principal_name = true && this.isSetPrincipal_name(); + boolean that_present_principal_name = true && that.isSetPrincipal_name(); + if (this_present_principal_name || that_present_principal_name) { + if (!(this_present_principal_name && that_present_principal_name)) return false; - if (!this.o1.equals(that.o1)) + if (!this.principal_name.equals(that.principal_name)) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o2.equals(that.o2)) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) + return false; + if (this.is_role != that.is_role) + return false; + } + + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) + return false; + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) + return false; + } + + boolean this_present_part_name = true && this.isSetPart_name(); + boolean that_present_part_name = true && that.isSetPart_name(); + if (this_present_part_name || that_present_part_name) { + if (!(this_present_part_name && that_present_part_name)) + return false; + if (!this.part_name.equals(that.part_name)) + return false; + } + + boolean this_present_column_name = true && this.isSetColumn_name(); + boolean that_present_column_name = true && that.isSetColumn_name(); + if (this_present_column_name || that_present_column_name) { + if (!(this_present_column_name && that_present_column_name)) + return false; + if (!this.column_name.equals(that.column_name)) return false; } @@ -24114,18 +41122,53 @@ } switch (field.id) { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new InvalidOperationException(); - this.o1.read(iprot); + case PRINCIPAL_NAME: + if (field.type == TType.STRING) { + this.principal_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: - if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + case IS_GROUP: + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + this.__isset.is_group = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case IS_ROLE: + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + this.__isset.is_role = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DB_NAME: + if (field.type == TType.STRING) { + this.db_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TABLE_NAME: + if (field.type == TType.STRING) { + this.table_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PART_NAME: + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case COLUMN_NAME: + if (field.type == TType.STRING) { + this.column_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -24142,15 +41185,38 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); + oprot.writeFieldEnd(); + } + if (this.column_name != null) { + oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); + oprot.writeString(this.column_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -24159,22 +41225,54 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_index_result("); + StringBuilder sb = new StringBuilder("list_security_column_grant_args("); boolean first = true; - sb.append("o1:"); - if (this.o1 == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("table_name:"); + if (this.table_name == null) { + sb.append("null"); + } else { + sb.append(this.table_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("column_name:"); + if (this.column_name == null) { + sb.append("null"); + } else { + sb.append(this.column_name); } first = false; sb.append(")"); @@ -24188,181 +41286,129 @@ } - 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 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); + public static class list_security_column_grant_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("list_security_column_grant_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private String index_name; - public static final int INDEX_NAME = 3; - private boolean deleteData; - public static final int DELETEDATA = 4; + private List success; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean deleteData = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, SecurityColumn.class)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_index_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_column_grant_result.class, metaDataMap); } - public drop_index_by_name_args() { + public list_security_column_grant_result() { } - public drop_index_by_name_args( - String db_name, - String tbl_name, - String index_name, - boolean deleteData) + public list_security_column_grant_result( + List success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; - this.deleteData = deleteData; - this.__isset.deleteData = true; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public drop_index_by_name_args(drop_index_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public list_security_column_grant_result(list_security_column_grant_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (SecurityColumn other_element : other.success) { + __this__success.add(new SecurityColumn(other_element)); + } + this.success = __this__success; } - if (other.isSetIndex_name()) { - this.index_name = other.index_name; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } - __isset.deleteData = other.__isset.deleteData; - this.deleteData = other.deleteData; } @Override - public drop_index_by_name_args clone() { - return new drop_index_by_name_args(this); - } - - 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 String getTbl_name() { - return this.tbl_name; + public list_security_column_grant_result clone() { + return new list_security_column_grant_result(this); } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void unsetTbl_name() { - this.tbl_name = null; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - // 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 addToSuccess(SecurityColumn elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - public String getIndex_name() { - return this.index_name; + public List getSuccess() { + return this.success; } - public void setIndex_name(String index_name) { - this.index_name = index_name; + public void setSuccess(List success) { + this.success = success; } - public void unsetIndex_name() { - this.index_name = null; + public void unsetSuccess() { + this.success = 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 success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.success != null; } - public boolean isDeleteData() { - return this.deleteData; + public MetaException getO1() { + return this.o1; } - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - this.__isset.deleteData = true; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetDeleteData() { - this.__isset.deleteData = false; + public void unsetO1() { + this.o1 = null; } - // Returns true if field deleteData is set (has been asigned a value) and false otherwise - public boolean isSetDeleteData() { - return this.__isset.deleteData; + // Returns true if field o1 is set (has been asigned a value) and false otherwise + public boolean isSetO1() { + return this.o1 != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: - if (value == null) { - unsetTbl_name(); - } else { - setTbl_name((String)value); - } - break; - - case INDEX_NAME: + case SUCCESS: if (value == null) { - unsetIndex_name(); + unsetSuccess(); } else { - setIndex_name((String)value); + setSuccess((List)value); } break; - case DELETEDATA: + case O1: if (value == null) { - unsetDeleteData(); + unsetO1(); } else { - setDeleteData((Boolean)value); + setO1((MetaException)value); } break; @@ -24373,17 +41419,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); - - case INDEX_NAME: - return getIndex_name(); + case SUCCESS: + return getSuccess(); - case DELETEDATA: - return new Boolean(isDeleteData()); + case O1: + return getO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -24393,14 +41433,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case INDEX_NAME: - return isSetIndex_name(); - case DELETEDATA: - return isSetDeleteData(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -24410,48 +41446,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_index_by_name_args) - return this.equals((drop_index_by_name_args)that); + if (that instanceof list_security_column_grant_result) + return this.equals((list_security_column_grant_result)that); return false; } - public boolean equals(drop_index_by_name_args that) { + public boolean equals(list_security_column_grant_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) - return false; - if (!this.tbl_name.equals(that.tbl_name)) - return false; - } - - boolean this_present_index_name = true && this.isSetIndex_name(); - boolean that_present_index_name = true && that.isSetIndex_name(); - if (this_present_index_name || that_present_index_name) { - if (!(this_present_index_name && that_present_index_name)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.index_name.equals(that.index_name)) + if (!this.success.equals(that.success)) return false; } - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) return false; - if (this.deleteData != that.deleteData) + if (!this.o1.equals(that.o1)) return false; } @@ -24474,31 +41492,28 @@ } switch (field.id) { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case INDEX_NAME: - if (field.type == TType.STRING) { - this.index_name = iprot.readString(); + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list251 = iprot.readListBegin(); + this.success = new ArrayList(_list251.size); + for (int _i252 = 0; _i252 < _list251.size; ++_i252) + { + SecurityColumn _elem253; + _elem253 = new SecurityColumn(); + _elem253.read(iprot); + this.success.add(_elem253); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; - case DELETEDATA: - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -24515,63 +41530,47 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityColumn _iter254 : this.success) { + _iter254.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); - } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); - oprot.writeBool(this.deleteData); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_index_by_name_args("); + StringBuilder sb = new StringBuilder("list_security_column_grant_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.success); } first = false; if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.index_name); + sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); - first = false; sb.append(")"); return sb.toString(); } @@ -24583,146 +41582,218 @@ } - 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.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); + 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 USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)4); + private static final TField GRANTOR_FIELD_DESC = new TField("grantor", TType.STRING, (short)5); - private boolean success; - public static final int SUCCESS = 0; - private NoSuchObjectException o1; - public static final int O1 = 1; - private MetaException o2; - public static final int O2 = 2; + private String user_name; + public static final int USER_NAME = 1; + private boolean is_role; + public static final int IS_ROLE = 2; + private boolean is_group; + public static final int IS_GROUP = 3; + private PrivilegeBag privileges; + public static final int PRIVILEGES = 4; + private String grantor; + public static final int GRANTOR = 5; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean success = false; + public boolean is_role = false; + public boolean is_group = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + put(IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrivilegeBag.class))); + put(GRANTOR, new FieldMetaData("grantor", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); }}); - static { - FieldMetaData.addStructMetaDataMap(drop_index_by_name_result.class, metaDataMap); + static { + FieldMetaData.addStructMetaDataMap(grant_privileges_args.class, metaDataMap); + } + + public grant_privileges_args() { + } + + public grant_privileges_args( + String user_name, + boolean is_role, + boolean is_group, + PrivilegeBag privileges, + String grantor) + { + this(); + this.user_name = user_name; + this.is_role = is_role; + this.__isset.is_role = true; + this.is_group = is_group; + this.__isset.is_group = true; + this.privileges = privileges; + this.grantor = grantor; + } + + /** + * Performs a deep copy on other. + */ + public grant_privileges_args(grant_privileges_args other) { + if (other.isSetUser_name()) { + this.user_name = other.user_name; + } + __isset.is_role = other.__isset.is_role; + this.is_role = other.is_role; + __isset.is_group = other.__isset.is_group; + this.is_group = other.is_group; + if (other.isSetPrivileges()) { + this.privileges = new PrivilegeBag(other.privileges); + } + if (other.isSetGrantor()) { + this.grantor = other.grantor; + } + } + + @Override + public grant_privileges_args clone() { + return new grant_privileges_args(this); + } + + 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; } - public drop_index_by_name_result() { + // 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 drop_index_by_name_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) - { - this(); - this.success = success; - this.__isset.success = true; - this.o1 = o1; - this.o2 = o2; + public boolean isIs_role() { + return this.is_role; } - /** - * Performs a deep copy on other. - */ - public drop_index_by_name_result(drop_index_by_name_result other) { - __isset.success = other.__isset.success; - this.success = other.success; - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); - } + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - @Override - public drop_index_by_name_result clone() { - return new drop_index_by_name_result(this); + public void unsetIs_role() { + this.__isset.is_role = false; } - public boolean isSuccess() { - return this.success; + // Returns true if field is_role is set (has been asigned a value) and false otherwise + public boolean isSetIs_role() { + return this.__isset.is_role; } - public void setSuccess(boolean success) { - this.success = success; - this.__isset.success = true; + public boolean isIs_group() { + return this.is_group; } - public void unsetSuccess() { - this.__isset.success = false; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; } - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.__isset.success; + public void unsetIs_group() { + this.__isset.is_group = false; } - public NoSuchObjectException getO1() { - return this.o1; + // Returns true if field is_group is set (has been asigned a value) and false otherwise + public boolean isSetIs_group() { + return this.__isset.is_group; } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public PrivilegeBag getPrivileges() { + return this.privileges; } - public void unsetO1() { - this.o1 = null; + public void setPrivileges(PrivilegeBag privileges) { + this.privileges = privileges; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + public void unsetPrivileges() { + this.privileges = null; } - public MetaException getO2() { - return this.o2; + // Returns true if field privileges is set (has been asigned a value) and false otherwise + public boolean isSetPrivileges() { + return this.privileges != null; } - public void setO2(MetaException o2) { - this.o2 = o2; + public String getGrantor() { + return this.grantor; } - public void unsetO2() { - this.o2 = null; + public void setGrantor(String grantor) { + this.grantor = grantor; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; + 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 setFieldValue(int fieldID, Object value) { switch (fieldID) { - case SUCCESS: + case USER_NAME: if (value == null) { - unsetSuccess(); + unsetUser_name(); } else { - setSuccess((Boolean)value); + setUser_name((String)value); } break; - case O1: + case IS_ROLE: if (value == null) { - unsetO1(); + unsetIs_role(); } else { - setO1((NoSuchObjectException)value); + setIs_role((Boolean)value); } break; - case O2: + case IS_GROUP: if (value == null) { - unsetO2(); + unsetIs_group(); } else { - setO2((MetaException)value); + setIs_group((Boolean)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrivilegeBag)value); + } + break; + + case GRANTOR: + if (value == null) { + unsetGrantor(); + } else { + setGrantor((String)value); } break; @@ -24733,14 +41804,20 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case SUCCESS: - return new Boolean(isSuccess()); + case USER_NAME: + return getUser_name(); - case O1: - return getO1(); + case IS_ROLE: + return new Boolean(isIs_role()); - case O2: - return getO2(); + case IS_GROUP: + return new Boolean(isIs_group()); + + case PRIVILEGES: + return getPrivileges(); + + case GRANTOR: + return getGrantor(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -24750,12 +41827,16 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); + case PRIVILEGES: + return isSetPrivileges(); + case GRANTOR: + return isSetGrantor(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -24765,39 +41846,57 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_index_by_name_result) - return this.equals((drop_index_by_name_result)that); + if (that instanceof grant_privileges_args) + return this.equals((grant_privileges_args)that); return false; } - public boolean equals(drop_index_by_name_result that) { + public boolean equals(grant_privileges_args that) { if (that == null) return false; - boolean this_present_success = true; - boolean that_present_success = true; - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) return false; - if (this.success != that.success) + if (!this.user_name.equals(that.user_name)) return false; } - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_role != that.is_role) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o2.equals(that.o2)) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) + return false; + } + + boolean this_present_grantor = true && this.isSetGrantor(); + boolean that_present_grantor = true && that.isSetGrantor(); + if (this_present_grantor || that_present_grantor) { + if (!(this_present_grantor && that_present_grantor)) + return false; + if (!this.grantor.equals(that.grantor)) return false; } @@ -24820,26 +41919,40 @@ } switch (field.id) { - case SUCCESS: + case USER_NAME: + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case IS_ROLE: if (field.type == TType.BOOL) { - this.success = iprot.readBool(); - this.__isset.success = true; + this.is_role = iprot.readBool(); + this.__isset.is_role = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); + case IS_GROUP: + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + this.__isset.is_group = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case PRIVILEGES: if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); - this.o2.read(iprot); + this.privileges = new PrivilegeBag(); + this.privileges.read(iprot); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GRANTOR: + if (field.type == TType.STRING) { + this.grantor = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -24856,19 +41969,28 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + oprot.writeStructBegin(STRUCT_DESC); + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + this.privileges.write(oprot); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + if (this.grantor != null) { + oprot.writeFieldBegin(GRANTOR_FIELD_DESC); + oprot.writeString(this.grantor); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -24877,26 +41999,38 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_index_by_name_result("); + StringBuilder sb = new StringBuilder("grant_privileges_args("); boolean first = true; - sb.append("success:"); - sb.append(this.success); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { sb.append("null"); } else { - sb.append(this.o1); + sb.append(this.privileges); } first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("grantor:"); + if (this.grantor == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.grantor); } first = false; sb.append(")"); @@ -24910,144 +42044,111 @@ } - 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 INDEX_NAME_FIELD_DESC = new TField("index_name", TType.STRING, (short)3); + 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.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private String index_name; - public static final int INDEX_NAME = 3; + private boolean success; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(grant_privileges_result.class, metaDataMap); } - public get_index_by_name_args() { + public grant_privileges_result() { } - public get_index_by_name_args( - String db_name, - String tbl_name, - String index_name) + public grant_privileges_result( + boolean success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.index_name = index_name; + this.success = success; + this.__isset.success = true; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_index_by_name_args(get_index_by_name_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetIndex_name()) { - this.index_name = other.index_name; + public grant_privileges_result(grant_privileges_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } @Override - public get_index_by_name_args clone() { - return new get_index_by_name_args(this); - } - - 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 grant_privileges_result clone() { + return new grant_privileges_result(this); } - public String getTbl_name() { - return this.tbl_name; + public boolean isSuccess() { + return this.success; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setSuccess(boolean success) { + this.success = success; + this.__isset.success = true; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetSuccess() { + this.__isset.success = false; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; } - public String getIndex_name() { - return this.index_name; + public MetaException getO1() { + return this.o1; } - public void setIndex_name(String index_name) { - this.index_name = index_name; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetIndex_name() { - this.index_name = null; + public void unsetO1() { + this.o1 = null; } - // Returns true if field index_name is set (has been asigned a value) and false otherwise - public boolean isSetIndex_name() { - return this.index_name != null; + // Returns true if field o1 is set (has been asigned a value) and false otherwise + public boolean isSetO1() { + return this.o1 != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: + case SUCCESS: if (value == null) { - unsetTbl_name(); + unsetSuccess(); } else { - setTbl_name((String)value); + setSuccess((Boolean)value); } break; - case INDEX_NAME: + case O1: if (value == null) { - unsetIndex_name(); + unsetO1(); } else { - setIndex_name((String)value); + setO1((MetaException)value); } break; @@ -25058,14 +42159,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case SUCCESS: + return new Boolean(isSuccess()); - case INDEX_NAME: - return getIndex_name(); + case O1: + return getO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -25075,12 +42173,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case INDEX_NAME: - return isSetIndex_name(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -25090,39 +42186,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_by_name_args) - return this.equals((get_index_by_name_args)that); + if (that instanceof grant_privileges_result) + return this.equals((grant_privileges_result)that); return false; } - public boolean equals(get_index_by_name_args that) { + public boolean equals(grant_privileges_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.tbl_name.equals(that.tbl_name)) + if (this.success != that.success) return false; } - boolean this_present_index_name = true && this.isSetIndex_name(); - boolean that_present_index_name = true && that.isSetIndex_name(); - if (this_present_index_name || that_present_index_name) { - if (!(this_present_index_name && that_present_index_name)) + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) return false; - if (!this.index_name.equals(that.index_name)) + if (!this.o1.equals(that.o1)) return false; } @@ -25145,23 +42232,18 @@ } switch (field.id) { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case SUCCESS: + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); - } - break; - case INDEX_NAME: - if (field.type == TType.STRING) { - this.index_name = iprot.readString(); + } + break; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -25178,22 +42260,15 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); oprot.writeFieldEnd(); - } - if (this.index_name != null) { - oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC); - oprot.writeString(this.index_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -25202,30 +42277,18 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_args("); + StringBuilder sb = new StringBuilder("grant_privileges_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { - sb.append("null"); - } else { - sb.append(this.tbl_name); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("index_name:"); - if (this.index_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.index_name); + sb.append(this.o1); } first = false; sb.append(")"); @@ -25239,144 +42302,183 @@ } - 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.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); + 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 USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)3); + private static final TField PRIVILEGES_FIELD_DESC = new TField("privileges", TType.STRUCT, (short)4); - private Index success; - public static final int SUCCESS = 0; - private MetaException o1; - public static final int O1 = 1; - private NoSuchObjectException o2; - public static final int O2 = 2; + private String user_name; + public static final int USER_NAME = 1; + private boolean is_role; + public static final int IS_ROLE = 2; + private boolean is_group; + public static final int IS_GROUP = 3; + private PrivilegeBag privileges; + public static final int PRIVILEGES = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean is_role = false; + public boolean is_group = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(PRIVILEGES, new FieldMetaData("privileges", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, PrivilegeBag.class))); }}); static { - FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(revoke_privileges_args.class, metaDataMap); } - public get_index_by_name_result() { + public revoke_privileges_args() { } - public get_index_by_name_result( - Index success, - MetaException o1, - NoSuchObjectException o2) + public revoke_privileges_args( + String user_name, + boolean is_role, + boolean is_group, + PrivilegeBag privileges) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + this.user_name = user_name; + this.is_role = is_role; + this.__isset.is_role = true; + this.is_group = is_group; + this.__isset.is_group = true; + this.privileges = privileges; } /** * Performs a deep copy on other. */ - public get_index_by_name_result(get_index_by_name_result other) { - if (other.isSetSuccess()) { - this.success = new Index(other.success); - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.o1); + public revoke_privileges_args(revoke_privileges_args other) { + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - if (other.isSetO2()) { - this.o2 = new NoSuchObjectException(other.o2); + __isset.is_role = other.__isset.is_role; + this.is_role = other.is_role; + __isset.is_group = other.__isset.is_group; + this.is_group = other.is_group; + if (other.isSetPrivileges()) { + this.privileges = new PrivilegeBag(other.privileges); } } @Override - public get_index_by_name_result clone() { - return new get_index_by_name_result(this); + public revoke_privileges_args clone() { + return new revoke_privileges_args(this); } - public Index getSuccess() { - return this.success; + public String getUser_name() { + return this.user_name; } - public void setSuccess(Index success) { - this.success = success; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetSuccess() { - this.success = null; + public void unsetUser_name() { + this.user_name = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; + // Returns true if field user_name is set (has been asigned a value) and false otherwise + public boolean isSetUser_name() { + return this.user_name != null; } - public MetaException getO1() { - return this.o1; + public boolean isIs_role() { + return this.is_role; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - public void unsetO1() { - this.o1 = null; + public void unsetIs_role() { + this.__isset.is_role = false; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + // Returns true if field is_role is set (has been asigned a value) and false otherwise + public boolean isSetIs_role() { + return this.__isset.is_role; } - public NoSuchObjectException getO2() { - return this.o2; + public boolean isIs_group() { + return this.is_group; } - public void setO2(NoSuchObjectException o2) { - this.o2 = o2; + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; } - public void unsetO2() { - this.o2 = null; + public void unsetIs_group() { + this.__isset.is_group = false; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; + // Returns true if field is_group is set (has been asigned a value) and false otherwise + public boolean isSetIs_group() { + return this.__isset.is_group; + } + + public PrivilegeBag getPrivileges() { + return this.privileges; + } + + public void setPrivileges(PrivilegeBag privileges) { + this.privileges = privileges; + } + + public void unsetPrivileges() { + this.privileges = null; + } + + // Returns true if field privileges is set (has been asigned a value) and false otherwise + public boolean isSetPrivileges() { + return this.privileges != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case SUCCESS: + case USER_NAME: if (value == null) { - unsetSuccess(); + unsetUser_name(); } else { - setSuccess((Index)value); + setUser_name((String)value); } break; - case O1: + case IS_ROLE: if (value == null) { - unsetO1(); + unsetIs_role(); } else { - setO1((MetaException)value); + setIs_role((Boolean)value); } break; - case O2: + case IS_GROUP: if (value == null) { - unsetO2(); + unsetIs_group(); } else { - setO2((NoSuchObjectException)value); + setIs_group((Boolean)value); + } + break; + + case PRIVILEGES: + if (value == null) { + unsetPrivileges(); + } else { + setPrivileges((PrivilegeBag)value); } break; @@ -25387,14 +42489,17 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case SUCCESS: - return getSuccess(); + case USER_NAME: + return getUser_name(); - case O1: - return getO1(); + case IS_ROLE: + return new Boolean(isIs_role()); - case O2: - return getO2(); + case IS_GROUP: + return new Boolean(isIs_group()); + + case PRIVILEGES: + return getPrivileges(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -25404,12 +42509,14 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); + case PRIVILEGES: + return isSetPrivileges(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -25419,39 +42526,48 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_by_name_result) - return this.equals((get_index_by_name_result)that); + if (that instanceof revoke_privileges_args) + return this.equals((revoke_privileges_args)that); return false; } - public boolean equals(get_index_by_name_result that) { + public boolean equals(revoke_privileges_args that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) return false; - if (!this.success.equals(that.success)) + if (!this.user_name.equals(that.user_name)) return false; } - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.o1.equals(that.o1)) + if (this.is_role != that.is_role) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (!this.o2.equals(that.o2)) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_privileges = true && this.isSetPrivileges(); + boolean that_present_privileges = true && that.isSetPrivileges(); + if (this_present_privileges || that_present_privileges) { + if (!(this_present_privileges && that_present_privileges)) + return false; + if (!this.privileges.equals(that.privileges)) return false; } @@ -25474,26 +42590,33 @@ } switch (field.id) { - case SUCCESS: - if (field.type == TType.STRUCT) { - this.success = new Index(); - this.success.read(iprot); + case USER_NAME: + if (field.type == TType.STRING) { + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new MetaException(); - this.o1.read(iprot); + case IS_ROLE: + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + this.__isset.is_role = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case IS_GROUP: + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + this.__isset.is_group = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PRIVILEGES: if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); - this.o2.read(iprot); + this.privileges = new PrivilegeBag(); + this.privileges.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -25510,19 +42633,23 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + oprot.writeStructBegin(STRUCT_DESC); + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + if (this.privileges != null) { + oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC); + this.privileges.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -25531,30 +42658,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_by_name_result("); + StringBuilder sb = new StringBuilder("revoke_privileges_args("); boolean first = true; - sb.append("success:"); - if (this.success == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.success); + sb.append(this.user_name); } first = false; if (!first) sb.append(", "); - sb.append("o1:"); - if (this.o1 == null) { - sb.append("null"); - } else { - sb.append(this.o1); - } + sb.append("is_role:"); + sb.append(this.is_role); first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("privileges:"); + if (this.privileges == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.privileges); } first = false; sb.append(")"); @@ -25568,148 +42695,111 @@ } - 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 MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); + 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.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private short max_indexes; - public static final int MAX_INDEXES = 3; + private boolean success; + public static final int SUCCESS = 0; + private MetaException o1; + public static final int O1 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { - public boolean max_indexes = false; + public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); + put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(revoke_privileges_result.class, metaDataMap); } - public get_indexes_args() { - this.max_indexes = (short)-1; - + public revoke_privileges_result() { } - public get_indexes_args( - String db_name, - String tbl_name, - short max_indexes) + public revoke_privileges_result( + boolean success, + MetaException o1) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - this.__isset.max_indexes = true; + this.success = success; + this.__isset.success = true; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_indexes_args(get_indexes_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public revoke_privileges_result(revoke_privileges_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } - __isset.max_indexes = other.__isset.max_indexes; - this.max_indexes = other.max_indexes; } @Override - public get_indexes_args clone() { - return new get_indexes_args(this); - } - - 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 revoke_privileges_result clone() { + return new revoke_privileges_result(this); } - public String getTbl_name() { - return this.tbl_name; + public boolean isSuccess() { + return this.success; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setSuccess(boolean success) { + this.success = success; + this.__isset.success = true; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetSuccess() { + this.__isset.success = false; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.__isset.success; } - public short getMax_indexes() { - return this.max_indexes; + public MetaException getO1() { + return this.o1; } - public void setMax_indexes(short max_indexes) { - this.max_indexes = max_indexes; - this.__isset.max_indexes = true; + public void setO1(MetaException o1) { + this.o1 = o1; } - public void unsetMax_indexes() { - this.__isset.max_indexes = false; + public void unsetO1() { + this.o1 = null; } - // Returns true if field max_indexes is set (has been asigned a value) and false otherwise - public boolean isSetMax_indexes() { - return this.__isset.max_indexes; + // Returns true if field o1 is set (has been asigned a value) and false otherwise + public boolean isSetO1() { + return this.o1 != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DB_NAME: - if (value == null) { - unsetDb_name(); - } else { - setDb_name((String)value); - } - break; - - case TBL_NAME: + case SUCCESS: if (value == null) { - unsetTbl_name(); + unsetSuccess(); } else { - setTbl_name((String)value); + setSuccess((Boolean)value); } break; - case MAX_INDEXES: + case O1: if (value == null) { - unsetMax_indexes(); + unsetO1(); } else { - setMax_indexes((Short)value); + setO1((MetaException)value); } break; @@ -25720,14 +42810,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case SUCCESS: + return new Boolean(isSuccess()); - case MAX_INDEXES: - return new Short(getMax_indexes()); + case O1: + return getO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -25737,12 +42824,10 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_INDEXES: - return isSetMax_indexes(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -25752,39 +42837,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_indexes_args) - return this.equals((get_indexes_args)that); + if (that instanceof revoke_privileges_result) + return this.equals((revoke_privileges_result)that); return false; } - public boolean equals(get_indexes_args that) { + public boolean equals(revoke_privileges_result that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) return false; - if (!this.tbl_name.equals(that.tbl_name)) + if (this.success != that.success) return false; } - boolean this_present_max_indexes = true; - boolean that_present_max_indexes = true; - if (this_present_max_indexes || that_present_max_indexes) { - if (!(this_present_max_indexes && that_present_max_indexes)) + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) return false; - if (this.max_indexes != that.max_indexes) + if (!this.o1.equals(that.o1)) return false; } @@ -25807,24 +42883,18 @@ } switch (field.id) { - case DB_NAME: - if (field.type == TType.STRING) { - this.db_name = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case SUCCESS: + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_INDEXES: - if (field.type == TType.I16) { - this.max_indexes = iprot.readI16(); - this.__isset.max_indexes = true; + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -25841,50 +42911,37 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(this.success); oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_indexes_args("); + StringBuilder sb = new StringBuilder("revoke_privileges_result("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } + sb.append("success:"); + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); - first = false; sb.append(")"); return sb.toString(); } @@ -25896,513 +42953,414 @@ } - 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); + public static class revoke_all_privileges_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("revoke_all_privileges_args"); + private static final TField USER_NAME_FIELD_DESC = new TField("user_name", TType.STRING, (short)1); + private static final TField IS_ROLE_FIELD_DESC = new TField("is_role", TType.BOOL, (short)2); + private static final TField IS_GROUP_FIELD_DESC = new TField("is_group", TType.BOOL, (short)3); + private static final TField REMOVE_USER_PRIV_FIELD_DESC = new TField("remove_user_priv", TType.BOOL, (short)4); + private static final TField DBS_FIELD_DESC = new TField("dbs", TType.LIST, (short)5); + private static final TField TABLES_FIELD_DESC = new TField("tables", TType.LIST, (short)6); + private static final TField PARTS_FIELD_DESC = new TField("parts", TType.LIST, (short)7); + private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.MAP, (short)8); - private List success; - public static final int SUCCESS = 0; - private NoSuchObjectException o1; - public static final int O1 = 1; - private MetaException o2; - public static final int O2 = 2; + private String user_name; + public static final int USER_NAME = 1; + private boolean is_role; + public static final int IS_ROLE = 2; + private boolean is_group; + public static final int IS_GROUP = 3; + private boolean remove_user_priv; + public static final int REMOVE_USER_PRIV = 4; + private List dbs; + public static final int DBS = 5; + private List
tables; + public static final int TABLES = 6; + private List parts; + public static final int PARTS = 7; + private Map> columns; + public static final int COLUMNS = 8; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean is_role = false; + public boolean is_group = false; + public boolean remove_user_priv = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + put(IS_ROLE, new FieldMetaData("is_role", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(IS_GROUP, new FieldMetaData("is_group", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(REMOVE_USER_PRIV, new FieldMetaData("remove_user_priv", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(DBS, new FieldMetaData("dbs", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Index.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); + new StructMetaData(TType.STRUCT, Database.class)))); + put(TABLES, new FieldMetaData("tables", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Table.class)))); + put(PARTS, new FieldMetaData("parts", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, Partition.class)))); + put(COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new StructMetaData(TType.STRUCT, Table.class), + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING))))); }}); static { - FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(revoke_all_privileges_args.class, metaDataMap); } - public get_indexes_result() { + public revoke_all_privileges_args() { } - public get_indexes_result( - List success, - NoSuchObjectException o1, - MetaException o2) + public revoke_all_privileges_args( + String user_name, + boolean is_role, + boolean is_group, + boolean remove_user_priv, + List dbs, + List
tables, + List parts, + Map> columns) { this(); - this.success = success; - this.o1 = o1; - this.o2 = o2; + this.user_name = user_name; + this.is_role = is_role; + this.__isset.is_role = true; + this.is_group = is_group; + this.__isset.is_group = true; + this.remove_user_priv = remove_user_priv; + this.__isset.remove_user_priv = true; + this.dbs = dbs; + this.tables = tables; + this.parts = parts; + this.columns = columns; } /** * Performs a deep copy on other. */ - public get_indexes_result(get_indexes_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (Index other_element : other.success) { - __this__success.add(new Index(other_element)); - } - this.success = __this__success; + public revoke_all_privileges_args(revoke_all_privileges_args other) { + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + __isset.is_role = other.__isset.is_role; + this.is_role = other.is_role; + __isset.is_group = other.__isset.is_group; + this.is_group = other.is_group; + __isset.remove_user_priv = other.__isset.remove_user_priv; + this.remove_user_priv = other.remove_user_priv; + if (other.isSetDbs()) { + List __this__dbs = new ArrayList(); + for (Database other_element : other.dbs) { + __this__dbs.add(new Database(other_element)); + } + this.dbs = __this__dbs; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetTables()) { + List
__this__tables = new ArrayList
(); + for (Table other_element : other.tables) { + __this__tables.add(new Table(other_element)); + } + this.tables = __this__tables; } - } - - @Override - public get_indexes_result clone() { - return new get_indexes_result(this); - } - - 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(); + if (other.isSetParts()) { + List __this__parts = new ArrayList(); + for (Partition other_element : other.parts) { + __this__parts.add(new Partition(other_element)); + } + this.parts = __this__parts; } - this.success.add(elem); - } + if (other.isSetColumns()) { + Map> __this__columns = new HashMap>(); + for (Map.Entry> other_element : other.columns.entrySet()) { - public List getSuccess() { - return this.success; - } + Table other_element_key = other_element.getKey(); + List other_element_value = other_element.getValue(); - public void setSuccess(List success) { - this.success = success; - } + Table __this__columns_copy_key = new Table(other_element_key); - public void unsetSuccess() { - this.success = null; - } + List __this__columns_copy_value = new ArrayList(); + for (String other_element_value_element : other_element_value) { + __this__columns_copy_value.add(other_element_value_element); + } - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; + __this__columns.put(__this__columns_copy_key, __this__columns_copy_value); + } + this.columns = __this__columns; + } } - public NoSuchObjectException getO1() { - return this.o1; + @Override + public revoke_all_privileges_args clone() { + return new revoke_all_privileges_args(this); } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public String getUser_name() { + return this.user_name; } - public void unsetO1() { - this.o1 = null; + public void setUser_name(String user_name) { + this.user_name = user_name; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + public void unsetUser_name() { + this.user_name = null; } - public MetaException getO2() { - return this.o2; + // 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 setO2(MetaException o2) { - this.o2 = o2; + public boolean isIs_role() { + return this.is_role; } - public void unsetO2() { - this.o2 = null; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; + public void unsetIs_role() { + this.__isset.is_role = false; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case SUCCESS: - if (value == null) { - unsetSuccess(); - } else { - setSuccess((List)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } + // Returns true if field is_role is set (has been asigned a value) and false otherwise + public boolean isSetIs_role() { + return this.__isset.is_role; } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case SUCCESS: - return getSuccess(); - - case O1: - return getO1(); - - case O2: - return getO2(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } + public boolean isIs_group() { + return this.is_group; } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case SUCCESS: - return isSetSuccess(); - case O1: - return isSetO1(); - case O2: - return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; } - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof get_indexes_result) - return this.equals((get_indexes_result)that); - return false; + public void unsetIs_group() { + this.__isset.is_group = false; } - public boolean equals(get_indexes_result that) { - if (that == null) - return false; - - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); - if (this_present_success || that_present_success) { - if (!(this_present_success && that_present_success)) - return false; - if (!this.success.equals(that.success)) - return false; - } - - boolean this_present_o1 = true && this.isSetO1(); - boolean that_present_o1 = true && that.isSetO1(); - if (this_present_o1 || that_present_o1) { - if (!(this_present_o1 && that_present_o1)) - return false; - if (!this.o1.equals(that.o1)) - return false; - } - - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) - return false; - if (!this.o2.equals(that.o2)) - return false; - } - - return true; + // Returns true if field is_group is set (has been asigned a value) and false otherwise + public boolean isSetIs_group() { + return this.__isset.is_group; } - @Override - public int hashCode() { - return 0; + public boolean isRemove_user_priv() { + return this.remove_user_priv; } - 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 SUCCESS: - if (field.type == TType.LIST) { - { - TList _list136 = iprot.readListBegin(); - this.success = new ArrayList(_list136.size); - for (int _i137 = 0; _i137 < _list136.size; ++_i137) - { - Index _elem138; - _elem138 = new Index(); - _elem138.read(iprot); - this.success.add(_elem138); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case 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); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - validate(); + public void setRemove_user_priv(boolean remove_user_priv) { + this.remove_user_priv = remove_user_priv; + this.__isset.remove_user_priv = true; } - public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); - - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Index _iter139 : this.success) { - _iter139.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO2()) { - oprot.writeFieldBegin(O2_FIELD_DESC); - this.o2.write(oprot); - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); + public void unsetRemove_user_priv() { + this.__isset.remove_user_priv = false; + } + + // Returns true if field remove_user_priv is set (has been asigned a value) and false otherwise + public boolean isSetRemove_user_priv() { + return this.__isset.remove_user_priv; } - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_indexes_result("); - boolean first = true; + public int getDbsSize() { + return (this.dbs == null) ? 0 : this.dbs.size(); + } - 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); + public java.util.Iterator getDbsIterator() { + return (this.dbs == null) ? null : this.dbs.iterator(); + } + + public void addToDbs(Database elem) { + if (this.dbs == null) { + this.dbs = new ArrayList(); } - first = false; - sb.append(")"); - return sb.toString(); + this.dbs.add(elem); } - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values + public List getDbs() { + return this.dbs; } - } + public void setDbs(List dbs) { + this.dbs = dbs; + } - 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 MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); + public void unsetDbs() { + this.dbs = null; + } - private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private short max_indexes; - public static final int MAX_INDEXES = 3; + // Returns true if field dbs is set (has been asigned a value) and false otherwise + public boolean isSetDbs() { + return this.dbs != null; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean max_indexes = false; + public int getTablesSize() { + return (this.tables == null) ? 0 : this.tables.size(); } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I16))); - }}); + public java.util.Iterator
getTablesIterator() { + return (this.tables == null) ? null : this.tables.iterator(); + } - static { - FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); + public void addToTables(Table elem) { + if (this.tables == null) { + this.tables = new ArrayList
(); + } + this.tables.add(elem); } - public get_index_names_args() { - this.max_indexes = (short)-1; + public List
getTables() { + return this.tables; + } + public void setTables(List
tables) { + this.tables = tables; } - public get_index_names_args( - String db_name, - String tbl_name, - short max_indexes) - { - this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_indexes = max_indexes; - this.__isset.max_indexes = true; + public void unsetTables() { + this.tables = null; } - /** - * Performs a deep copy on other. - */ - public get_index_names_args(get_index_names_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - __isset.max_indexes = other.__isset.max_indexes; - this.max_indexes = other.max_indexes; + // Returns true if field tables is set (has been asigned a value) and false otherwise + public boolean isSetTables() { + return this.tables != null; } - @Override - public get_index_names_args clone() { - return new get_index_names_args(this); + public int getPartsSize() { + return (this.parts == null) ? 0 : this.parts.size(); } - public String getDb_name() { - return this.db_name; + public java.util.Iterator getPartsIterator() { + return (this.parts == null) ? null : this.parts.iterator(); } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void addToParts(Partition elem) { + if (this.parts == null) { + this.parts = new ArrayList(); + } + this.parts.add(elem); } - public void unsetDb_name() { - this.db_name = null; + public List getParts() { + return this.parts; } - // 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 setParts(List parts) { + this.parts = parts; } - public String getTbl_name() { - return this.tbl_name; + public void unsetParts() { + this.parts = null; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + // Returns true if field parts is set (has been asigned a value) and false otherwise + public boolean isSetParts() { + return this.parts != null; } - public void unsetTbl_name() { - this.tbl_name = null; + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); } - // 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 putToColumns(Table key, List val) { + if (this.columns == null) { + this.columns = new HashMap>(); + } + this.columns.put(key, val); } - public short getMax_indexes() { - return this.max_indexes; + public Map> getColumns() { + return this.columns; } - public void setMax_indexes(short max_indexes) { - this.max_indexes = max_indexes; - this.__isset.max_indexes = true; + public void setColumns(Map> columns) { + this.columns = columns; } - public void unsetMax_indexes() { - this.__isset.max_indexes = false; + public void unsetColumns() { + this.columns = null; } - // Returns true if field max_indexes is set (has been asigned a value) and false otherwise - public boolean isSetMax_indexes() { - return this.__isset.max_indexes; + // Returns true if field columns is set (has been asigned a value) and false otherwise + public boolean isSetColumns() { + return this.columns != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DB_NAME: + case USER_NAME: if (value == null) { - unsetDb_name(); + unsetUser_name(); } else { - setDb_name((String)value); + setUser_name((String)value); } break; - case TBL_NAME: + case IS_ROLE: if (value == null) { - unsetTbl_name(); + unsetIs_role(); } else { - setTbl_name((String)value); + setIs_role((Boolean)value); } break; - case MAX_INDEXES: + case IS_GROUP: if (value == null) { - unsetMax_indexes(); + unsetIs_group(); } else { - setMax_indexes((Short)value); + setIs_group((Boolean)value); + } + break; + + case REMOVE_USER_PRIV: + if (value == null) { + unsetRemove_user_priv(); + } else { + setRemove_user_priv((Boolean)value); + } + break; + + case DBS: + if (value == null) { + unsetDbs(); + } else { + setDbs((List)value); + } + break; + + case TABLES: + if (value == null) { + unsetTables(); + } else { + setTables((List
)value); + } + break; + + case PARTS: + if (value == null) { + unsetParts(); + } else { + setParts((List)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((Map>)value); } break; @@ -26411,16 +43369,31 @@ } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case DB_NAME: - return getDb_name(); + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case USER_NAME: + return getUser_name(); + + case IS_ROLE: + return new Boolean(isIs_role()); + + case IS_GROUP: + return new Boolean(isIs_group()); + + case REMOVE_USER_PRIV: + return new Boolean(isRemove_user_priv()); + + case DBS: + return getDbs(); + + case TABLES: + return getTables(); - case TBL_NAME: - return getTbl_name(); + case PARTS: + return getParts(); - case MAX_INDEXES: - return new Short(getMax_indexes()); + case COLUMNS: + return getColumns(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -26430,12 +43403,22 @@ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise public boolean isSet(int fieldID) { switch (fieldID) { - case DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case MAX_INDEXES: - return isSetMax_indexes(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); + case REMOVE_USER_PRIV: + return isSetRemove_user_priv(); + case DBS: + return isSetDbs(); + case TABLES: + return isSetTables(); + case PARTS: + return isSetParts(); + case COLUMNS: + return isSetColumns(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -26445,39 +43428,84 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_names_args) - return this.equals((get_index_names_args)that); + if (that instanceof revoke_all_privileges_args) + return this.equals((revoke_all_privileges_args)that); return false; } - public boolean equals(get_index_names_args that) { + public boolean equals(revoke_all_privileges_args that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) + boolean this_present_user_name = true && this.isSetUser_name(); + boolean that_present_user_name = true && that.isSetUser_name(); + if (this_present_user_name || that_present_user_name) { + if (!(this_present_user_name && that_present_user_name)) return false; - if (!this.db_name.equals(that.db_name)) + if (!this.user_name.equals(that.user_name)) return false; } - boolean this_present_tbl_name = true && this.isSetTbl_name(); - boolean that_present_tbl_name = true && that.isSetTbl_name(); - if (this_present_tbl_name || that_present_tbl_name) { - if (!(this_present_tbl_name && that_present_tbl_name)) + boolean this_present_is_role = true; + boolean that_present_is_role = true; + if (this_present_is_role || that_present_is_role) { + if (!(this_present_is_role && that_present_is_role)) return false; - if (!this.tbl_name.equals(that.tbl_name)) + if (this.is_role != that.is_role) return false; } - boolean this_present_max_indexes = true; - boolean that_present_max_indexes = true; - if (this_present_max_indexes || that_present_max_indexes) { - if (!(this_present_max_indexes && that_present_max_indexes)) + boolean this_present_is_group = true; + boolean that_present_is_group = true; + if (this_present_is_group || that_present_is_group) { + if (!(this_present_is_group && that_present_is_group)) return false; - if (this.max_indexes != that.max_indexes) + if (this.is_group != that.is_group) + return false; + } + + boolean this_present_remove_user_priv = true; + boolean that_present_remove_user_priv = true; + if (this_present_remove_user_priv || that_present_remove_user_priv) { + if (!(this_present_remove_user_priv && that_present_remove_user_priv)) + return false; + if (this.remove_user_priv != that.remove_user_priv) + return false; + } + + boolean this_present_dbs = true && this.isSetDbs(); + boolean that_present_dbs = true && that.isSetDbs(); + if (this_present_dbs || that_present_dbs) { + if (!(this_present_dbs && that_present_dbs)) + return false; + if (!this.dbs.equals(that.dbs)) + return false; + } + + boolean this_present_tables = true && this.isSetTables(); + boolean that_present_tables = true && that.isSetTables(); + if (this_present_tables || that_present_tables) { + if (!(this_present_tables && that_present_tables)) + return false; + if (!this.tables.equals(that.tables)) + return false; + } + + boolean this_present_parts = true && this.isSetParts(); + boolean that_present_parts = true && that.isSetParts(); + if (this_present_parts || that_present_parts) { + if (!(this_present_parts && that_present_parts)) + return false; + if (!this.parts.equals(that.parts)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) return false; } @@ -26500,24 +43528,117 @@ } switch (field.id) { - case DB_NAME: + case USER_NAME: if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + this.user_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case IS_ROLE: + if (field.type == TType.BOOL) { + this.is_role = iprot.readBool(); + this.__isset.is_role = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_INDEXES: - if (field.type == TType.I16) { - this.max_indexes = iprot.readI16(); - this.__isset.max_indexes = true; + case IS_GROUP: + if (field.type == TType.BOOL) { + this.is_group = iprot.readBool(); + this.__isset.is_group = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case REMOVE_USER_PRIV: + if (field.type == TType.BOOL) { + this.remove_user_priv = iprot.readBool(); + this.__isset.remove_user_priv = true; + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case DBS: + if (field.type == TType.LIST) { + { + TList _list255 = iprot.readListBegin(); + this.dbs = new ArrayList(_list255.size); + for (int _i256 = 0; _i256 < _list255.size; ++_i256) + { + Database _elem257; + _elem257 = new Database(); + _elem257.read(iprot); + this.dbs.add(_elem257); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TABLES: + if (field.type == TType.LIST) { + { + TList _list258 = iprot.readListBegin(); + this.tables = new ArrayList
(_list258.size); + for (int _i259 = 0; _i259 < _list258.size; ++_i259) + { + Table _elem260; + _elem260 = new Table(); + _elem260.read(iprot); + this.tables.add(_elem260); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PARTS: + if (field.type == TType.LIST) { + { + TList _list261 = iprot.readListBegin(); + this.parts = new ArrayList(_list261.size); + for (int _i262 = 0; _i262 < _list261.size; ++_i262) + { + Partition _elem263; + _elem263 = new Partition(); + _elem263.read(iprot); + this.parts.add(_elem263); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case COLUMNS: + if (field.type == TType.MAP) { + { + TMap _map264 = iprot.readMapBegin(); + this.columns = new HashMap>(2*_map264.size); + for (int _i265 = 0; _i265 < _map264.size; ++_i265) + { + Table _key266; + List _val267; + _key266 = new Table(); + _key266.read(iprot); + { + TList _list268 = iprot.readListBegin(); + _val267 = new ArrayList(_list268.size); + for (int _i269 = 0; _i269 < _list268.size; ++_i269) + { + String _elem270; + _elem270 = iprot.readString(); + _val267.add(_elem270); + } + iprot.readListEnd(); + } + this.columns.put(_key266, _val267); + } + iprot.readMapEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -26537,46 +43658,130 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(REMOVE_USER_PRIV_FIELD_DESC); + oprot.writeBool(this.remove_user_priv); + oprot.writeFieldEnd(); + if (this.dbs != null) { + oprot.writeFieldBegin(DBS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.dbs.size())); + for (Database _iter271 : this.dbs) { + _iter271.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.tables != null) { + oprot.writeFieldBegin(TABLES_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.tables.size())); + for (Table _iter272 : this.tables) { + _iter272.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + if (this.parts != null) { + oprot.writeFieldBegin(PARTS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.parts.size())); + for (Partition _iter273 : this.parts) { + _iter273.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); + if (this.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRUCT, TType.LIST, this.columns.size())); + for (Map.Entry> _iter274 : this.columns.entrySet()) { + _iter274.getKey().write(oprot); + { + oprot.writeListBegin(new TList(TType.STRING, _iter274.getValue().size())); + for (String _iter275 : _iter274.getValue()) { + oprot.writeString(_iter275); + } + oprot.writeListEnd(); + } + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_names_args("); + StringBuilder sb = new StringBuilder("revoke_all_privileges_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.user_name); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("remove_user_priv:"); + sb.append(this.remove_user_priv); + first = false; + if (!first) sb.append(", "); + sb.append("dbs:"); + if (this.dbs == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.dbs); } first = false; if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); + sb.append("tables:"); + if (this.tables == null) { + sb.append("null"); + } else { + sb.append(this.tables); + } + first = false; + if (!first) sb.append(", "); + sb.append("parts:"); + if (this.parts == null) { + sb.append("null"); + } else { + sb.append(this.parts); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } first = false; sb.append(")"); return sb.toString(); @@ -26589,112 +43794,94 @@ } - 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 SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); + public static class revoke_all_privileges_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("revoke_all_privileges_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private List success; + private boolean success; public static final int SUCCESS = 0; - private MetaException o2; - public static final int O2 = 1; + private MetaException o1; + public static final int O1 = 1; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { + public boolean success = false; } public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(revoke_all_privileges_result.class, metaDataMap); } - public get_index_names_result() { + public revoke_all_privileges_result() { } - public get_index_names_result( - List success, - MetaException o2) + public revoke_all_privileges_result( + boolean success, + MetaException o1) { this(); this.success = success; - this.o2 = o2; + this.__isset.success = true; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public get_index_names_result(get_index_names_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + public revoke_all_privileges_result(revoke_all_privileges_result other) { + __isset.success = other.__isset.success; + this.success = other.success; + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } @Override - public get_index_names_result clone() { - return new get_index_names_result(this); - } - - 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 revoke_all_privileges_result clone() { + return new revoke_all_privileges_result(this); } - public List getSuccess() { + public boolean isSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(boolean success) { this.success = success; + this.__isset.success = true; } public void unsetSuccess() { - this.success = null; + this.__isset.success = false; } // Returns true if field success is set (has been asigned a value) and false otherwise public boolean isSetSuccess() { - return this.success != null; + return this.__isset.success; } - 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 setFieldValue(int fieldID, Object value) { @@ -26703,15 +43890,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; @@ -26723,10 +43910,10 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); - case O2: - return getO2(); + case O1: + return getO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -26738,8 +43925,8 @@ switch (fieldID) { case SUCCESS: return isSetSuccess(); - case O2: - return isSetO2(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -26749,30 +43936,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_index_names_result) - return this.equals((get_index_names_result)that); + if (that instanceof revoke_all_privileges_result) + return this.equals((revoke_all_privileges_result)that); return false; } - public boolean equals(get_index_names_result that) { + public boolean equals(revoke_all_privileges_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) + if (this.success != that.success) return false; } - boolean this_present_o2 = true && this.isSetO2(); - boolean that_present_o2 = true && that.isSetO2(); - if (this_present_o2 || that_present_o2) { - if (!(this_present_o2 && that_present_o2)) + boolean this_present_o1 = true && this.isSetO1(); + boolean that_present_o1 = true && that.isSetO1(); + if (this_present_o1 || that_present_o1) { + if (!(this_present_o1 && that_present_o1)) return false; - if (!this.o2.equals(that.o2)) + if (!this.o1.equals(that.o1)) return false; } @@ -26796,26 +43983,17 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.LIST) { - { - TList _list140 = iprot.readListBegin(); - this.success = new ArrayList(_list140.size); - for (int _i141 = 0; _i141 < _list140.size; ++_i141) - { - String _elem142; - _elem142 = iprot.readString(); - this.success.add(_elem142); - } - iprot.readListEnd(); - } + if (field.type == TType.BOOL) { + this.success = iprot.readBool(); + this.__isset.success = true; } else { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 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); } @@ -26836,17 +44014,11 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter143 : this.success) { - oprot.writeString(_iter143); - } - 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(); @@ -26855,22 +44027,18 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_names_result("); + StringBuilder sb = new StringBuilder("revoke_all_privileges_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { + sb.append("o1:"); + if (this.o1 == null) { sb.append("null"); } else { - sb.append(this.o2); + sb.append(this.o1); } first = false; sb.append(")"); Index: metastore/src/gen-php/ThriftHiveMetastore.php =================================================================== --- metastore/src/gen-php/ThriftHiveMetastore.php (revision 1037574) +++ metastore/src/gen-php/ThriftHiveMetastore.php (working copy) @@ -33,10 +33,13 @@ public function drop_partition($db_name, $tbl_name, $part_vals, $deleteData); public function drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData); public function get_partition($db_name, $tbl_name, $part_vals); + public function get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names); public function get_partition_by_name($db_name, $tbl_name, $part_name); public function get_partitions($db_name, $tbl_name, $max_parts); + public function get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names); public function get_partition_names($db_name, $tbl_name, $max_parts); public function get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts); + public function get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names); public function get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts); public function get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts); public function alter_partition($db_name, $tbl_name, $new_part); @@ -49,6 +52,24 @@ public function get_index_by_name($db_name, $tbl_name, $index_name); public function get_indexes($db_name, $tbl_name, $max_indexes); public function get_index_names($db_name, $tbl_name, $max_indexes); + public function get_user_privilege_set($user_name, $group_names); + public function get_db_privilege_set($db_name, $user_name, $group_names); + public function get_table_privilege_set($db_name, $table_name, $user_name, $group_names); + public function get_partition_privilege_set($db_name, $table_name, $part_name, $user_name, $group_names); + public function get_column_privilege_set($db_name, $table_name, $part_name, $column_name, $user_name, $group_names); + public function create_role($role_name, $owner_name, $db_name); + public function drop_role($role_name, $db_name); + public function add_role_member($role_name, $user_name, $is_role, $is_group, $db_name); + public function remove_role_member($role_name, $user_name, $is_role, $is_group, $db_name); + public function list_roles($principal_name, $is_role, $is_group, $db_name); + public function list_security_user_grant($principla_name, $is_role, $is_group); + public function list_security_db_grant($principal_name, $is_group, $is_role, $db_name); + public function list_security_table_grant($principal_name, $is_group, $is_role, $db_name, $table_name); + public function list_security_partition_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name); + public function list_security_column_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name, $column_name); + public function grant_privileges($user_name, $is_role, $is_group, $privileges, $grantor); + public function revoke_privileges($user_name, $is_role, $is_group, $privileges); + public function revoke_all_privileges($user_name, $is_role, $is_group, $remove_user_priv, $dbs, $tables, $parts, $columns); } class ThriftHiveMetastoreClient extends FacebookServiceClient implements ThriftHiveMetastoreIf { @@ -1387,6 +1408,67 @@ throw new Exception("get_partition failed: unknown result"); } + public function get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names) + { + $this->send_get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names); + return $this->recv_get_partition_with_auth(); + } + + public function send_get_partition_with_auth($db_name, $tbl_name, $part_vals, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_partition_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_with_auth() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_with_auth_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_get_partition_with_auth_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_partition_with_auth failed: unknown result"); + } + public function get_partition_by_name($db_name, $tbl_name, $part_name) { $this->send_get_partition_by_name($db_name, $tbl_name, $part_name); @@ -1505,6 +1587,67 @@ throw new Exception("get_partitions failed: unknown result"); } + public function get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names) + { + $this->send_get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names); + return $this->recv_get_partitions_with_auth(); + } + + public function send_get_partitions_with_auth($db_name, $tbl_name, $max_parts, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_partitions_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_parts = $max_parts; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_with_auth() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partitions_with_auth_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_get_partitions_with_auth_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_partitions_with_auth failed: unknown result"); + } + public function get_partition_names($db_name, $tbl_name, $max_parts) { $this->send_get_partition_names($db_name, $tbl_name, $max_parts); @@ -1618,6 +1761,68 @@ throw new Exception("get_partitions_ps failed: unknown result"); } + public function get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names) + { + $this->send_get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names); + return $this->recv_get_partitions_ps_with_auth(); + } + + public function send_get_partitions_ps_with_auth($db_name, $tbl_name, $part_vals, $max_parts, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_partitions_ps_with_auth_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->max_parts = $max_parts; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_ps_with_auth', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_ps_with_auth', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_ps_with_auth() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partitions_ps_with_auth_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_get_partitions_ps_with_auth_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_partitions_ps_with_auth failed: unknown result"); + } + public function get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts) { $this->send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts); @@ -2306,129 +2511,5777 @@ throw new Exception("get_index_names failed: unknown result"); } -} - -// HELPER FUNCTIONS AND STRUCTURES + public function get_user_privilege_set($user_name, $group_names) + { + $this->send_get_user_privilege_set($user_name, $group_names); + return $this->recv_get_user_privilege_set(); + } -class metastore_ThriftHiveMetastore_create_database_args { - static $_TSPEC; + public function send_get_user_privilege_set($user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_user_privilege_set_args(); + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_user_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_user_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } - public $database = null; + public function recv_get_user_privilege_set() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_user_privilege_set_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'database', - 'type' => TType::STRUCT, - 'class' => 'metastore_Database', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['database'])) { - $this->database = $vals['database']; + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; } + $result = new metastore_ThriftHiveMetastore_get_user_privilege_set_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; } + throw new Exception("get_user_privilege_set failed: unknown result"); } - public function getName() { - return 'ThriftHiveMetastore_create_database_args'; + public function get_db_privilege_set($db_name, $user_name, $group_names) + { + $this->send_get_db_privilege_set($db_name, $user_name, $group_names); + return $this->recv_get_db_privilege_set(); } - public function read($input) + public function send_get_db_privilege_set($db_name, $user_name, $group_names) { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) + $args = new metastore_ThriftHiveMetastore_get_db_privilege_set_args(); + $args->db_name = $db_name; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->database = new metastore_Database(); - $xfer += $this->database->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); + thrift_protocol_write_binary($this->output_, 'get_db_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_args'); - if ($this->database !== null) { - if (!is_object($this->database)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1); - $xfer += $this->database->write($output); - $xfer += $output->writeFieldEnd(); + else + { + $this->output_->writeMessageBegin('get_db_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; + } + + public function recv_get_db_privilege_set() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_db_privilege_set_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_get_db_privilege_set_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("get_db_privilege_set failed: unknown result"); + } + + public function get_table_privilege_set($db_name, $table_name, $user_name, $group_names) + { + $this->send_get_table_privilege_set($db_name, $table_name, $user_name, $group_names); + return $this->recv_get_table_privilege_set(); + } + + public function send_get_table_privilege_set($db_name, $table_name, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_table_privilege_set_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table_privilege_set() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_table_privilege_set_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_get_table_privilege_set_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("get_table_privilege_set failed: unknown result"); + } + + public function get_partition_privilege_set($db_name, $table_name, $part_name, $user_name, $group_names) + { + $this->send_get_partition_privilege_set($db_name, $table_name, $part_name, $user_name, $group_names); + return $this->recv_get_partition_privilege_set(); + } + + public function send_get_partition_privilege_set($db_name, $table_name, $part_name, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_partition_privilege_set_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->part_name = $part_name; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_privilege_set() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_privilege_set_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_get_partition_privilege_set_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("get_partition_privilege_set failed: unknown result"); + } + + public function get_column_privilege_set($db_name, $table_name, $part_name, $column_name, $user_name, $group_names) + { + $this->send_get_column_privilege_set($db_name, $table_name, $part_name, $column_name, $user_name, $group_names); + return $this->recv_get_column_privilege_set(); + } + + public function send_get_column_privilege_set($db_name, $table_name, $part_name, $column_name, $user_name, $group_names) + { + $args = new metastore_ThriftHiveMetastore_get_column_privilege_set_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->part_name = $part_name; + $args->column_name = $column_name; + $args->user_name = $user_name; + $args->group_names = $group_names; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_column_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_column_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_column_privilege_set() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_column_privilege_set_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_get_column_privilege_set_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("get_column_privilege_set failed: unknown result"); + } + + public function create_role($role_name, $owner_name, $db_name) + { + $this->send_create_role($role_name, $owner_name, $db_name); + return $this->recv_create_role(); + } + + public function send_create_role($role_name, $owner_name, $db_name) + { + $args = new metastore_ThriftHiveMetastore_create_role_args(); + $args->role_name = $role_name; + $args->owner_name = $owner_name; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_role() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_create_role_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_create_role_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("create_role failed: unknown result"); + } + + public function drop_role($role_name, $db_name) + { + $this->send_drop_role($role_name, $db_name); + return $this->recv_drop_role(); + } + + public function send_drop_role($role_name, $db_name) + { + $args = new metastore_ThriftHiveMetastore_drop_role_args(); + $args->role_name = $role_name; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_role', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_role', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_role() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_role_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_drop_role_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("drop_role failed: unknown result"); + } + + public function add_role_member($role_name, $user_name, $is_role, $is_group, $db_name) + { + $this->send_add_role_member($role_name, $user_name, $is_role, $is_group, $db_name); + return $this->recv_add_role_member(); + } + + public function send_add_role_member($role_name, $user_name, $is_role, $is_group, $db_name) + { + $args = new metastore_ThriftHiveMetastore_add_role_member_args(); + $args->role_name = $role_name; + $args->user_name = $user_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_role_member', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_role_member', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_role_member() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_add_role_member_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_add_role_member_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("add_role_member failed: unknown result"); + } + + public function remove_role_member($role_name, $user_name, $is_role, $is_group, $db_name) + { + $this->send_remove_role_member($role_name, $user_name, $is_role, $is_group, $db_name); + return $this->recv_remove_role_member(); + } + + public function send_remove_role_member($role_name, $user_name, $is_role, $is_group, $db_name) + { + $args = new metastore_ThriftHiveMetastore_remove_role_member_args(); + $args->role_name = $role_name; + $args->user_name = $user_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'remove_role_member', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('remove_role_member', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_remove_role_member() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_remove_role_member_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_remove_role_member_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("remove_role_member failed: unknown result"); + } + + public function list_roles($principal_name, $is_role, $is_group, $db_name) + { + $this->send_list_roles($principal_name, $is_role, $is_group, $db_name); + return $this->recv_list_roles(); + } + + public function send_list_roles($principal_name, $is_role, $is_group, $db_name) + { + $args = new metastore_ThriftHiveMetastore_list_roles_args(); + $args->principal_name = $principal_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_roles', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_roles', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_roles() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_list_roles_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_list_roles_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("list_roles failed: unknown result"); + } + + public function list_security_user_grant($principla_name, $is_role, $is_group) + { + $this->send_list_security_user_grant($principla_name, $is_role, $is_group); + return $this->recv_list_security_user_grant(); + } + + public function send_list_security_user_grant($principla_name, $is_role, $is_group) + { + $args = new metastore_ThriftHiveMetastore_list_security_user_grant_args(); + $args->principla_name = $principla_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_security_user_grant', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_security_user_grant', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_security_user_grant() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_list_security_user_grant_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_list_security_user_grant_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("list_security_user_grant failed: unknown result"); + } + + public function list_security_db_grant($principal_name, $is_group, $is_role, $db_name) + { + $this->send_list_security_db_grant($principal_name, $is_group, $is_role, $db_name); + return $this->recv_list_security_db_grant(); + } + + public function send_list_security_db_grant($principal_name, $is_group, $is_role, $db_name) + { + $args = new metastore_ThriftHiveMetastore_list_security_db_grant_args(); + $args->principal_name = $principal_name; + $args->is_group = $is_group; + $args->is_role = $is_role; + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_security_db_grant', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_security_db_grant', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_security_db_grant() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_list_security_db_grant_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_list_security_db_grant_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("list_security_db_grant failed: unknown result"); + } + + public function list_security_table_grant($principal_name, $is_group, $is_role, $db_name, $table_name) + { + $this->send_list_security_table_grant($principal_name, $is_group, $is_role, $db_name, $table_name); + return $this->recv_list_security_table_grant(); + } + + public function send_list_security_table_grant($principal_name, $is_group, $is_role, $db_name, $table_name) + { + $args = new metastore_ThriftHiveMetastore_list_security_table_grant_args(); + $args->principal_name = $principal_name; + $args->is_group = $is_group; + $args->is_role = $is_role; + $args->db_name = $db_name; + $args->table_name = $table_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_security_table_grant', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_security_table_grant', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_security_table_grant() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_list_security_table_grant_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_list_security_table_grant_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("list_security_table_grant failed: unknown result"); + } + + public function list_security_partition_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name) + { + $this->send_list_security_partition_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name); + return $this->recv_list_security_partition_grant(); + } + + public function send_list_security_partition_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name) + { + $args = new metastore_ThriftHiveMetastore_list_security_partition_grant_args(); + $args->principal_name = $principal_name; + $args->is_group = $is_group; + $args->is_role = $is_role; + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_security_partition_grant', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_security_partition_grant', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_security_partition_grant() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_list_security_partition_grant_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_list_security_partition_grant_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("list_security_partition_grant failed: unknown result"); + } + + public function list_security_column_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name, $column_name) + { + $this->send_list_security_column_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name, $column_name); + return $this->recv_list_security_column_grant(); + } + + public function send_list_security_column_grant($principal_name, $is_group, $is_role, $db_name, $table_name, $part_name, $column_name) + { + $args = new metastore_ThriftHiveMetastore_list_security_column_grant_args(); + $args->principal_name = $principal_name; + $args->is_group = $is_group; + $args->is_role = $is_role; + $args->db_name = $db_name; + $args->table_name = $table_name; + $args->part_name = $part_name; + $args->column_name = $column_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'list_security_column_grant', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('list_security_column_grant', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_list_security_column_grant() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_list_security_column_grant_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_list_security_column_grant_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("list_security_column_grant failed: unknown result"); + } + + public function grant_privileges($user_name, $is_role, $is_group, $privileges, $grantor) + { + $this->send_grant_privileges($user_name, $is_role, $is_group, $privileges, $grantor); + return $this->recv_grant_privileges(); + } + + public function send_grant_privileges($user_name, $is_role, $is_group, $privileges, $grantor) + { + $args = new metastore_ThriftHiveMetastore_grant_privileges_args(); + $args->user_name = $user_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->privileges = $privileges; + $args->grantor = $grantor; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'grant_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('grant_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_grant_privileges() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_grant_privileges_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_grant_privileges_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("grant_privileges failed: unknown result"); + } + + public function revoke_privileges($user_name, $is_role, $is_group, $privileges) + { + $this->send_revoke_privileges($user_name, $is_role, $is_group, $privileges); + return $this->recv_revoke_privileges(); + } + + public function send_revoke_privileges($user_name, $is_role, $is_group, $privileges) + { + $args = new metastore_ThriftHiveMetastore_revoke_privileges_args(); + $args->user_name = $user_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->privileges = $privileges; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'revoke_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('revoke_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_revoke_privileges() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_revoke_privileges_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_revoke_privileges_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("revoke_privileges failed: unknown result"); + } + + public function revoke_all_privileges($user_name, $is_role, $is_group, $remove_user_priv, $dbs, $tables, $parts, $columns) + { + $this->send_revoke_all_privileges($user_name, $is_role, $is_group, $remove_user_priv, $dbs, $tables, $parts, $columns); + return $this->recv_revoke_all_privileges(); + } + + public function send_revoke_all_privileges($user_name, $is_role, $is_group, $remove_user_priv, $dbs, $tables, $parts, $columns) + { + $args = new metastore_ThriftHiveMetastore_revoke_all_privileges_args(); + $args->user_name = $user_name; + $args->is_role = $is_role; + $args->is_group = $is_group; + $args->remove_user_priv = $remove_user_priv; + $args->dbs = $dbs; + $args->tables = $tables; + $args->parts = $parts; + $args->columns = $columns; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'revoke_all_privileges', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('revoke_all_privileges', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_revoke_all_privileges() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_revoke_all_privileges_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new metastore_ThriftHiveMetastore_revoke_all_privileges_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + throw new Exception("revoke_all_privileges failed: unknown result"); + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class metastore_ThriftHiveMetastore_create_database_args { + static $_TSPEC; + + public $database = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'database', + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['database'])) { + $this->database = $vals['database']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_database_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->database = new metastore_Database(); + $xfer += $this->database->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_args'); + if ($this->database !== null) { + if (!is_object($this->database)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1); + $xfer += $this->database->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_database_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_database_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_database_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_database_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_database_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Database(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_database_args { + static $_TSPEC; + + public $name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_database_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_database_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidOperationException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_database_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidOperationException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_databases_args { + static $_TSPEC; + + public $pattern = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'pattern', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_databases_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pattern); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_args'); + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 1); + $xfer += $output->writeString($this->pattern); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_databases_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_databases_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size173 = 0; + $_etype176 = 0; + $xfer += $input->readListBegin($_etype176, $_size173); + for ($_i177 = 0; $_i177 < $_size173; ++$_i177) + { + $elem178 = null; + $xfer += $input->readString($elem178); + $this->success []= $elem178; + } + $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 $iter179) + { + $xfer += $output->writeString($iter179); + } + } + $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(); + $_size180 = 0; + $_etype183 = 0; + $xfer += $input->readListBegin($_etype183, $_size180); + for ($_i184 = 0; $_i184 < $_size180; ++$_i184) + { + $elem185 = null; + $xfer += $input->readString($elem185); + $this->success []= $elem185; + } + $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 $iter186) + { + $xfer += $output->writeString($iter186); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_type_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Type', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Type(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_type_args { + static $_TSPEC; + + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'type', + 'type' => TType::STRUCT, + 'class' => 'metastore_Type', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_type_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->type = new metastore_Type(); + $xfer += $this->type->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_args'); + if ($this->type !== null) { + if (!is_object($this->type)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('type', TType::STRUCT, 1); + $xfer += $this->type->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_type_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_type_args { + static $_TSPEC; + + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'type', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_type_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_args'); + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 1); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_type_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_type_all_args { + static $_TSPEC; + + public $name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_all_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_type_all_result { + static $_TSPEC; + + public $success = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRUCT, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Type', + ), + ), + 1 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_all_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::MAP) { + $this->success = array(); + $_size187 = 0; + $_ktype188 = 0; + $_vtype189 = 0; + $xfer += $input->readMapBegin($_ktype188, $_vtype189, $_size187); + for ($_i191 = 0; $_i191 < $_size187; ++$_i191) + { + $key192 = ''; + $val193 = new metastore_Type(); + $xfer += $input->readString($key192); + $val193 = new metastore_Type(); + $xfer += $val193->read($input); + $this->success[$key192] = $val193; + } + $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 $kiter194 => $viter195) + { + $xfer += $output->writeString($kiter194); + $xfer += $viter195->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(); + $_size196 = 0; + $_etype199 = 0; + $xfer += $input->readListBegin($_etype199, $_size196); + for ($_i200 = 0; $_i200 < $_size196; ++$_i200) + { + $elem201 = null; + $elem201 = new metastore_FieldSchema(); + $xfer += $elem201->read($input); + $this->success []= $elem201; + } + $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 $iter202) + { + $xfer += $iter202->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_schema_args { + static $_TSPEC; + + public $db_name = null; + public $table_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_schema_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_schema_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_FieldSchema', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_UnknownTableException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_UnknownDBException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_schema_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size203 = 0; + $_etype206 = 0; + $xfer += $input->readListBegin($_etype206, $_size203); + for ($_i207 = 0; $_i207 < $_size203; ++$_i207) + { + $elem208 = null; + $elem208 = new metastore_FieldSchema(); + $xfer += $elem208->read($input); + $this->success []= $elem208; + } + $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 $iter209) + { + $xfer += $iter209->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_table_args { + static $_TSPEC; + + public $tbl = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tbl', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->tbl = new metastore_Table(); + $xfer += $this->tbl->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_args'); + if ($this->tbl !== null) { + if (!is_object($this->tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); + $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_table_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new metastore_NoSuchObjectException(); + $xfer += $this->o4->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o4 !== null) { + $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); + $xfer += $this->o4->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_table_args { + static $_TSPEC; + + public $dbname = null; + public $name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_table_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 2); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_table_result { + static $_TSPEC; + + public $o1 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_table_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_tables_args { + static $_TSPEC; + + public $db_name = null; + public $pattern = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'pattern', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->pattern); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); + $xfer += $output->writeString($this->pattern); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_tables_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size210 = 0; + $_etype213 = 0; + $xfer += $input->readListBegin($_etype213, $_size210); + for ($_i214 = 0; $_i214 < $_size210; ++$_i214) + { + $elem215 = null; + $xfer += $input->readString($elem215); + $this->success []= $elem215; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter216) + { + $xfer += $output->writeString($iter216); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_all_tables_args { + static $_TSPEC; + + public $db_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_tables_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_all_tables_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_tables_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size217 = 0; + $_etype220 = 0; + $xfer += $input->readListBegin($_etype220, $_size217); + for ($_i221 = 0; $_i221 < $_size217; ++$_i221) + { + $elem222 = null; + $xfer += $input->readString($elem222); + $this->success []= $elem222; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter223) + { + $xfer += $output->writeString($iter223); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_table_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_table_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Table(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_alter_table_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_name = null; + public $new_tbl = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_tbl', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_tbl'])) { + $this->new_tbl = $vals['new_tbl']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbname); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_tbl = new metastore_Table(); + $xfer += $this->new_tbl->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_tbl !== null) { + if (!is_object($this->new_tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); + $xfer += $this->new_tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_alter_table_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_add_partition_args { + static $_TSPEC; + + public $new_part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->new_part = new metastore_Partition(); + $xfer += $this->new_part->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_args'); + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); + $xfer += $this->new_part->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_add_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_append_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size224 = 0; + $_etype227 = 0; + $xfer += $input->readListBegin($_etype227, $_size224); + for ($_i228 = 0; $_i228 < $_size224; ++$_i228) + { + $elem229 = null; + $xfer += $input->readString($elem229); + $this->part_vals []= $elem229; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter230) + { + $xfer += $output->writeString($iter230); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_append_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_append_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_by_name_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_append_partition_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_by_name_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size231 = 0; + $_etype234 = 0; + $xfer += $input->readListBegin($_etype234, $_size231); + for ($_i235 = 0; $_i235 < $_size231; ++$_i235) + { + $elem236 = null; + $xfer += $input->readString($elem236); + $this->part_vals []= $elem236; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter237) + { + $xfer += $output->writeString($iter237); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; } } -class metastore_ThriftHiveMetastore_create_database_result { +class metastore_ThriftHiveMetastore_drop_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_name = null; + public $deleteData = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_by_name_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_partition_by_name_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', + 'class' => 'metastore_NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_database_result'; + return 'ThriftHiveMetastore_drop_partition_by_name_result'; } public function read($input) @@ -2446,26 +8299,25 @@ } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_AlreadyExistsException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); - $xfer += $this->o2->read($input); + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -2482,7 +8334,12 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -2493,11 +8350,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -2505,29 +8357,49 @@ } -class metastore_ThriftHiveMetastore_get_database_args { +class metastore_ThriftHiveMetastore_get_partition_args { static $_TSPEC; - public $name = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', 'type' => TType::STRING, ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; } } } public function getName() { - return 'ThriftHiveMetastore_get_database_args'; + return 'ThriftHiveMetastore_get_partition_args'; } public function read($input) @@ -2547,7 +8419,31 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size238 = 0; + $_etype241 = 0; + $xfer += $input->readListBegin($_etype241, $_size238); + for ($_i242 = 0; $_i242 < $_size238; ++$_i242) + { + $elem243 = null; + $xfer += $input->readString($elem243); + $this->part_vals []= $elem243; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -2564,10 +8460,32 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter244) + { + $xfer += $output->writeString($iter244); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -2577,7 +8495,7 @@ } -class metastore_ThriftHiveMetastore_get_database_result { +class metastore_ThriftHiveMetastore_get_partition_result { static $_TSPEC; public $success = null; @@ -2590,17 +8508,17 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Database', + 'class' => 'metastore_Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_NoSuchObjectException', ), ); } @@ -2618,7 +8536,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_database_result'; + return 'ThriftHiveMetastore_get_partition_result'; } public function read($input) @@ -2638,7 +8556,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Database(); + $this->success = new metastore_Partition(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -2646,7 +8564,7 @@ break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -2654,7 +8572,7 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); + $this->o2 = new metastore_NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -2672,7 +8590,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -2698,37 +8616,69 @@ } -class metastore_ThriftHiveMetastore_drop_database_args { +class metastore_ThriftHiveMetastore_get_partition_with_auth_args { static $_TSPEC; - public $name = null; - public $deleteData = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_database_args'; + return 'ThriftHiveMetastore_get_partition_with_auth_args'; } public function read($input) @@ -2748,14 +8698,55 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size245 = 0; + $_etype248 = 0; + $xfer += $input->readListBegin($_etype248, $_size245); + for ($_i249 = 0; $_i249 < $_size245; ++$_i249) + { + $elem250 = null; + $xfer += $input->readString($elem250); + $this->part_vals []= $elem250; + } + $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(); + $_size251 = 0; + $_etype254 = 0; + $xfer += $input->readListBegin($_etype254, $_size251); + for ($_i255 = 0; $_i255 < $_size251; ++$_i255) + { + $elem256 = null; + $xfer += $input->readString($elem256); + $this->group_names []= $elem256; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -2772,15 +8763,54 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 2); - $xfer += $output->writeBool($this->deleteData); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter257) + { + $xfer += $output->writeString($iter257); + } + } + $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 $iter258) + { + $xfer += $output->writeString($iter258); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -2790,48 +8820,48 @@ } -class metastore_ThriftHiveMetastore_drop_database_result { +class metastore_ThriftHiveMetastore_get_partition_with_auth_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidOperationException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_NoSuchObjectException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_database_result'; + return 'ThriftHiveMetastore_get_partition_with_auth_result'; } public function read($input) @@ -2849,26 +8879,26 @@ } switch ($fid) { - case 1: + case 0: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); + $this->success = new metastore_Partition(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidOperationException(); - $xfer += $this->o2->read($input); + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 2: if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -2885,7 +8915,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_with_auth_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -2896,11 +8934,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -2908,29 +8941,45 @@ } -class metastore_ThriftHiveMetastore_get_databases_args { +class metastore_ThriftHiveMetastore_get_partition_by_name_args { static $_TSPEC; - public $pattern = null; + public $db_name = null; + public $tbl_name = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'pattern', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_databases_args'; + return 'ThriftHiveMetastore_get_partition_by_name_args'; } public function read($input) @@ -2950,7 +8999,21 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -2967,10 +9030,20 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_args'); - if ($this->pattern !== null) { - $xfer += $output->writeFieldBegin('pattern', TType::STRING, 1); - $xfer += $output->writeString($this->pattern); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -2980,28 +9053,31 @@ } -class metastore_ThriftHiveMetastore_get_databases_result { +class metastore_ThriftHiveMetastore_get_partition_by_name_result { static $_TSPEC; public $success = null; public $o1 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), ); } if (is_array($vals)) { @@ -3011,11 +9087,14 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_databases_result'; + return 'ThriftHiveMetastore_get_partition_by_name_result'; } public function read($input) @@ -3034,18 +9113,9 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size103 = 0; - $_etype106 = 0; - $xfer += $input->readListBegin($_etype106, $_size103); - for ($_i107 = 0; $_i107 < $_size103; ++$_i107) - { - $elem108 = null; - $xfer += $input->readString($elem108); - $this->success []= $elem108; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Partition(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } @@ -3058,6 +9128,14 @@ $xfer += $input->skip($ftype); } break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -3070,22 +9148,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result'); if ($this->success !== null) { - if (!is_array($this->success)) { + if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter109) - { - $xfer += $output->writeString($iter109); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -3093,6 +9162,11 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -3100,19 +9174,45 @@ } -class metastore_ThriftHiveMetastore_get_all_databases_args { +class metastore_ThriftHiveMetastore_get_partitions_args { static $_TSPEC; + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; - public function __construct() { + public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), ); } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } } public function getName() { - return 'ThriftHiveMetastore_get_all_databases_args'; + return 'ThriftHiveMetastore_get_partitions_args'; } public function read($input) @@ -3130,6 +9230,27 @@ } switch ($fid) { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -3142,7 +9263,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -3150,11 +9286,12 @@ } -class metastore_ThriftHiveMetastore_get_all_databases_result { +class metastore_ThriftHiveMetastore_get_partitions_result { static $_TSPEC; public $success = null; public $o1 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -3162,14 +9299,20 @@ 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -3181,11 +9324,14 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_all_databases_result'; + return 'ThriftHiveMetastore_get_partitions_result'; } public function read($input) @@ -3206,14 +9352,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size110 = 0; - $_etype113 = 0; - $xfer += $input->readListBegin($_etype113, $_size110); - for ($_i114 = 0; $_i114 < $_size110; ++$_i114) + $_size259 = 0; + $_etype262 = 0; + $xfer += $input->readListBegin($_etype262, $_size259); + for ($_i263 = 0; $_i263 < $_size259; ++$_i263) { - $elem115 = null; - $xfer += $input->readString($elem115); - $this->success []= $elem115; + $elem264 = null; + $elem264 = new metastore_Partition(); + $xfer += $elem264->read($input); + $this->success []= $elem264; } $xfer += $input->readListEnd(); } else { @@ -3222,12 +9369,20 @@ break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); + $this->o1 = new metastore_NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -3240,18 +9395,18 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeListBegin(TType::STRING, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter116) + foreach ($this->success as $iter265) { - $xfer += $output->writeString($iter116); + $xfer += $iter265->write($output); } } $output->writeListEnd(); @@ -3263,6 +9418,11 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -3270,29 +9430,65 @@ } -class metastore_ThriftHiveMetastore_get_type_args { +class metastore_ThriftHiveMetastore_get_partitions_with_auth_args { static $_TSPEC; - public $name = null; + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + 4 => array( + 'var' => 'user_name', 'type' => TType::STRING, ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_args'; + return 'ThriftHiveMetastore_get_partitions_with_auth_args'; } public function read($input) @@ -3312,7 +9508,45 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size266 = 0; + $_etype269 = 0; + $xfer += $input->readListBegin($_etype269, $_size266); + for ($_i270 = 0; $_i270 < $_size266; ++$_i270) + { + $elem271 = null; + $xfer += $input->readString($elem271); + $this->group_names []= $elem271; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -3329,10 +9563,42 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter272) + { + $xfer += $output->writeString($iter272); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -3342,7 +9608,7 @@ } -class metastore_ThriftHiveMetastore_get_type_result { +class metastore_ThriftHiveMetastore_get_partitions_with_auth_result { static $_TSPEC; public $success = null; @@ -3354,18 +9620,22 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Type', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_MetaException', ), ); } @@ -3383,7 +9653,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_type_result'; + return 'ThriftHiveMetastore_get_partitions_with_auth_result'; } public function read($input) @@ -3402,16 +9672,26 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Type(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size273 = 0; + $_etype276 = 0; + $xfer += $input->readListBegin($_etype276, $_size273); + for ($_i277 = 0; $_i277 < $_size273; ++$_i277) + { + $elem278 = null; + $elem278 = new metastore_Partition(); + $xfer += $elem278->read($input); + $this->success []= $elem278; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); + $this->o1 = new metastore_NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -3419,7 +9699,7 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); + $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -3437,13 +9717,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_with_auth_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter279) + { + $xfer += $iter279->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -3463,30 +9752,45 @@ } -class metastore_ThriftHiveMetastore_create_type_args { +class metastore_ThriftHiveMetastore_get_partition_names_args { static $_TSPEC; - public $type = null; + public $db_name = null; + public $tbl_name = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'type', - 'type' => TType::STRUCT, - 'class' => 'metastore_Type', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_parts', + 'type' => TType::I16, ), ); } if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_create_type_args'; + return 'ThriftHiveMetastore_get_partition_names_args'; } public function read($input) @@ -3505,9 +9809,22 @@ switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->type = new metastore_Type(); - $xfer += $this->type->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -3524,13 +9841,20 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_args'); - if ($this->type !== null) { - if (!is_object($this->type)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('type', TType::STRUCT, 1); - $xfer += $this->type->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -3540,34 +9864,26 @@ } -class metastore_ThriftHiveMetastore_create_type_result { +class metastore_ThriftHiveMetastore_get_partition_names_result { static $_TSPEC; public $success = null; - public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -3576,20 +9892,14 @@ if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_type_result'; + return 'ThriftHiveMetastore_get_partition_names_result'; } public function read($input) @@ -3608,32 +9918,26 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_AlreadyExistsException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); - $xfer += $this->o2->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size280 = 0; + $_etype283 = 0; + $xfer += $input->readListBegin($_etype283, $_size280); + for ($_i284 = 0; $_i284 < $_size280; ++$_i284) + { + $elem285 = null; + $xfer += $input->readString($elem285); + $this->success []= $elem285; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 1: if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -3650,27 +9954,29 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter286) + { + $xfer += $output->writeString($iter286); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -3678,29 +9984,57 @@ } -class metastore_ThriftHiveMetastore_drop_type_args { +class metastore_ThriftHiveMetastore_get_partitions_ps_args { static $_TSPEC; - public $type = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'type', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', 'type' => TType::STRING, ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), ); } if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_type_args'; + return 'ThriftHiveMetastore_get_partitions_ps_args'; } public function read($input) @@ -3720,7 +10054,38 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size287 = 0; + $_etype290 = 0; + $xfer += $input->readListBegin($_etype290, $_size287); + for ($_i291 = 0; $_i291 < $_size287; ++$_i291) + { + $elem292 = null; + $xfer += $input->readString($elem292); + $this->part_vals []= $elem292; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -3737,10 +10102,37 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_args'); - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 1); - $xfer += $output->writeString($this->type); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter293) + { + $xfer += $output->writeString($iter293); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -3750,30 +10142,29 @@ } -class metastore_ThriftHiveMetastore_drop_type_result { +class metastore_ThriftHiveMetastore_get_partitions_ps_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -3783,14 +10174,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_type_result'; + return 'ThriftHiveMetastore_get_partitions_ps_result'; } public function read($input) @@ -3809,8 +10197,19 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size294 = 0; + $_etype297 = 0; + $xfer += $input->readListBegin($_etype297, $_size294); + for ($_i298 = 0; $_i298 < $_size294; ++$_i298) + { + $elem299 = null; + $elem299 = new metastore_Partition(); + $xfer += $elem299->read($input); + $this->success []= $elem299; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -3823,14 +10222,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -3843,10 +10234,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter300) + { + $xfer += $iter300->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -3854,11 +10257,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -3866,29 +10264,77 @@ } -class metastore_ThriftHiveMetastore_get_type_all_args { +class metastore_ThriftHiveMetastore_get_partitions_ps_with_auth_args { static $_TSPEC; - public $name = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), + 5 => array( + 'var' => 'user_name', 'type' => TType::STRING, ), + 6 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_all_args'; + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_args'; } public function read($input) @@ -3908,7 +10354,62 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size301 = 0; + $_etype304 = 0; + $xfer += $input->readListBegin($_etype304, $_size301); + for ($_i305 = 0; $_i305 < $_size301; ++$_i305) + { + $elem306 = null; + $xfer += $input->readString($elem306); + $this->part_vals []= $elem306; + } + $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(); + $_size307 = 0; + $_etype310 = 0; + $xfer += $input->readListBegin($_etype310, $_size307); + for ($_i311 = 0; $_i311 < $_size307; ++$_i311) + { + $elem312 = null; + $xfer += $input->readString($elem312); + $this->group_names []= $elem312; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -3925,10 +10426,59 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter313) + { + $xfer += $output->writeString($iter313); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 5); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 6); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter314) + { + $xfer += $output->writeString($iter314); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -3938,10 +10488,11 @@ } -class metastore_ThriftHiveMetastore_get_type_all_result { +class metastore_ThriftHiveMetastore_get_partitions_ps_with_auth_result { static $_TSPEC; public $success = null; + public $o1 = null; public $o2 = null; public function __construct($vals=null) { @@ -3949,18 +10500,19 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRUCT, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( 'type' => TType::STRUCT, - 'class' => 'metastore_Type', + 'class' => 'metastore_Partition', ), ), 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', @@ -3971,6 +10523,9 @@ if (isset($vals['success'])) { $this->success = $vals['success']; } + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } @@ -3978,7 +10533,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_type_all_result'; + return 'ThriftHiveMetastore_get_partitions_ps_with_auth_result'; } public function read($input) @@ -3997,28 +10552,33 @@ switch ($fid) { case 0: - if ($ftype == TType::MAP) { + if ($ftype == TType::LST) { $this->success = array(); - $_size117 = 0; - $_ktype118 = 0; - $_vtype119 = 0; - $xfer += $input->readMapBegin($_ktype118, $_vtype119, $_size117); - for ($_i121 = 0; $_i121 < $_size117; ++$_i121) + $_size315 = 0; + $_etype318 = 0; + $xfer += $input->readListBegin($_etype318, $_size315); + for ($_i319 = 0; $_i319 < $_size315; ++$_i319) { - $key122 = ''; - $val123 = new metastore_Type(); - $xfer += $input->readString($key122); - $val123 = new metastore_Type(); - $xfer += $val123->read($input); - $this->success[$key122] = $val123; + $elem320 = null; + $elem320 = new metastore_Partition(); + $xfer += $elem320->read($input); + $this->success []= $elem320; } - $xfer += $input->readMapEnd(); + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { @@ -4037,27 +10597,31 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_with_auth_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $kiter124 => $viter125) + foreach ($this->success as $iter321) { - $xfer += $output->writeString($kiter124); - $xfer += $viter125->write($output); + $xfer += $iter321->write($output); } } - $output->writeMapEnd(); + $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } @@ -4068,11 +10632,13 @@ } -class metastore_ThriftHiveMetastore_get_fields_args { +class metastore_ThriftHiveMetastore_get_partition_names_ps_args { static $_TSPEC; public $db_name = null; - public $table_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4082,23 +10648,41 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'table_name', + 'var' => 'tbl_name', 'type' => TType::STRING, ), + 3 => array( + 'var' => 'part_vals', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), ); } if (is_array($vals)) { if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_get_fields_args'; + return 'ThriftHiveMetastore_get_partition_names_ps_args'; } public function read($input) @@ -4125,7 +10709,31 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->part_vals = array(); + $_size322 = 0; + $_etype325 = 0; + $xfer += $input->readListBegin($_etype325, $_size322); + for ($_i326 = 0; $_i326 < $_size322; ++$_i326) + { + $elem327 = null; + $xfer += $input->readString($elem327); + $this->part_vals []= $elem327; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -4142,15 +10750,37 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->table_name !== null) { - $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); - $xfer += $output->writeString($this->table_name); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter328) + { + $xfer += $output->writeString($iter328); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4160,13 +10790,11 @@ } -class metastore_ThriftHiveMetastore_get_fields_result { +class metastore_ThriftHiveMetastore_get_partition_names_ps_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4174,10 +10802,9 @@ 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRUCT, + 'etype' => TType::STRING, 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', + 'type' => TType::STRING, ), ), 1 => array( @@ -4185,16 +10812,6 @@ 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownTableException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownDBException', - ), ); } if (is_array($vals)) { @@ -4204,17 +10821,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_fields_result'; + return 'ThriftHiveMetastore_get_partition_names_ps_result'; } public function read($input) @@ -4235,15 +10846,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size126 = 0; - $_etype129 = 0; - $xfer += $input->readListBegin($_etype129, $_size126); - for ($_i130 = 0; $_i130 < $_size126; ++$_i130) + $_size329 = 0; + $_etype332 = 0; + $xfer += $input->readListBegin($_etype332, $_size329); + for ($_i333 = 0; $_i333 < $_size329; ++$_i333) { - $elem131 = null; - $elem131 = new metastore_FieldSchema(); - $xfer += $elem131->read($input); - $this->success []= $elem131; + $elem334 = null; + $xfer += $input->readString($elem334); + $this->success []= $elem334; } $xfer += $input->readListEnd(); } else { @@ -4258,22 +10868,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_UnknownTableException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_UnknownDBException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -4286,18 +10880,18 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeListBegin(TType::STRUCT, count($this->success)); + $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter132) + foreach ($this->success as $iter335) { - $xfer += $iter132->write($output); + $xfer += $output->writeString($iter335); } } $output->writeListEnd(); @@ -4305,18 +10899,8 @@ $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->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4326,11 +10910,13 @@ } -class metastore_ThriftHiveMetastore_get_schema_args { +class metastore_ThriftHiveMetastore_get_partitions_by_filter_args { static $_TSPEC; public $db_name = null; - public $table_name = null; + public $tbl_name = null; + public $filter = null; + public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4340,23 +10926,37 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'table_name', + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'filter', 'type' => TType::STRING, ), + 4 => array( + 'var' => 'max_parts', + 'type' => TType::I16, + ), ); } if (is_array($vals)) { if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['filter'])) { + $this->filter = $vals['filter']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_get_schema_args'; + return 'ThriftHiveMetastore_get_partitions_by_filter_args'; } public function read($input) @@ -4383,7 +10983,21 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->filter); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -4400,15 +11014,25 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->table_name !== null) { - $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); - $xfer += $output->writeString($this->table_name); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->filter !== null) { + $xfer += $output->writeFieldBegin('filter', TType::STRING, 3); + $xfer += $output->writeString($this->filter); + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4418,13 +11042,12 @@ } -class metastore_ThriftHiveMetastore_get_schema_result { +class metastore_ThriftHiveMetastore_get_partitions_by_filter_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4435,7 +11058,7 @@ 'etype' => TType::STRUCT, 'elem' => array( 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', + 'class' => 'metastore_Partition', ), ), 1 => array( @@ -4446,12 +11069,7 @@ 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownTableException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownDBException', + 'class' => 'metastore_NoSuchObjectException', ), ); } @@ -4465,14 +11083,11 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_schema_result'; + return 'ThriftHiveMetastore_get_partitions_by_filter_result'; } public function read($input) @@ -4493,15 +11108,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size133 = 0; - $_etype136 = 0; - $xfer += $input->readListBegin($_etype136, $_size133); - for ($_i137 = 0; $_i137 < $_size133; ++$_i137) + $_size336 = 0; + $_etype339 = 0; + $xfer += $input->readListBegin($_etype339, $_size336); + for ($_i340 = 0; $_i340 < $_size336; ++$_i340) { - $elem138 = null; - $elem138 = new metastore_FieldSchema(); - $xfer += $elem138->read($input); - $this->success []= $elem138; + $elem341 = null; + $elem341 = new metastore_Partition(); + $xfer += $elem341->read($input); + $this->success []= $elem341; } $xfer += $input->readListEnd(); } else { @@ -4518,20 +11133,12 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_UnknownTableException(); + $this->o2 = new metastore_NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_UnknownDBException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -4544,7 +11151,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -4553,9 +11160,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter139) + foreach ($this->success as $iter342) { - $xfer += $iter139->write($output); + $xfer += $iter342->write($output); } } $output->writeListEnd(); @@ -4572,11 +11179,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4584,30 +11186,46 @@ } -class metastore_ThriftHiveMetastore_create_table_args { +class metastore_ThriftHiveMetastore_alter_partition_args { static $_TSPEC; - public $tbl = null; + public $db_name = null; + public $tbl_name = null; + public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'tbl', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_part', 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'class' => 'metastore_Partition', ), ); } if (is_array($vals)) { - if (isset($vals['tbl'])) { - $this->tbl = $vals['tbl']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_create_table_args'; + return 'ThriftHiveMetastore_alter_partition_args'; } public function read($input) @@ -4626,9 +11244,23 @@ switch ($fid) { case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: if ($ftype == TType::STRUCT) { - $this->tbl = new metastore_Table(); - $xfer += $this->tbl->read($input); + $this->new_part = new metastore_Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -4645,13 +11277,23 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_args'); - if ($this->tbl !== null) { - if (!is_object($this->tbl)) { + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_part !== null) { + if (!is_object($this->new_part)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); - $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); + $xfer += $this->new_part->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4661,13 +11303,11 @@ } -class metastore_ThriftHiveMetastore_create_table_result { +class metastore_ThriftHiveMetastore_alter_partition_result { static $_TSPEC; public $o1 = null; public $o2 = null; - public $o3 = null; - public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4675,23 +11315,13 @@ 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', + 'class' => 'metastore_InvalidOperationException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -4701,17 +11331,11 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } - if (isset($vals['o4'])) { - $this->o4 = $vals['o4']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_table_result'; + return 'ThriftHiveMetastore_alter_partition_result'; } public function read($input) @@ -4731,7 +11355,7 @@ { case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_AlreadyExistsException(); + $this->o1 = new metastore_InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -4739,28 +11363,12 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); + $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new metastore_NoSuchObjectException(); - $xfer += $this->o4->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -4773,7 +11381,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -4784,16 +11392,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o4 !== null) { - $xfer += $output->writeFieldBegin('o4', TType::STRUCT, 4); - $xfer += $this->o4->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -4801,45 +11399,37 @@ } -class metastore_ThriftHiveMetastore_drop_table_args { +class metastore_ThriftHiveMetastore_get_config_value_args { static $_TSPEC; - public $dbname = null; public $name = null; - public $deleteData = null; + public $defaultValue = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', + 'var' => 'name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'name', + 'var' => 'defaultValue', 'type' => TType::STRING, ), - 3 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } if (isset($vals['name'])) { $this->name = $vals['name']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['defaultValue'])) { + $this->defaultValue = $vals['defaultValue']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_args'; + return 'ThriftHiveMetastore_get_config_value_args'; } public function read($input) @@ -4859,21 +11449,14 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); - } 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); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->defaultValue); } else { $xfer += $input->skip($ftype); } @@ -4890,20 +11473,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_args'); if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 2); + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); $xfer += $output->writeString($this->name); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); - $xfer += $output->writeBool($this->deleteData); + if ($this->defaultValue !== null) { + $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); + $xfer += $output->writeString($this->defaultValue); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4913,39 +11491,38 @@ } -class metastore_ThriftHiveMetastore_drop_table_result { +class metastore_ThriftHiveMetastore_get_config_value_result { static $_TSPEC; + public $success = null; public $o1 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_ConfigValSecurityException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_result'; + return 'ThriftHiveMetastore_get_config_value_result'; } public function read($input) @@ -4963,18 +11540,17 @@ } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->success); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); + $this->o1 = new metastore_ConfigValSecurityException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -4991,17 +11567,17 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -5009,37 +11585,29 @@ } -class metastore_ThriftHiveMetastore_get_tables_args { +class metastore_ThriftHiveMetastore_partition_name_to_vals_args { static $_TSPEC; - public $db_name = null; - public $pattern = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'pattern', + 'var' => 'part_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_tables_args'; + return 'ThriftHiveMetastore_partition_name_to_vals_args'; } public function read($input) @@ -5059,14 +11627,7 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -5083,15 +11644,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->pattern !== null) { - $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); - $xfer += $output->writeString($this->pattern); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_args'); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5101,7 +11657,7 @@ } -class metastore_ThriftHiveMetastore_get_tables_result { +class metastore_ThriftHiveMetastore_partition_name_to_vals_result { static $_TSPEC; public $success = null; @@ -5136,7 +11692,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_tables_result'; + return 'ThriftHiveMetastore_partition_name_to_vals_result'; } public function read($input) @@ -5157,14 +11713,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size140 = 0; - $_etype143 = 0; - $xfer += $input->readListBegin($_etype143, $_size140); - for ($_i144 = 0; $_i144 < $_size140; ++$_i144) + $_size343 = 0; + $_etype346 = 0; + $xfer += $input->readListBegin($_etype346, $_size343); + for ($_i347 = 0; $_i347 < $_size343; ++$_i347) { - $elem145 = null; - $xfer += $input->readString($elem145); - $this->success []= $elem145; + $elem348 = null; + $xfer += $input->readString($elem348); + $this->success []= $elem348; } $xfer += $input->readListEnd(); } else { @@ -5191,7 +11747,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -5200,9 +11756,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter146) + foreach ($this->success as $iter349) { - $xfer += $output->writeString($iter146); + $xfer += $output->writeString($iter349); } } $output->writeListEnd(); @@ -5221,29 +11777,29 @@ } -class metastore_ThriftHiveMetastore_get_all_tables_args { +class metastore_ThriftHiveMetastore_partition_name_to_spec_args { static $_TSPEC; - public $db_name = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'part_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_all_tables_args'; + return 'ThriftHiveMetastore_partition_name_to_spec_args'; } public function read($input) @@ -5263,7 +11819,7 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -5280,10 +11836,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_args'); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5293,7 +11849,7 @@ } -class metastore_ThriftHiveMetastore_get_all_tables_result { +class metastore_ThriftHiveMetastore_partition_name_to_spec_result { static $_TSPEC; public $success = null; @@ -5304,9 +11860,13 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( 'type' => TType::STRING, ), ), @@ -5328,7 +11888,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_all_tables_result'; + return 'ThriftHiveMetastore_partition_name_to_spec_result'; } public function read($input) @@ -5347,18 +11907,21 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { + if ($ftype == TType::MAP) { $this->success = array(); - $_size147 = 0; - $_etype150 = 0; - $xfer += $input->readListBegin($_etype150, $_size147); - for ($_i151 = 0; $_i151 < $_size147; ++$_i151) + $_size350 = 0; + $_ktype351 = 0; + $_vtype352 = 0; + $xfer += $input->readMapBegin($_ktype351, $_vtype352, $_size350); + for ($_i354 = 0; $_i354 < $_size350; ++$_i354) { - $elem152 = null; - $xfer += $input->readString($elem152); - $this->success []= $elem152; + $key355 = ''; + $val356 = ''; + $xfer += $input->readString($key355); + $xfer += $input->readString($val356); + $this->success[$key355] = $val356; } - $xfer += $input->readListEnd(); + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } @@ -5383,21 +11946,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_tables_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); { - $output->writeListBegin(TType::STRING, count($this->success)); + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); { - foreach ($this->success as $iter153) + foreach ($this->success as $kiter357 => $viter358) { - $xfer += $output->writeString($iter153); + $xfer += $output->writeString($kiter357); + $xfer += $output->writeString($viter358); } } - $output->writeListEnd(); + $output->writeMapEnd(); } $xfer += $output->writeFieldEnd(); } @@ -5413,37 +11977,39 @@ } -class metastore_ThriftHiveMetastore_get_table_args { +class metastore_ThriftHiveMetastore_add_index_args { static $_TSPEC; - public $dbname = null; - public $tbl_name = null; + public $new_index = null; + public $index_table = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, + 'var' => 'new_index', + 'type' => TType::STRUCT, + 'class' => 'metastore_Index', ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'index_table', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['new_index'])) { + $this->new_index = $vals['new_index']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['index_table'])) { + $this->index_table = $vals['index_table']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_args'; + return 'ThriftHiveMetastore_add_index_args'; } public function read($input) @@ -5462,15 +12028,17 @@ switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + if ($ftype == TType::STRUCT) { + $this->new_index = new metastore_Index(); + $xfer += $this->new_index->read($input); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + if ($ftype == TType::STRUCT) { + $this->index_table = new metastore_Table(); + $xfer += $this->index_table->read($input); } else { $xfer += $input->skip($ftype); } @@ -5487,15 +12055,21 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_args'); + if ($this->new_index !== null) { + if (!is_object($this->new_index)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_index', TType::STRUCT, 1); + $xfer += $this->new_index->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->index_table !== null) { + if (!is_object($this->index_table)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('index_table', TType::STRUCT, 2); + $xfer += $this->index_table->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5505,12 +12079,13 @@ } -class metastore_ThriftHiveMetastore_get_table_result { +class metastore_ThriftHiveMetastore_add_index_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; + public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -5518,17 +12093,22 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'class' => 'metastore_Index', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', ), ); } @@ -5542,11 +12122,14 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_table_result'; + return 'ThriftHiveMetastore_add_index_result'; } public function read($input) @@ -5566,7 +12149,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Table(); + $this->success = new metastore_Index(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -5574,7 +12157,7 @@ break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); + $this->o1 = new metastore_InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -5582,12 +12165,20 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); + $this->o2 = new metastore_AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -5600,7 +12191,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -5619,6 +12210,11 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -5626,12 +12222,13 @@ } -class metastore_ThriftHiveMetastore_alter_table_args { +class metastore_ThriftHiveMetastore_alter_index_args { static $_TSPEC; public $dbname = null; - public $tbl_name = null; - public $new_tbl = null; + public $base_tbl_name = null; + public $idx_name = null; + public $new_idx = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -5641,13 +12238,17 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'base_tbl_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_tbl', + 'var' => 'idx_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'new_idx', 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'class' => 'metastore_Index', ), ); } @@ -5655,17 +12256,20 @@ if (isset($vals['dbname'])) { $this->dbname = $vals['dbname']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['base_tbl_name'])) { + $this->base_tbl_name = $vals['base_tbl_name']; } - if (isset($vals['new_tbl'])) { - $this->new_tbl = $vals['new_tbl']; + if (isset($vals['idx_name'])) { + $this->idx_name = $vals['idx_name']; + } + if (isset($vals['new_idx'])) { + $this->new_idx = $vals['new_idx']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_table_args'; + return 'ThriftHiveMetastore_alter_index_args'; } public function read($input) @@ -5692,15 +12296,22 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->base_tbl_name); } else { $xfer += $input->skip($ftype); } break; case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->idx_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: if ($ftype == TType::STRUCT) { - $this->new_tbl = new metastore_Table(); - $xfer += $this->new_tbl->read($input); + $this->new_idx = new metastore_Index(); + $xfer += $this->new_idx->read($input); } else { $xfer += $input->skip($ftype); } @@ -5717,23 +12328,28 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_args'); if ($this->dbname !== null) { $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); $xfer += $output->writeString($this->dbname); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->base_tbl_name !== null) { + $xfer += $output->writeFieldBegin('base_tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->base_tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->new_tbl !== null) { - if (!is_object($this->new_tbl)) { + if ($this->idx_name !== null) { + $xfer += $output->writeFieldBegin('idx_name', TType::STRING, 3); + $xfer += $output->writeString($this->idx_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->new_idx !== null) { + if (!is_object($this->new_idx)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('new_tbl', TType::STRUCT, 3); - $xfer += $this->new_tbl->write($output); + $xfer += $output->writeFieldBegin('new_idx', TType::STRUCT, 4); + $xfer += $this->new_idx->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5743,7 +12359,7 @@ } -class metastore_ThriftHiveMetastore_alter_table_result { +class metastore_ThriftHiveMetastore_alter_index_result { static $_TSPEC; public $o1 = null; @@ -5775,7 +12391,7 @@ } public function getName() { - return 'ThriftHiveMetastore_alter_table_result'; + return 'ThriftHiveMetastore_alter_index_result'; } public function read($input) @@ -5821,7 +12437,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_result'); if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -5839,30 +12455,53 @@ } -class metastore_ThriftHiveMetastore_add_partition_args { +class metastore_ThriftHiveMetastore_drop_index_by_name_args { static $_TSPEC; - public $new_part = null; + public $db_name = null; + public $tbl_name = null; + public $index_name = null; + public $deleteData = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'index_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, ), ); } if (is_array($vals)) { - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; } } } public function getName() { - return 'ThriftHiveMetastore_add_partition_args'; + return 'ThriftHiveMetastore_drop_index_by_name_args'; } public function read($input) @@ -5881,9 +12520,29 @@ switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->new_part = new metastore_Partition(); - $xfer += $this->new_part->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); } else { $xfer += $input->skip($ftype); } @@ -5900,13 +12559,25 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_args'); - if ($this->new_part !== null) { - if (!is_object($this->new_part)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 1); - $xfer += $this->new_part->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5916,35 +12587,28 @@ } -class metastore_ThriftHiveMetastore_add_partition_result { +class metastore_ThriftHiveMetastore_drop_index_by_name_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', + 'class' => 'metastore_NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -5959,14 +12623,11 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_add_partition_result'; + return 'ThriftHiveMetastore_drop_index_by_name_result'; } public function read($input) @@ -5985,16 +12646,15 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); + $this->o1 = new metastore_NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -6002,20 +12662,12 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); + $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -6028,13 +12680,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_result'); if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -6047,11 +12696,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -6059,12 +12703,12 @@ } -class metastore_ThriftHiveMetastore_append_partition_args { +class metastore_ThriftHiveMetastore_get_index_by_name_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; + public $index_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6078,12 +12722,8 @@ 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'var' => 'index_name', + 'type' => TType::STRING, ), ); } @@ -6094,14 +12734,14 @@ if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_args'; + return 'ThriftHiveMetastore_get_index_by_name_args'; } public function read($input) @@ -6134,18 +12774,8 @@ } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size154 = 0; - $_etype157 = 0; - $xfer += $input->readListBegin($_etype157, $_size154); - for ($_i158 = 0; $_i158 < $_size154; ++$_i158) - { - $elem159 = null; - $xfer += $input->readString($elem159); - $this->part_vals []= $elem159; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->index_name); } else { $xfer += $input->skip($ftype); } @@ -6162,7 +12792,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -6173,21 +12803,9 @@ $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter160) - { - $xfer += $output->writeString($iter160); - } - } - $output->writeListEnd(); - } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6197,13 +12815,12 @@ } -class metastore_ThriftHiveMetastore_append_partition_result { +class metastore_ThriftHiveMetastore_get_index_by_name_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6211,22 +12828,17 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'class' => 'metastore_Index', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', + 'class' => 'metastore_MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_NoSuchObjectException', ), ); } @@ -6240,14 +12852,11 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_result'; + return 'ThriftHiveMetastore_get_index_by_name_result'; } public function read($input) @@ -6267,7 +12876,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Partition(); + $this->success = new metastore_Index(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -6275,7 +12884,7 @@ break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -6283,20 +12892,12 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); + $this->o2 = new metastore_NoSuchObjectException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -6309,7 +12910,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -6328,11 +12929,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -6340,12 +12936,12 @@ } -class metastore_ThriftHiveMetastore_append_partition_by_name_args { +class metastore_ThriftHiveMetastore_get_indexes_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_name = null; + public $max_indexes = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6359,8 +12955,8 @@ 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } @@ -6371,14 +12967,14 @@ if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_args'; + return 'ThriftHiveMetastore_get_indexes_args'; } public function read($input) @@ -6411,8 +13007,8 @@ } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); } else { $xfer += $input->skip($ftype); } @@ -6429,7 +13025,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -6440,9 +13036,9 @@ $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); + if ($this->max_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6452,35 +13048,33 @@ } -class metastore_ThriftHiveMetastore_append_partition_by_name_result { +class metastore_ThriftHiveMetastore_get_indexes_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Index', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', + 'class' => 'metastore_NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -6495,14 +13089,11 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_result'; + return 'ThriftHiveMetastore_get_indexes_result'; } public function read($input) @@ -6521,16 +13112,26 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Partition(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size359 = 0; + $_etype362 = 0; + $xfer += $input->readListBegin($_etype362, $_size359); + for ($_i363 = 0; $_i363 < $_size359; ++$_i363) + { + $elem364 = null; + $elem364 = new metastore_Index(); + $xfer += $elem364->read($input); + $this->success []= $elem364; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); + $this->o1 = new metastore_NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -6538,20 +13139,12 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); + $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -6564,13 +13157,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_append_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter365) + { + $xfer += $iter365->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -6583,11 +13185,6 @@ $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -6595,13 +13192,12 @@ } -class metastore_ThriftHiveMetastore_drop_partition_args { +class metastore_ThriftHiveMetastore_get_index_names_args { static $_TSPEC; public $db_name = null; public $tbl_name = null; - public $part_vals = null; - public $deleteData = null; + public $max_indexes = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -6615,16 +13211,8 @@ 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } @@ -6635,17 +13223,14 @@ if (isset($vals['tbl_name'])) { $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_args'; + return 'ThriftHiveMetastore_get_index_names_args'; } public function read($input) @@ -6678,25 +13263,8 @@ } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size161 = 0; - $_etype164 = 0; - $xfer += $input->readListBegin($_etype164, $_size161); - for ($_i165 = 0; $_i165 < $_size161; ++$_i165) - { - $elem166 = null; - $xfer += $input->readString($elem166); - $this->part_vals []= $elem166; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_indexes); } else { $xfer += $input->skip($ftype); } @@ -6713,7 +13281,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); @@ -6724,26 +13292,9 @@ $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter167) - { - $xfer += $output->writeString($iter167); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + if ($this->max_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6753,11 +13304,10 @@ } -class metastore_ThriftHiveMetastore_drop_partition_result { +class metastore_ThriftHiveMetastore_get_index_names_result { static $_TSPEC; public $success = null; - public $o1 = null; public $o2 = null; public function __construct($vals=null) { @@ -6765,14 +13315,13 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', @@ -6783,9 +13332,6 @@ if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } @@ -6793,7 +13339,7 @@ } public function getName() { - return 'ThriftHiveMetastore_drop_partition_result'; + return 'ThriftHiveMetastore_get_index_names_result'; } public function read($input) @@ -6812,22 +13358,24 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size366 = 0; + $_etype369 = 0; + $xfer += $input->readListBegin($_etype369, $_size366); + for ($_i370 = 0; $_i370 < $_size366; ++$_i370) + { + $elem371 = null; + $xfer += $input->readString($elem371); + $this->success []= $elem371; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { $this->o2 = new metastore_MetaException(); $xfer += $this->o2->read($input); } else { @@ -6846,19 +13394,26 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter372) + { + $xfer += $output->writeString($iter372); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } @@ -6869,53 +13424,41 @@ } -class metastore_ThriftHiveMetastore_drop_partition_by_name_args { +class metastore_ThriftHiveMetastore_get_user_privilege_set_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $part_name = null; - public $deleteData = null; - + public $user_name = null; + public $group_names = null; + public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'part_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['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_args'; + return 'ThriftHiveMetastore_get_user_privilege_set_args'; } public function read($input) @@ -6935,28 +13478,24 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size373 = 0; + $_etype376 = 0; + $xfer += $input->readListBegin($_etype376, $_size373); + for ($_i377 = 0; $_i377 < $_size373; ++$_i377) + { + $elem378 = null; + $xfer += $input->readString($elem378); + $this->group_names []= $elem378; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -6973,25 +13512,27 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_user_privilege_set_args'); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 1); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter379) + { + $xfer += $output->writeString($iter379); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7001,28 +13542,23 @@ } -class metastore_ThriftHiveMetastore_drop_partition_by_name_result { +class metastore_ThriftHiveMetastore_get_user_privilege_set_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -7034,14 +13570,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_result'; + return 'ThriftHiveMetastore_get_user_privilege_set_result'; } public function read($input) @@ -7060,28 +13593,21 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::STRUCT) { + $this->success = new metastore_PrincipalPrivilegeSet(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -7094,10 +13620,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_user_privilege_set_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -7105,11 +13634,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7117,12 +13641,12 @@ } -class metastore_ThriftHiveMetastore_get_partition_args { +class metastore_ThriftHiveMetastore_get_db_privilege_set_args { static $_TSPEC; public $db_name = null; - public $tbl_name = null; - public $part_vals = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7132,11 +13656,11 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', + 'var' => 'group_names', 'type' => TType::LST, 'etype' => TType::STRING, 'elem' => array( @@ -7149,17 +13673,17 @@ if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_args'; + return 'ThriftHiveMetastore_get_db_privilege_set_args'; } public function read($input) @@ -7186,22 +13710,22 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size168 = 0; - $_etype171 = 0; - $xfer += $input->readListBegin($_etype171, $_size168); - for ($_i172 = 0; $_i172 < $_size168; ++$_i172) + $this->group_names = array(); + $_size380 = 0; + $_etype383 = 0; + $xfer += $input->readListBegin($_etype383, $_size380); + for ($_i384 = 0; $_i384 < $_size380; ++$_i384) { - $elem173 = null; - $xfer += $input->readString($elem173); - $this->part_vals []= $elem173; + $elem385 = null; + $xfer += $input->readString($elem385); + $this->group_names []= $elem385; } $xfer += $input->readListEnd(); } else { @@ -7220,28 +13744,28 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_db_privilege_set_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 2); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + $xfer += $output->writeFieldBegin('group_names', TType::LST, 3); { - $output->writeListBegin(TType::STRING, count($this->part_vals)); + $output->writeListBegin(TType::STRING, count($this->group_names)); { - foreach ($this->part_vals as $iter174) + foreach ($this->group_names as $iter386) { - $xfer += $output->writeString($iter174); + $xfer += $output->writeString($iter386); } } $output->writeListEnd(); @@ -7255,12 +13779,11 @@ } -class metastore_ThriftHiveMetastore_get_partition_result { +class metastore_ThriftHiveMetastore_get_db_privilege_set_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7268,18 +13791,13 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'class' => 'metastore_PrincipalPrivilegeSet', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -7289,14 +13807,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_result'; + return 'ThriftHiveMetastore_get_db_privilege_set_result'; } public function read($input) @@ -7316,7 +13831,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Partition(); + $this->success = new metastore_PrincipalPrivilegeSet(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -7330,14 +13845,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -7350,7 +13857,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_db_privilege_set_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -7364,11 +13871,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7376,12 +13878,13 @@ } -class metastore_ThriftHiveMetastore_get_partition_by_name_args { +class metastore_ThriftHiveMetastore_get_table_privilege_set_args { static $_TSPEC; public $db_name = null; - public $tbl_name = null; - public $part_name = null; + public $table_name = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7391,30 +13894,41 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'table_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', + 'var' => 'user_name', 'type' => TType::STRING, ), + 4 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), ); } if (is_array($vals)) { if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_by_name_args'; + return 'ThriftHiveMetastore_get_table_privilege_set_args'; } public function read($input) @@ -7441,14 +13955,31 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } break; case 3: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size387 = 0; + $_etype390 = 0; + $xfer += $input->readListBegin($_etype390, $_size387); + for ($_i391 = 0; $_i391 < $_size387; ++$_i391) + { + $elem392 = null; + $xfer += $input->readString($elem392); + $this->group_names []= $elem392; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -7465,20 +13996,37 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_privilege_set_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 3); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 4); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter393) + { + $xfer += $output->writeString($iter393); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7488,12 +14036,11 @@ } -class metastore_ThriftHiveMetastore_get_partition_by_name_result { +class metastore_ThriftHiveMetastore_get_table_privilege_set_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7501,18 +14048,13 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'class' => 'metastore_PrincipalPrivilegeSet', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -7522,14 +14064,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_by_name_result'; + return 'ThriftHiveMetastore_get_table_privilege_set_result'; } public function read($input) @@ -7549,7 +14088,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Partition(); + $this->success = new metastore_PrincipalPrivilegeSet(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -7563,14 +14102,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -7583,7 +14114,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_privilege_set_result'); if ($this->success !== null) { if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -7597,11 +14128,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7609,12 +14135,14 @@ } -class metastore_ThriftHiveMetastore_get_partitions_args { +class metastore_ThriftHiveMetastore_get_partition_privilege_set_args { static $_TSPEC; public $db_name = null; - public $tbl_name = null; - public $max_parts = -1; + public $table_name = null; + public $part_name = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7623,13 +14151,25 @@ 'var' => 'db_name', 'type' => TType::STRING, ), - 2 => array( - 'var' => 'tbl_name', + 2 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'user_name', 'type' => TType::STRING, ), - 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -7637,17 +14177,23 @@ if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_args'; + return 'ThriftHiveMetastore_get_partition_privilege_set_args'; } public function read($input) @@ -7674,14 +14220,38 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size394 = 0; + $_etype397 = 0; + $xfer += $input->readListBegin($_etype397, $_size394); + for ($_i398 = 0; $_i398 < $_size394; ++$_i398) + { + $elem399 = null; + $xfer += $input->readString($elem399); + $this->group_names []= $elem399; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -7698,20 +14268,42 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_privilege_set_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); - $xfer += $output->writeI16($this->max_parts); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 4); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 5); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter400) + { + $xfer += $output->writeString($iter400); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7721,33 +14313,23 @@ } -class metastore_ThriftHiveMetastore_get_partitions_result { +class metastore_ThriftHiveMetastore_get_partition_privilege_set_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', - ), + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -7759,14 +14341,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_result'; + return 'ThriftHiveMetastore_get_partition_privilege_set_result'; } public function read($input) @@ -7785,39 +14364,21 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size175 = 0; - $_etype178 = 0; - $xfer += $input->readListBegin($_etype178, $_size175); - for ($_i179 = 0; $_i179 < $_size175; ++$_i179) - { - $elem180 = null; - $elem180 = new metastore_Partition(); - $xfer += $elem180->read($input); - $this->success []= $elem180; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new metastore_PrincipalPrivilegeSet(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -7830,22 +14391,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_privilege_set_result'); if ($this->success !== null) { - if (!is_array($this->success)) { + if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter181) - { - $xfer += $iter181->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -7853,11 +14405,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -7865,12 +14412,15 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_args { +class metastore_ThriftHiveMetastore_get_column_privilege_set_args { static $_TSPEC; public $db_name = null; - public $tbl_name = null; - public $max_parts = -1; + public $table_name = null; + public $part_name = null; + public $column_name = null; + public $user_name = null; + public $group_names = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -7880,12 +14430,28 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'table_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'column_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -7893,17 +14459,26 @@ if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['column_name'])) { + $this->column_name = $vals['column_name']; + } + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; + } + if (isset($vals['group_names'])) { + $this->group_names = $vals['group_names']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_args'; + return 'ThriftHiveMetastore_get_column_privilege_set_args'; } public function read($input) @@ -7930,14 +14505,45 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->user_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->group_names = array(); + $_size401 = 0; + $_etype404 = 0; + $xfer += $input->readListBegin($_etype404, $_size401); + for ($_i405 = 0; $_i405 < $_size401; ++$_i405) + { + $elem406 = null; + $xfer += $input->readString($elem406); + $this->group_names []= $elem406; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -7954,20 +14560,47 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_column_privilege_set_args'); if ($this->db_name !== null) { $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); - $xfer += $output->writeI16($this->max_parts); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->column_name !== null) { + $xfer += $output->writeFieldBegin('column_name', TType::STRING, 4); + $xfer += $output->writeString($this->column_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 5); + $xfer += $output->writeString($this->user_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->group_names !== null) { + if (!is_array($this->group_names)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('group_names', TType::LST, 6); + { + $output->writeListBegin(TType::STRING, count($this->group_names)); + { + foreach ($this->group_names as $iter407) + { + $xfer += $output->writeString($iter407); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7977,25 +14610,22 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_result { +class metastore_ThriftHiveMetastore_get_column_privilege_set_result { static $_TSPEC; public $success = null; - public $o2 = null; + public $o1 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', ), 1 => array( - 'var' => 'o2', + 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), @@ -8005,14 +14635,14 @@ if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_result'; + return 'ThriftHiveMetastore_get_column_privilege_set_result'; } public function read($input) @@ -8031,26 +14661,17 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size182 = 0; - $_etype185 = 0; - $xfer += $input->readListBegin($_etype185, $_size182); - for ($_i186 = 0; $_i186 < $_size182; ++$_i186) - { - $elem187 = null; - $xfer += $input->readString($elem187); - $this->success []= $elem187; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRUCT) { + $this->success = new metastore_PrincipalPrivilegeSet(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -8067,27 +14688,18 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_column_privilege_set_result'); if ($this->success !== null) { - if (!is_array($this->success)) { + if (!is_object($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter188) - { - $xfer += $output->writeString($iter188); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); - $xfer += $this->o2->write($output); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8097,57 +14709,45 @@ } -class metastore_ThriftHiveMetastore_get_partitions_ps_args { +class metastore_ThriftHiveMetastore_create_role_args { static $_TSPEC; + public $role_name = null; + public $owner_name = null; public $db_name = null; - public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'role_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'owner_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'db_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; + if (isset($vals['owner_name'])) { + $this->owner_name = $vals['owner_name']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_args'; + return 'ThriftHiveMetastore_create_role_args'; } public function read($input) @@ -8167,38 +14767,21 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->role_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->owner_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size189 = 0; - $_etype192 = 0; - $xfer += $input->readListBegin($_etype192, $_size189); - for ($_i193 = 0; $_i193 < $_size189; ++$_i193) - { - $elem194 = null; - $xfer += $input->readString($elem194); - $this->part_vals []= $elem194; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -8215,37 +14798,20 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_role_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); $xfer += $output->writeFieldEnd(); } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter195) - { - $xfer += $output->writeString($iter195); - } - } - $output->writeListEnd(); - } + if ($this->owner_name !== null) { + $xfer += $output->writeFieldBegin('owner_name', TType::STRING, 2); + $xfer += $output->writeString($this->owner_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 3); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8255,7 +14821,7 @@ } -class metastore_ThriftHiveMetastore_get_partitions_ps_result { +class metastore_ThriftHiveMetastore_create_role_result { static $_TSPEC; public $success = null; @@ -8266,12 +14832,7 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', @@ -8291,7 +14852,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_result'; + return 'ThriftHiveMetastore_create_role_result'; } public function read($input) @@ -8310,19 +14871,8 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size196 = 0; - $_etype199 = 0; - $xfer += $input->readListBegin($_etype199, $_size196); - for ($_i200 = 0; $_i200 < $_size196; ++$_i200) - { - $elem201 = null; - $elem201 = new metastore_Partition(); - $xfer += $elem201->read($input); - $this->success []= $elem201; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -8347,22 +14897,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_role_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter202) - { - $xfer += $iter202->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8377,57 +14915,37 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_ps_args { +class metastore_ThriftHiveMetastore_drop_role_args { static $_TSPEC; + public $role_name = null; public $db_name = null; - public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'role_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'db_name', 'type' => TType::STRING, ), - 3 => array( - 'var' => 'part_vals', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, - ), ); } if (is_array($vals)) { + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; + } if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_args'; + return 'ThriftHiveMetastore_drop_role_args'; } public function read($input) @@ -8447,38 +14965,14 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->role_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_size203 = 0; - $_etype206 = 0; - $xfer += $input->readListBegin($_etype206, $_size203); - for ($_i207 = 0; $_i207 < $_size203; ++$_i207) - { - $elem208 = null; - $xfer += $input->readString($elem208); - $this->part_vals []= $elem208; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -8495,37 +14989,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->part_vals !== null) { - if (!is_array($this->part_vals)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter209) - { - $xfer += $output->writeString($iter209); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_role_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 2); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8535,7 +15007,7 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_ps_result { +class metastore_ThriftHiveMetastore_drop_role_result { static $_TSPEC; public $success = null; @@ -8546,11 +15018,7 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', @@ -8570,7 +15038,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_result'; + return 'ThriftHiveMetastore_drop_role_result'; } public function read($input) @@ -8589,18 +15057,8 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size210 = 0; - $_etype213 = 0; - $xfer += $input->readListBegin($_etype213, $_size210); - for ($_i214 = 0; $_i214 < $_size210; ++$_i214) - { - $elem215 = null; - $xfer += $input->readString($elem215); - $this->success []= $elem215; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -8625,22 +15083,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_ps_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_role_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter216) - { - $xfer += $output->writeString($iter216); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8655,53 +15101,61 @@ } -class metastore_ThriftHiveMetastore_get_partitions_by_filter_args { +class metastore_ThriftHiveMetastore_add_role_member_args { static $_TSPEC; + public $role_name = null; + public $user_name = null; + public $is_role = null; + public $is_group = null; public $db_name = null; - public $tbl_name = null; - public $filter = null; - public $max_parts = -1; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'role_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'filter', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 4 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 5 => array( + 'var' => 'db_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['filter'])) { - $this->filter = $vals['filter']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_args'; + return 'ThriftHiveMetastore_add_role_member_args'; } public function read($input) @@ -8721,28 +15175,35 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->role_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->filter); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -8759,25 +15220,30 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_role_member_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 2); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->filter !== null) { - $xfer += $output->writeFieldBegin('filter', TType::STRING, 3); - $xfer += $output->writeString($this->filter); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); $xfer += $output->writeFieldEnd(); } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 4); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 5); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8787,35 +15253,24 @@ } -class metastore_ThriftHiveMetastore_get_partitions_by_filter_result { +class metastore_ThriftHiveMetastore_add_role_member_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -8825,14 +15280,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_result'; + return 'ThriftHiveMetastore_add_role_member_result'; } public function read($input) @@ -8851,19 +15303,8 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size217 = 0; - $_etype220 = 0; - $xfer += $input->readListBegin($_etype220, $_size217); - for ($_i221 = 0; $_i221 < $_size217; ++$_i221) - { - $elem222 = null; - $elem222 = new metastore_Partition(); - $xfer += $elem222->read($input); - $this->success []= $elem222; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -8876,14 +15317,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -8896,22 +15329,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_by_filter_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_role_member_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter223) - { - $xfer += $iter223->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8919,11 +15340,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -8931,46 +15347,61 @@ } -class metastore_ThriftHiveMetastore_alter_partition_args { +class metastore_ThriftHiveMetastore_remove_role_member_args { static $_TSPEC; + public $role_name = null; + public $user_name = null; + public $is_role = null; + public $is_group = null; public $db_name = null; - public $tbl_name = null; - public $new_part = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'role_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', + 'var' => 'is_role', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 5 => array( + 'var' => 'db_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['role_name'])) { + $this->role_name = $vals['role_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_args'; + return 'ThriftHiveMetastore_remove_role_member_args'; } public function read($input) @@ -8990,22 +15421,35 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->role_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRUCT) { - $this->new_part = new metastore_Partition(); - $xfer += $this->new_part->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -9022,23 +15466,30 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_remove_role_member_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 2); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->new_part !== null) { - if (!is_object($this->new_part)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_part', TType::STRUCT, 3); - $xfer += $this->new_part->write($output); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 4); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 5); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9048,39 +15499,38 @@ } -class metastore_ThriftHiveMetastore_alter_partition_result { +class metastore_ThriftHiveMetastore_remove_role_member_result { static $_TSPEC; + public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidOperationException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_result'; + return 'ThriftHiveMetastore_remove_role_member_result'; } public function read($input) @@ -9098,18 +15548,17 @@ } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidOperationException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -9126,17 +15575,17 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_partition_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_remove_role_member_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -9144,37 +15593,53 @@ } -class metastore_ThriftHiveMetastore_get_config_value_args { +class metastore_ThriftHiveMetastore_list_roles_args { static $_TSPEC; - public $name = null; - public $defaultValue = null; + public $principal_name = null; + public $is_role = null; + public $is_group = null; + public $db_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'principal_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'defaultValue', + 'var' => 'is_role', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'db_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; } - if (isset($vals['defaultValue'])) { - $this->defaultValue = $vals['defaultValue']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_config_value_args'; + return 'ThriftHiveMetastore_list_roles_args'; } public function read($input) @@ -9194,14 +15659,28 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->principal_name); } else { $xfer += $input->skip($ftype); } break; case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->defaultValue); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -9218,15 +15697,25 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_roles_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); $xfer += $output->writeFieldEnd(); } - if ($this->defaultValue !== null) { - $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); - $xfer += $output->writeString($this->defaultValue); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 4); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9236,7 +15725,7 @@ } -class metastore_ThriftHiveMetastore_get_config_value_result { +class metastore_ThriftHiveMetastore_list_roles_result { static $_TSPEC; public $success = null; @@ -9247,12 +15736,17 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRING, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Role', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_ConfigValSecurityException', + 'class' => 'metastore_MetaException', ), ); } @@ -9267,7 +15761,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_config_value_result'; + return 'ThriftHiveMetastore_list_roles_result'; } public function read($input) @@ -9286,15 +15780,26 @@ switch ($fid) { case 0: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size408 = 0; + $_etype411 = 0; + $xfer += $input->readListBegin($_etype411, $_size408); + for ($_i412 = 0; $_i412 < $_size408; ++$_i412) + { + $elem413 = null; + $elem413 = new metastore_Role(); + $xfer += $elem413->read($input); + $this->success []= $elem413; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_ConfigValSecurityException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -9312,10 +15817,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_roles_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::STRING, 0); - $xfer += $output->writeString($this->success); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter414) + { + $xfer += $iter414->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9330,29 +15847,45 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_vals_args { +class metastore_ThriftHiveMetastore_list_security_user_grant_args { static $_TSPEC; - public $part_name = null; + public $principla_name = null; + public $is_role = null; + public $is_group = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'part_name', + 'var' => 'principla_name', 'type' => TType::STRING, ), + 2 => array( + 'var' => 'is_role', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'is_group', + 'type' => TType::BOOL, + ), ); } if (is_array($vals)) { - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['principla_name'])) { + $this->principla_name = $vals['principla_name']; + } + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_args'; + return 'ThriftHiveMetastore_list_security_user_grant_args'; } public function read($input) @@ -9372,7 +15905,21 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $xfer += $input->readString($this->principla_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); } else { $xfer += $input->skip($ftype); } @@ -9389,10 +15936,20 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_args'); - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); - $xfer += $output->writeString($this->part_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_user_grant_args'); + if ($this->principla_name !== null) { + $xfer += $output->writeFieldBegin('principla_name', TType::STRING, 1); + $xfer += $output->writeString($this->principla_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_group); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9402,7 +15959,7 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_vals_result { +class metastore_ThriftHiveMetastore_list_security_user_grant_result { static $_TSPEC; public $success = null; @@ -9414,9 +15971,10 @@ 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityUser', ), ), 1 => array( @@ -9437,7 +15995,7 @@ } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_result'; + return 'ThriftHiveMetastore_list_security_user_grant_result'; } public function read($input) @@ -9458,14 +16016,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size224 = 0; - $_etype227 = 0; - $xfer += $input->readListBegin($_etype227, $_size224); - for ($_i228 = 0; $_i228 < $_size224; ++$_i228) + $_size415 = 0; + $_etype418 = 0; + $xfer += $input->readListBegin($_etype418, $_size415); + for ($_i419 = 0; $_i419 < $_size415; ++$_i419) { - $elem229 = null; - $xfer += $input->readString($elem229); - $this->success []= $elem229; + $elem420 = null; + $elem420 = new metastore_SecurityUser(); + $xfer += $elem420->read($input); + $this->success []= $elem420; } $xfer += $input->readListEnd(); } else { @@ -9492,18 +16051,18 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_user_grant_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeListBegin(TType::STRING, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter230) + foreach ($this->success as $iter421) { - $xfer += $output->writeString($iter230); + $xfer += $iter421->write($output); } } $output->writeListEnd(); @@ -9522,29 +16081,53 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_spec_args { +class metastore_ThriftHiveMetastore_list_security_db_grant_args { static $_TSPEC; - public $part_name = null; + public $principal_name = null; + public $is_group = null; + public $is_role = null; + public $db_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'part_name', + 'var' => 'principal_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'is_role', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'db_name', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_args'; + return 'ThriftHiveMetastore_list_security_db_grant_args'; } public function read($input) @@ -9564,7 +16147,28 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); + $xfer += $input->readString($this->principal_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } @@ -9581,10 +16185,25 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_args'); - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 1); - $xfer += $output->writeString($this->part_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_db_grant_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 4); + $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9594,7 +16213,7 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_spec_result { +class metastore_ThriftHiveMetastore_list_security_db_grant_result { static $_TSPEC; public $success = null; @@ -9605,14 +16224,11 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityDB', ), ), 1 => array( @@ -9633,7 +16249,7 @@ } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_result'; + return 'ThriftHiveMetastore_list_security_db_grant_result'; } public function read($input) @@ -9652,21 +16268,19 @@ switch ($fid) { case 0: - if ($ftype == TType::MAP) { + if ($ftype == TType::LST) { $this->success = array(); - $_size231 = 0; - $_ktype232 = 0; - $_vtype233 = 0; - $xfer += $input->readMapBegin($_ktype232, $_vtype233, $_size231); - for ($_i235 = 0; $_i235 < $_size231; ++$_i235) + $_size422 = 0; + $_etype425 = 0; + $xfer += $input->readListBegin($_etype425, $_size422); + for ($_i426 = 0; $_i426 < $_size422; ++$_i426) { - $key236 = ''; - $val237 = ''; - $xfer += $input->readString($key236); - $xfer += $input->readString($val237); - $this->success[$key236] = $val237; + $elem427 = null; + $elem427 = new metastore_SecurityDB(); + $xfer += $elem427->read($input); + $this->success []= $elem427; } - $xfer += $input->readMapEnd(); + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -9691,22 +16305,21 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_db_grant_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); + $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $kiter238 => $viter239) + foreach ($this->success as $iter428) { - $xfer += $output->writeString($kiter238); - $xfer += $output->writeString($viter239); + $xfer += $iter428->write($output); } } - $output->writeMapEnd(); + $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } @@ -9722,39 +16335,61 @@ } -class metastore_ThriftHiveMetastore_add_index_args { +class metastore_ThriftHiveMetastore_list_security_table_grant_args { static $_TSPEC; - public $new_index = null; - public $index_table = null; + public $principal_name = null; + public $is_group = null; + public $is_role = null; + public $db_name = null; + public $table_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'new_index', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', + 'var' => 'principal_name', + 'type' => TType::STRING, ), 2 => array( - 'var' => 'index_table', - 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'is_role', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'table_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['new_index'])) { - $this->new_index = $vals['new_index']; + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; } - if (isset($vals['index_table'])) { - $this->index_table = $vals['index_table']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } } } public function getName() { - return 'ThriftHiveMetastore_add_index_args'; + return 'ThriftHiveMetastore_list_security_table_grant_args'; } public function read($input) @@ -9773,17 +16408,36 @@ switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->new_index = new metastore_Index(); - $xfer += $this->new_index->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principal_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRUCT) { - $this->index_table = new metastore_Table(); - $xfer += $this->index_table->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } @@ -9800,21 +16454,30 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_args'); - if ($this->new_index !== null) { - if (!is_object($this->new_index)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_index', TType::STRUCT, 1); - $xfer += $this->new_index->write($output); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_table_grant_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); $xfer += $output->writeFieldEnd(); } - if ($this->index_table !== null) { - if (!is_object($this->index_table)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('index_table', TType::STRUCT, 2); - $xfer += $this->index_table->write($output); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 4); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 5); + $xfer += $output->writeString($this->table_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -9824,35 +16487,27 @@ } -class metastore_ThriftHiveMetastore_add_index_result { +class metastore_ThriftHiveMetastore_list_security_table_grant_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityTablePartition', + ), ), 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', ), ); @@ -9864,17 +16519,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } } } public function getName() { - return 'ThriftHiveMetastore_add_index_result'; + return 'ThriftHiveMetastore_list_security_table_grant_result'; } public function read($input) @@ -9893,37 +16542,31 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Index(); - $xfer += $this->success->read($input); + if ($ftype == TType::LST) { + $this->success = array(); + $_size429 = 0; + $_etype432 = 0; + $xfer += $input->readListBegin($_etype432, $_size429); + for ($_i433 = 0; $_i433 < $_size429; ++$_i433) + { + $elem434 = null; + $elem434 = new metastore_SecurityTablePartition(); + $xfer += $elem434->read($input); + $this->success []= $elem434; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -9936,13 +16579,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_table_grant_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter435) + { + $xfer += $iter435->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9950,16 +16602,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 3); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -9967,54 +16609,69 @@ } -class metastore_ThriftHiveMetastore_alter_index_args { +class metastore_ThriftHiveMetastore_list_security_partition_grant_args { static $_TSPEC; - public $dbname = null; - public $base_tbl_name = null; - public $idx_name = null; - public $new_idx = null; + public $principal_name = null; + public $is_group = null; + public $is_role = null; + public $db_name = null; + public $table_name = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', + 'var' => 'principal_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'base_tbl_name', - 'type' => TType::STRING, + 'var' => 'is_group', + 'type' => TType::BOOL, ), 3 => array( - 'var' => 'idx_name', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 4 => array( - 'var' => 'new_idx', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'part_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; } - if (isset($vals['base_tbl_name'])) { - $this->base_tbl_name = $vals['base_tbl_name']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; } - if (isset($vals['idx_name'])) { - $this->idx_name = $vals['idx_name']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; } - if (isset($vals['new_idx'])) { - $this->new_idx = $vals['new_idx']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_index_args'; + return 'ThriftHiveMetastore_list_security_partition_grant_args'; } public function read($input) @@ -10034,29 +16691,42 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->principal_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->base_tbl_name); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->idx_name); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::STRUCT) { - $this->new_idx = new metastore_Index(); - $xfer += $this->new_idx->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -10073,28 +16743,35 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_partition_grant_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); $xfer += $output->writeFieldEnd(); } - if ($this->base_tbl_name !== null) { - $xfer += $output->writeFieldBegin('base_tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->base_tbl_name); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_group); $xfer += $output->writeFieldEnd(); } - if ($this->idx_name !== null) { - $xfer += $output->writeFieldBegin('idx_name', TType::STRING, 3); - $xfer += $output->writeString($this->idx_name); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); $xfer += $output->writeFieldEnd(); } - if ($this->new_idx !== null) { - if (!is_object($this->new_idx)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_idx', TType::STRUCT, 4); - $xfer += $this->new_idx->write($output); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 4); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 5); + $xfer += $output->writeString($this->table_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 6); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10104,39 +16781,43 @@ } -class metastore_ThriftHiveMetastore_alter_index_result { +class metastore_ThriftHiveMetastore_list_security_partition_grant_result { static $_TSPEC; + public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityTablePartition', + ), + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidOperationException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_alter_index_result'; + return 'ThriftHiveMetastore_list_security_partition_grant_result'; } public function read($input) @@ -10154,18 +16835,28 @@ } switch ($fid) { - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidOperationException(); - $xfer += $this->o1->read($input); + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size436 = 0; + $_etype439 = 0; + $xfer += $input->readListBegin($_etype439, $_size436); + for ($_i440 = 0; $_i440 < $_size436; ++$_i440) + { + $elem441 = null; + $elem441 = new metastore_SecurityTablePartition(); + $xfer += $elem441->read($input); + $this->success []= $elem441; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 2: + case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -10182,17 +16873,29 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_partition_grant_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter442) + { + $xfer += $iter442->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10200,53 +16903,77 @@ } -class metastore_ThriftHiveMetastore_drop_index_by_name_args { +class metastore_ThriftHiveMetastore_list_security_column_grant_args { static $_TSPEC; + public $principal_name = null; + public $is_group = null; + public $is_role = null; public $db_name = null; - public $tbl_name = null; - public $index_name = null; - public $deleteData = null; + public $table_name = null; + public $part_name = null; + public $column_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'principal_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'is_group', + 'type' => TType::BOOL, ), 3 => array( - 'var' => 'index_name', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'table_name', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'column_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { + if (isset($vals['principal_name'])) { + $this->principal_name = $vals['principal_name']; + } + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; + } if (isset($vals['db_name'])) { $this->db_name = $vals['db_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } - if (isset($vals['index_name'])) { - $this->index_name = $vals['index_name']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['column_name'])) { + $this->column_name = $vals['column_name']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_index_by_name_args'; + return 'ThriftHiveMetastore_list_security_column_grant_args'; } public function read($input) @@ -10266,28 +16993,49 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->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::BOOL) { + $xfer += $input->readBool($this->is_group); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->index_name); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); } else { $xfer += $input->skip($ftype); } break; case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column_name); } else { $xfer += $input->skip($ftype); } @@ -10304,25 +17052,40 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_column_grant_args'); + if ($this->principal_name !== null) { + $xfer += $output->writeFieldBegin('principal_name', TType::STRING, 1); + $xfer += $output->writeString($this->principal_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_role); + $xfer += $output->writeFieldEnd(); + } if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 4); $xfer += $output->writeString($this->db_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 5); + $xfer += $output->writeString($this->table_name); $xfer += $output->writeFieldEnd(); } - if ($this->index_name !== null) { - $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); - $xfer += $output->writeString($this->index_name); + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 6); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + if ($this->column_name !== null) { + $xfer += $output->writeFieldBegin('column_name', TType::STRING, 7); + $xfer += $output->writeString($this->column_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10332,28 +17095,27 @@ } -class metastore_ThriftHiveMetastore_drop_index_by_name_result { +class metastore_ThriftHiveMetastore_list_security_column_grant_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityColumn', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -10365,14 +17127,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_drop_index_by_name_result'; + return 'ThriftHiveMetastore_list_security_column_grant_result'; } public function read($input) @@ -10391,28 +17150,31 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size443 = 0; + $_etype446 = 0; + $xfer += $input->readListBegin($_etype446, $_size443); + for ($_i447 = 0; $_i447 < $_size443; ++$_i447) + { + $elem448 = null; + $elem448 = new metastore_SecurityColumn(); + $xfer += $elem448->read($input); + $this->success []= $elem448; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -10425,10 +17187,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_column_grant_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter449) + { + $xfer += $iter449->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10436,11 +17210,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10448,45 +17217,62 @@ } -class metastore_ThriftHiveMetastore_get_index_by_name_args { +class metastore_ThriftHiveMetastore_grant_privileges_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $index_name = null; + public $user_name = null; + public $is_role = null; + public $is_group = null; + public $privileges = null; + public $grantor = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 3 => array( - 'var' => 'index_name', + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrivilegeBag', + ), + 5 => array( + 'var' => 'grantor', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; } - if (isset($vals['index_name'])) { - $this->index_name = $vals['index_name']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; } } } public function getName() { - return 'ThriftHiveMetastore_get_index_by_name_args'; + return 'ThriftHiveMetastore_grant_privileges_args'; } public function read($input) @@ -10506,21 +17292,36 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); } else { $xfer += $input->skip($ftype); } break; case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->privileges = new metastore_PrivilegeBag(); + $xfer += $this->privileges->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->index_name); + $xfer += $input->readString($this->grantor); } else { $xfer += $input->skip($ftype); } @@ -10537,20 +17338,33 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_privileges_args'); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 1); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_role); $xfer += $output->writeFieldEnd(); } - if ($this->index_name !== null) { - $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); - $xfer += $output->writeString($this->index_name); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 4); + $xfer += $this->privileges->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 5); + $xfer += $output->writeString($this->grantor); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10560,31 +17374,24 @@ } -class metastore_ThriftHiveMetastore_get_index_by_name_result { +class metastore_ThriftHiveMetastore_grant_privileges_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -10594,14 +17401,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_index_by_name_result'; + return 'ThriftHiveMetastore_grant_privileges_result'; } public function read($input) @@ -10620,9 +17424,8 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Index(); - $xfer += $this->success->read($input); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } @@ -10635,14 +17438,6 @@ $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -10655,13 +17450,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_by_name_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_grant_privileges_result'); if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10669,11 +17461,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10681,45 +17468,54 @@ } -class metastore_ThriftHiveMetastore_get_indexes_args { +class metastore_ThriftHiveMetastore_revoke_privileges_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $max_indexes = -1; + public $user_name = null; + public $is_role = null; + public $is_group = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 3 => array( - 'var' => 'max_indexes', - 'type' => TType::I16, + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrivilegeBag', ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; } - if (isset($vals['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; } } } public function getName() { - return 'ThriftHiveMetastore_get_indexes_args'; + return 'ThriftHiveMetastore_revoke_privileges_args'; } public function read($input) @@ -10739,21 +17535,29 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_indexes); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->privileges = new metastore_PrivilegeBag(); + $xfer += $this->privileges->read($input); } else { $xfer += $input->skip($ftype); } @@ -10770,20 +17574,28 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_privileges_args'); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 1); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_role); $xfer += $output->writeFieldEnd(); } - if ($this->max_indexes !== null) { - $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); - $xfer += $output->writeI16($this->max_indexes); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + if (!is_object($this->privileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 4); + $xfer += $this->privileges->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10793,33 +17605,22 @@ } -class metastore_ThriftHiveMetastore_get_indexes_result { +class metastore_ThriftHiveMetastore_revoke_privileges_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -10831,14 +17632,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_indexes_result'; + return 'ThriftHiveMetastore_revoke_privileges_result'; } public function read($input) @@ -10857,39 +17655,20 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size240 = 0; - $_etype243 = 0; - $xfer += $input->readListBegin($_etype243, $_size240); - for ($_i244 = 0; $_i244 < $_size240; ++$_i244) - { - $elem245 = null; - $elem245 = new metastore_Index(); - $xfer += $elem245->read($input); - $this->success []= $elem245; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; default: $xfer += $input->skip($ftype); break; @@ -10902,22 +17681,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_indexes_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_privileges_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter246) - { - $xfer += $iter246->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10925,11 +17692,6 @@ $xfer += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } $xfer += $output->writeFieldStop(); $xfer += $output->writeStructEnd(); return $xfer; @@ -10937,45 +17699,113 @@ } -class metastore_ThriftHiveMetastore_get_index_names_args { +class metastore_ThriftHiveMetastore_revoke_all_privileges_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $max_indexes = -1; + public $user_name = null; + public $is_role = null; + public $is_group = null; + public $remove_user_priv = null; + public $dbs = null; + public $tables = null; + public $parts = null; + public $columns = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'user_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, ), 3 => array( - 'var' => 'max_indexes', - 'type' => TType::I16, + 'var' => 'is_group', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'remove_user_priv', + 'type' => TType::BOOL, + ), + 5 => array( + 'var' => 'dbs', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + ), + 6 => array( + 'var' => 'tables', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + ), + 7 => array( + 'var' => 'parts', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + ), + 8 => array( + 'var' => 'columns', + 'type' => TType::MAP, + 'ktype' => TType::STRUCT, + 'vtype' => TType::LST, + 'key' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + 'val' => array( + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['user_name'])) { + $this->user_name = $vals['user_name']; } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; + if (isset($vals['is_role'])) { + $this->is_role = $vals['is_role']; } - if (isset($vals['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; + } + if (isset($vals['remove_user_priv'])) { + $this->remove_user_priv = $vals['remove_user_priv']; + } + if (isset($vals['dbs'])) { + $this->dbs = $vals['dbs']; + } + if (isset($vals['tables'])) { + $this->tables = $vals['tables']; + } + if (isset($vals['parts'])) { + $this->parts = $vals['parts']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; } } } public function getName() { - return 'ThriftHiveMetastore_get_index_names_args'; + return 'ThriftHiveMetastore_revoke_all_privileges_args'; } public function read($input) @@ -10995,21 +17825,113 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->user_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_role); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_indexes); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->is_group); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->remove_user_priv); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->dbs = array(); + $_size450 = 0; + $_etype453 = 0; + $xfer += $input->readListBegin($_etype453, $_size450); + for ($_i454 = 0; $_i454 < $_size450; ++$_i454) + { + $elem455 = null; + $elem455 = new metastore_Database(); + $xfer += $elem455->read($input); + $this->dbs []= $elem455; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->tables = array(); + $_size456 = 0; + $_etype459 = 0; + $xfer += $input->readListBegin($_etype459, $_size456); + for ($_i460 = 0; $_i460 < $_size456; ++$_i460) + { + $elem461 = null; + $elem461 = new metastore_Table(); + $xfer += $elem461->read($input); + $this->tables []= $elem461; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::LST) { + $this->parts = array(); + $_size462 = 0; + $_etype465 = 0; + $xfer += $input->readListBegin($_etype465, $_size462); + for ($_i466 = 0; $_i466 < $_size462; ++$_i466) + { + $elem467 = null; + $elem467 = new metastore_Partition(); + $xfer += $elem467->read($input); + $this->parts []= $elem467; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::MAP) { + $this->columns = array(); + $_size468 = 0; + $_ktype469 = 0; + $_vtype470 = 0; + $xfer += $input->readMapBegin($_ktype469, $_vtype470, $_size468); + for ($_i472 = 0; $_i472 < $_size468; ++$_i472) + { + $key473 = new metastore_Table(); + $val474 = array(); + $key473 = new metastore_Table(); + $xfer += $key473->read($input); + $val474 = array(); + $_size475 = 0; + $_etype478 = 0; + $xfer += $input->readListBegin($_etype478, $_size475); + for ($_i479 = 0; $_i479 < $_size475; ++$_i479) + { + $elem480 = null; + $xfer += $input->readString($elem480); + $val474 []= $elem480; + } + $xfer += $input->readListEnd(); + $this->columns[$key473] = $val474; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } @@ -11026,20 +17948,103 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_all_privileges_args'); + if ($this->user_name !== null) { + $xfer += $output->writeFieldBegin('user_name', TType::STRING, 1); + $xfer += $output->writeString($this->user_name); $xfer += $output->writeFieldEnd(); } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); + if ($this->is_role !== null) { + $xfer += $output->writeFieldBegin('is_role', TType::BOOL, 2); + $xfer += $output->writeBool($this->is_role); $xfer += $output->writeFieldEnd(); } - if ($this->max_indexes !== null) { - $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); - $xfer += $output->writeI16($this->max_indexes); + if ($this->is_group !== null) { + $xfer += $output->writeFieldBegin('is_group', TType::BOOL, 3); + $xfer += $output->writeBool($this->is_group); + $xfer += $output->writeFieldEnd(); + } + if ($this->remove_user_priv !== null) { + $xfer += $output->writeFieldBegin('remove_user_priv', TType::BOOL, 4); + $xfer += $output->writeBool($this->remove_user_priv); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbs !== null) { + if (!is_array($this->dbs)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('dbs', TType::LST, 5); + { + $output->writeListBegin(TType::STRUCT, count($this->dbs)); + { + foreach ($this->dbs as $iter481) + { + $xfer += $iter481->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->tables !== null) { + if (!is_array($this->tables)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tables', TType::LST, 6); + { + $output->writeListBegin(TType::STRUCT, count($this->tables)); + { + foreach ($this->tables as $iter482) + { + $xfer += $iter482->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->parts !== null) { + if (!is_array($this->parts)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parts', TType::LST, 7); + { + $output->writeListBegin(TType::STRUCT, count($this->parts)); + { + foreach ($this->parts as $iter483) + { + $xfer += $iter483->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::MAP, 8); + { + $output->writeMapBegin(TType::STRUCT, TType::LST, count($this->columns)); + { + foreach ($this->columns as $kiter484 => $viter485) + { + $xfer += $kiter484->write($output); + { + $output->writeListBegin(TType::STRING, count($viter485)); + { + foreach ($viter485 as $iter486) + { + $xfer += $output->writeString($iter486); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -11049,25 +18054,21 @@ } -class metastore_ThriftHiveMetastore_get_index_names_result { +class metastore_ThriftHiveMetastore_revoke_all_privileges_result { static $_TSPEC; public $success = null; - public $o2 = null; + public $o1 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::BOOL, ), 1 => array( - 'var' => 'o2', + 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), @@ -11077,14 +18078,14 @@ if (isset($vals['success'])) { $this->success = $vals['success']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; } } } public function getName() { - return 'ThriftHiveMetastore_get_index_names_result'; + return 'ThriftHiveMetastore_revoke_all_privileges_result'; } public function read($input) @@ -11103,26 +18104,16 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size247 = 0; - $_etype250 = 0; - $xfer += $input->readListBegin($_etype250, $_size247); - for ($_i251 = 0; $_i251 < $_size247; ++$_i251) - { - $elem252 = null; - $xfer += $input->readString($elem252); - $this->success []= $elem252; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); - $xfer += $this->o2->read($input); + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } @@ -11139,27 +18130,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_index_names_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_revoke_all_privileges_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter253) - { - $xfer += $output->writeString($iter253); - } - } - $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-php/hive_metastore_types.php =================================================================== --- metastore/src/gen-php/hive_metastore_types.php (revision 1037574) +++ metastore/src/gen-php/hive_metastore_types.php (working copy) @@ -372,45 +372,69 @@ } -class metastore_Database { +class metastore_PrincipalPrivilegeSet { static $_TSPEC; - public $name = null; - public $description = null; - public $locationUri = null; + public $userPrivileges = null; + public $groupPrivileges = null; + public $rolePrivileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', - 'type' => TType::STRING, + 'var' => 'userPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), ), 2 => array( - 'var' => 'description', - 'type' => TType::STRING, + 'var' => 'groupPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), ), 3 => array( - 'var' => 'locationUri', - 'type' => TType::STRING, + 'var' => 'rolePrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['userPrivileges'])) { + $this->userPrivileges = $vals['userPrivileges']; } - if (isset($vals['description'])) { - $this->description = $vals['description']; + if (isset($vals['groupPrivileges'])) { + $this->groupPrivileges = $vals['groupPrivileges']; } - if (isset($vals['locationUri'])) { - $this->locationUri = $vals['locationUri']; + if (isset($vals['rolePrivileges'])) { + $this->rolePrivileges = $vals['rolePrivileges']; } } } public function getName() { - return 'Database'; + return 'PrincipalPrivilegeSet'; } public function read($input) @@ -429,22 +453,61 @@ switch ($fid) { case 1: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + if ($ftype == TType::MAP) { + $this->userPrivileges = array(); + $_size7 = 0; + $_ktype8 = 0; + $_vtype9 = 0; + $xfer += $input->readMapBegin($_ktype8, $_vtype9, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $key12 = ''; + $val13 = ''; + $xfer += $input->readString($key12); + $xfer += $input->readString($val13); + $this->userPrivileges[$key12] = $val13; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->description); + if ($ftype == TType::MAP) { + $this->groupPrivileges = array(); + $_size14 = 0; + $_ktype15 = 0; + $_vtype16 = 0; + $xfer += $input->readMapBegin($_ktype15, $_vtype16, $_size14); + for ($_i18 = 0; $_i18 < $_size14; ++$_i18) + { + $key19 = ''; + $val20 = ''; + $xfer += $input->readString($key19); + $xfer += $input->readString($val20); + $this->groupPrivileges[$key19] = $val20; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->locationUri); + if ($ftype == TType::MAP) { + $this->rolePrivileges = array(); + $_size21 = 0; + $_ktype22 = 0; + $_vtype23 = 0; + $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21); + for ($_i25 = 0; $_i25 < $_size21; ++$_i25) + { + $key26 = ''; + $val27 = ''; + $xfer += $input->readString($key26); + $xfer += $input->readString($val27); + $this->rolePrivileges[$key26] = $val27; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } @@ -461,20 +524,59 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('Database'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); + $xfer += $output->writeStructBegin('PrincipalPrivilegeSet'); + if ($this->userPrivileges !== null) { + if (!is_array($this->userPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('userPrivileges', TType::MAP, 1); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->userPrivileges)); + { + foreach ($this->userPrivileges as $kiter28 => $viter29) + { + $xfer += $output->writeString($kiter28); + $xfer += $output->writeString($viter29); + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } - if ($this->description !== null) { - $xfer += $output->writeFieldBegin('description', TType::STRING, 2); - $xfer += $output->writeString($this->description); + if ($this->groupPrivileges !== null) { + if (!is_array($this->groupPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('groupPrivileges', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->groupPrivileges)); + { + foreach ($this->groupPrivileges as $kiter30 => $viter31) + { + $xfer += $output->writeString($kiter30); + $xfer += $output->writeString($viter31); + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } - if ($this->locationUri !== null) { - $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3); - $xfer += $output->writeString($this->locationUri); + 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::STRING, count($this->rolePrivileges)); + { + foreach ($this->rolePrivileges as $kiter32 => $viter33) + { + $xfer += $output->writeString($kiter32); + $xfer += $output->writeString($viter33); + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -484,12 +586,13 @@ } -class metastore_SerDeInfo { +class metastore_Database { static $_TSPEC; public $name = null; - public $serializationLib = null; - public $parameters = null; + public $description = null; + public $locationUri = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -499,20 +602,17 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'serializationLib', + 'var' => 'description', 'type' => TType::STRING, ), 3 => array( - 'var' => 'parameters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, + 'var' => 'locationUri', + 'type' => TType::STRING, ), - 'val' => array( - 'type' => TType::STRING, - ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', ), ); } @@ -520,17 +620,20 @@ if (isset($vals['name'])) { $this->name = $vals['name']; } - if (isset($vals['serializationLib'])) { - $this->serializationLib = $vals['serializationLib']; + if (isset($vals['description'])) { + $this->description = $vals['description']; } - if (isset($vals['parameters'])) { - $this->parameters = $vals['parameters']; + if (isset($vals['locationUri'])) { + $this->locationUri = $vals['locationUri']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; } } } public function getName() { - return 'SerDeInfo'; + return 'Database'; } public function read($input) @@ -557,27 +660,22 @@ break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->serializationLib); + $xfer += $input->readString($this->description); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size7 = 0; - $_ktype8 = 0; - $_vtype9 = 0; - $xfer += $input->readMapBegin($_ktype8, $_vtype9, $_size7); - for ($_i11 = 0; $_i11 < $_size7; ++$_i11) - { - $key12 = ''; - $val13 = ''; - $xfer += $input->readString($key12); - $xfer += $input->readString($val13); - $this->parameters[$key12] = $val13; - } - $xfer += $input->readMapEnd(); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->locationUri); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->privileges = new metastore_PrincipalPrivilegeSet(); + $xfer += $this->privileges->read($input); } else { $xfer += $input->skip($ftype); } @@ -594,33 +692,28 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('SerDeInfo'); + $xfer += $output->writeStructBegin('Database'); if ($this->name !== null) { $xfer += $output->writeFieldBegin('name', TType::STRING, 1); $xfer += $output->writeString($this->name); $xfer += $output->writeFieldEnd(); } - if ($this->serializationLib !== null) { - $xfer += $output->writeFieldBegin('serializationLib', TType::STRING, 2); - $xfer += $output->writeString($this->serializationLib); + if ($this->description !== null) { + $xfer += $output->writeFieldBegin('description', TType::STRING, 2); + $xfer += $output->writeString($this->description); $xfer += $output->writeFieldEnd(); } - if ($this->parameters !== null) { - if (!is_array($this->parameters)) { + if ($this->locationUri !== null) { + $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3); + $xfer += $output->writeString($this->locationUri); + $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('parameters', TType::MAP, 3); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); - { - foreach ($this->parameters as $kiter14 => $viter15) - { - $xfer += $output->writeString($kiter14); - $xfer += $output->writeString($viter15); - } - } - $output->writeMapEnd(); - } + $xfer += $output->writeFieldBegin('privileges', TType::STRUCT, 4); + $xfer += $this->privileges->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -630,37 +723,54 @@ } -class metastore_Order { +class metastore_Role { static $_TSPEC; - public $col = null; - public $order = null; + public $roleName = null; + public $database = null; + public $createTime = null; + public $ownerName = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'col', + 'var' => 'roleName', 'type' => TType::STRING, ), 2 => array( - 'var' => 'order', + 'var' => 'database', + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + 3 => array( + 'var' => 'createTime', 'type' => TType::I32, ), + 4 => array( + 'var' => 'ownerName', + 'type' => TType::STRING, + ), ); } if (is_array($vals)) { - if (isset($vals['col'])) { - $this->col = $vals['col']; + if (isset($vals['roleName'])) { + $this->roleName = $vals['roleName']; } - if (isset($vals['order'])) { - $this->order = $vals['order']; + if (isset($vals['database'])) { + $this->database = $vals['database']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['ownerName'])) { + $this->ownerName = $vals['ownerName']; } } } public function getName() { - return 'Order'; + return 'Role'; } public function read($input) @@ -680,14 +790,29 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->col); + $xfer += $input->readString($this->roleName); } else { $xfer += $input->skip($ftype); } break; case 2: + if ($ftype == TType::STRUCT) { + $this->database = new metastore_Database(); + $xfer += $this->database->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: if ($ftype == TType::I32) { - $xfer += $input->readI32($this->order); + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->ownerName); } else { $xfer += $input->skip($ftype); } @@ -704,15 +829,28 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('Order'); - if ($this->col !== null) { - $xfer += $output->writeFieldBegin('col', TType::STRING, 1); - $xfer += $output->writeString($this->col); + $xfer += $output->writeStructBegin('Role'); + if ($this->roleName !== null) { + $xfer += $output->writeFieldBegin('roleName', TType::STRING, 1); + $xfer += $output->writeString($this->roleName); $xfer += $output->writeFieldEnd(); } - if ($this->order !== null) { - $xfer += $output->writeFieldBegin('order', TType::I32, 2); - $xfer += $output->writeI32($this->order); + if ($this->database !== null) { + if (!is_object($this->database)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('database', TType::STRUCT, 2); + $xfer += $this->database->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 3); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->ownerName !== null) { + $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 4); + $xfer += $output->writeString($this->ownerName); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -722,18 +860,256 @@ } -class metastore_StorageDescriptor { +class metastore_SerDeInfo { static $_TSPEC; - public $cols = null; - public $location = null; - public $inputFormat = null; - public $outputFormat = null; - public $compressed = null; - public $numBuckets = null; - public $serdeInfo = null; - public $bucketCols = null; - public $sortCols = null; + public $name = null; + public $serializationLib = null; + public $parameters = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'serializationLib', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['serializationLib'])) { + $this->serializationLib = $vals['serializationLib']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + } + } + + public function getName() { + return 'SerDeInfo'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->serializationLib); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size34 = 0; + $_ktype35 = 0; + $_vtype36 = 0; + $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34); + for ($_i38 = 0; $_i38 < $_size34; ++$_i38) + { + $key39 = ''; + $val40 = ''; + $xfer += $input->readString($key39); + $xfer += $input->readString($val40); + $this->parameters[$key39] = $val40; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('SerDeInfo'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->serializationLib !== null) { + $xfer += $output->writeFieldBegin('serializationLib', TType::STRING, 2); + $xfer += $output->writeString($this->serializationLib); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter41 => $viter42) + { + $xfer += $output->writeString($kiter41); + $xfer += $output->writeString($viter42); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Order { + static $_TSPEC; + + public $col = null; + public $order = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'col', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'order', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['col'])) { + $this->col = $vals['col']; + } + if (isset($vals['order'])) { + $this->order = $vals['order']; + } + } + } + + public function getName() { + return 'Order'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->col); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->order); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Order'); + if ($this->col !== null) { + $xfer += $output->writeFieldBegin('col', TType::STRING, 1); + $xfer += $output->writeString($this->col); + $xfer += $output->writeFieldEnd(); + } + if ($this->order !== null) { + $xfer += $output->writeFieldBegin('order', TType::I32, 2); + $xfer += $output->writeI32($this->order); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_StorageDescriptor { + static $_TSPEC; + + public $cols = null; + public $location = null; + public $inputFormat = null; + public $outputFormat = null; + public $compressed = null; + public $numBuckets = null; + public $serdeInfo = null; + public $bucketCols = null; + public $sortCols = null; public $parameters = null; public function __construct($vals=null) { @@ -860,15 +1236,15 @@ case 1: if ($ftype == TType::LST) { $this->cols = array(); - $_size16 = 0; - $_etype19 = 0; - $xfer += $input->readListBegin($_etype19, $_size16); - for ($_i20 = 0; $_i20 < $_size16; ++$_i20) + $_size43 = 0; + $_etype46 = 0; + $xfer += $input->readListBegin($_etype46, $_size43); + for ($_i47 = 0; $_i47 < $_size43; ++$_i47) { - $elem21 = null; - $elem21 = new metastore_FieldSchema(); - $xfer += $elem21->read($input); - $this->cols []= $elem21; + $elem48 = null; + $elem48 = new metastore_FieldSchema(); + $xfer += $elem48->read($input); + $this->cols []= $elem48; } $xfer += $input->readListEnd(); } else { @@ -921,14 +1297,14 @@ case 8: if ($ftype == TType::LST) { $this->bucketCols = array(); - $_size22 = 0; - $_etype25 = 0; - $xfer += $input->readListBegin($_etype25, $_size22); - for ($_i26 = 0; $_i26 < $_size22; ++$_i26) + $_size49 = 0; + $_etype52 = 0; + $xfer += $input->readListBegin($_etype52, $_size49); + for ($_i53 = 0; $_i53 < $_size49; ++$_i53) { - $elem27 = null; - $xfer += $input->readString($elem27); - $this->bucketCols []= $elem27; + $elem54 = null; + $xfer += $input->readString($elem54); + $this->bucketCols []= $elem54; } $xfer += $input->readListEnd(); } else { @@ -938,15 +1314,15 @@ case 9: if ($ftype == TType::LST) { $this->sortCols = array(); - $_size28 = 0; - $_etype31 = 0; - $xfer += $input->readListBegin($_etype31, $_size28); - for ($_i32 = 0; $_i32 < $_size28; ++$_i32) + $_size55 = 0; + $_etype58 = 0; + $xfer += $input->readListBegin($_etype58, $_size55); + for ($_i59 = 0; $_i59 < $_size55; ++$_i59) { - $elem33 = null; - $elem33 = new metastore_Order(); - $xfer += $elem33->read($input); - $this->sortCols []= $elem33; + $elem60 = null; + $elem60 = new metastore_Order(); + $xfer += $elem60->read($input); + $this->sortCols []= $elem60; } $xfer += $input->readListEnd(); } else { @@ -956,17 +1332,17 @@ case 10: if ($ftype == TType::MAP) { $this->parameters = array(); - $_size34 = 0; - $_ktype35 = 0; - $_vtype36 = 0; - $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34); - for ($_i38 = 0; $_i38 < $_size34; ++$_i38) + $_size61 = 0; + $_ktype62 = 0; + $_vtype63 = 0; + $xfer += $input->readMapBegin($_ktype62, $_vtype63, $_size61); + for ($_i65 = 0; $_i65 < $_size61; ++$_i65) { - $key39 = ''; - $val40 = ''; - $xfer += $input->readString($key39); - $xfer += $input->readString($val40); - $this->parameters[$key39] = $val40; + $key66 = ''; + $val67 = ''; + $xfer += $input->readString($key66); + $xfer += $input->readString($val67); + $this->parameters[$key66] = $val67; } $xfer += $input->readMapEnd(); } else { @@ -994,9 +1370,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->cols)); { - foreach ($this->cols as $iter41) + foreach ($this->cols as $iter68) { - $xfer += $iter41->write($output); + $xfer += $iter68->write($output); } } $output->writeListEnd(); @@ -1044,9 +1420,9 @@ { $output->writeListBegin(TType::STRING, count($this->bucketCols)); { - foreach ($this->bucketCols as $iter42) + foreach ($this->bucketCols as $iter69) { - $xfer += $output->writeString($iter42); + $xfer += $output->writeString($iter69); } } $output->writeListEnd(); @@ -1061,9 +1437,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->sortCols)); { - foreach ($this->sortCols as $iter43) + foreach ($this->sortCols as $iter70) { - $xfer += $iter43->write($output); + $xfer += $iter70->write($output); } } $output->writeListEnd(); @@ -1078,10 +1454,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter44 => $viter45) + foreach ($this->parameters as $kiter71 => $viter72) { - $xfer += $output->writeString($kiter44); - $xfer += $output->writeString($viter45); + $xfer += $output->writeString($kiter71); + $xfer += $output->writeString($viter72); } } $output->writeMapEnd(); @@ -1110,6 +1486,7 @@ public $viewOriginalText = null; public $viewExpandedText = null; public $tableType = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -1176,6 +1553,11 @@ 'var' => 'tableType', 'type' => TType::STRING, ), + 13 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', + ), ); } if (is_array($vals)) { @@ -1215,6 +1597,9 @@ if (isset($vals['tableType'])) { $this->tableType = $vals['tableType']; } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } } } @@ -1290,15 +1675,15 @@ case 8: if ($ftype == TType::LST) { $this->partitionKeys = array(); - $_size46 = 0; - $_etype49 = 0; - $xfer += $input->readListBegin($_etype49, $_size46); - for ($_i50 = 0; $_i50 < $_size46; ++$_i50) + $_size73 = 0; + $_etype76 = 0; + $xfer += $input->readListBegin($_etype76, $_size73); + for ($_i77 = 0; $_i77 < $_size73; ++$_i77) { - $elem51 = null; - $elem51 = new metastore_FieldSchema(); - $xfer += $elem51->read($input); - $this->partitionKeys []= $elem51; + $elem78 = null; + $elem78 = new metastore_FieldSchema(); + $xfer += $elem78->read($input); + $this->partitionKeys []= $elem78; } $xfer += $input->readListEnd(); } else { @@ -1308,17 +1693,17 @@ case 9: if ($ftype == TType::MAP) { $this->parameters = array(); - $_size52 = 0; - $_ktype53 = 0; - $_vtype54 = 0; - $xfer += $input->readMapBegin($_ktype53, $_vtype54, $_size52); - for ($_i56 = 0; $_i56 < $_size52; ++$_i56) + $_size79 = 0; + $_ktype80 = 0; + $_vtype81 = 0; + $xfer += $input->readMapBegin($_ktype80, $_vtype81, $_size79); + for ($_i83 = 0; $_i83 < $_size79; ++$_i83) { - $key57 = ''; - $val58 = ''; - $xfer += $input->readString($key57); - $xfer += $input->readString($val58); - $this->parameters[$key57] = $val58; + $key84 = ''; + $val85 = ''; + $xfer += $input->readString($key84); + $xfer += $input->readString($val85); + $this->parameters[$key84] = $val85; } $xfer += $input->readMapEnd(); } else { @@ -1346,6 +1731,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; @@ -1405,9 +1798,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->partitionKeys)); { - foreach ($this->partitionKeys as $iter59) + foreach ($this->partitionKeys as $iter86) { - $xfer += $iter59->write($output); + $xfer += $iter86->write($output); } } $output->writeListEnd(); @@ -1422,10 +1815,10 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter60 => $viter61) + foreach ($this->parameters as $kiter87 => $viter88) { - $xfer += $output->writeString($kiter60); - $xfer += $output->writeString($viter61); + $xfer += $output->writeString($kiter87); + $xfer += $output->writeString($viter88); } } $output->writeMapEnd(); @@ -1447,6 +1840,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; @@ -1464,6 +1865,7 @@ public $lastAccessTime = null; public $sd = null; public $parameters = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -1509,6 +1911,11 @@ 'type' => TType::STRING, ), ), + 8 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', + ), ); } if (is_array($vals)) { @@ -1533,6 +1940,9 @@ if (isset($vals['parameters'])) { $this->parameters = $vals['parameters']; } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } } } @@ -1558,14 +1968,14 @@ case 1: if ($ftype == TType::LST) { $this->values = array(); - $_size62 = 0; - $_etype65 = 0; - $xfer += $input->readListBegin($_etype65, $_size62); - for ($_i66 = 0; $_i66 < $_size62; ++$_i66) + $_size89 = 0; + $_etype92 = 0; + $xfer += $input->readListBegin($_etype92, $_size89); + for ($_i93 = 0; $_i93 < $_size89; ++$_i93) { - $elem67 = null; - $xfer += $input->readString($elem67); - $this->values []= $elem67; + $elem94 = null; + $xfer += $input->readString($elem94); + $this->values []= $elem94; } $xfer += $input->readListEnd(); } else { @@ -1611,23 +2021,31 @@ case 7: if ($ftype == TType::MAP) { $this->parameters = array(); - $_size68 = 0; - $_ktype69 = 0; - $_vtype70 = 0; - $xfer += $input->readMapBegin($_ktype69, $_vtype70, $_size68); - for ($_i72 = 0; $_i72 < $_size68; ++$_i72) + $_size95 = 0; + $_ktype96 = 0; + $_vtype97 = 0; + $xfer += $input->readMapBegin($_ktype96, $_vtype97, $_size95); + for ($_i99 = 0; $_i99 < $_size95; ++$_i99) { - $key73 = ''; - $val74 = ''; - $xfer += $input->readString($key73); - $xfer += $input->readString($val74); - $this->parameters[$key73] = $val74; + $key100 = ''; + $val101 = ''; + $xfer += $input->readString($key100); + $xfer += $input->readString($val101); + $this->parameters[$key100] = $val101; } $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; @@ -1649,9 +2067,9 @@ { $output->writeListBegin(TType::STRING, count($this->values)); { - foreach ($this->values as $iter75) + foreach ($this->values as $iter102) { - $xfer += $output->writeString($iter75); + $xfer += $output->writeString($iter102); } } $output->writeListEnd(); @@ -1694,16 +2112,24 @@ { $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); { - foreach ($this->parameters as $kiter76 => $viter77) + foreach ($this->parameters as $kiter103 => $viter104) { - $xfer += $output->writeString($kiter76); - $xfer += $output->writeString($viter77); + $xfer += $output->writeString($kiter103); + $xfer += $output->writeString($viter104); } } $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; @@ -1773,48 +2199,1293 @@ 'type' => TType::STRING, ), ), - 10 => array( - 'var' => 'deferredRebuild', - 'type' => TType::BOOL, + 10 => array( + 'var' => 'deferredRebuild', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['indexName'])) { + $this->indexName = $vals['indexName']; + } + if (isset($vals['indexHandlerClass'])) { + $this->indexHandlerClass = $vals['indexHandlerClass']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['origTableName'])) { + $this->origTableName = $vals['origTableName']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['indexTableName'])) { + $this->indexTableName = $vals['indexTableName']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['deferredRebuild'])) { + $this->deferredRebuild = $vals['deferredRebuild']; + } + } + } + + public function getName() { + return 'Index'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexHandlerClass); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->origTableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexTableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->sd = new metastore_StorageDescriptor(); + $xfer += $this->sd->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size105 = 0; + $_ktype106 = 0; + $_vtype107 = 0; + $xfer += $input->readMapBegin($_ktype106, $_vtype107, $_size105); + for ($_i109 = 0; $_i109 < $_size105; ++$_i109) + { + $key110 = ''; + $val111 = ''; + $xfer += $input->readString($key110); + $xfer += $input->readString($val111); + $this->parameters[$key110] = $val111; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deferredRebuild); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Index'); + if ($this->indexName !== null) { + $xfer += $output->writeFieldBegin('indexName', TType::STRING, 1); + $xfer += $output->writeString($this->indexName); + $xfer += $output->writeFieldEnd(); + } + if ($this->indexHandlerClass !== null) { + $xfer += $output->writeFieldBegin('indexHandlerClass', TType::STRING, 2); + $xfer += $output->writeString($this->indexHandlerClass); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 3); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->origTableName !== null) { + $xfer += $output->writeFieldBegin('origTableName', TType::STRING, 4); + $xfer += $output->writeString($this->origTableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 6); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->indexTableName !== null) { + $xfer += $output->writeFieldBegin('indexTableName', TType::STRING, 7); + $xfer += $output->writeString($this->indexTableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->sd !== null) { + if (!is_object($this->sd)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 8); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter112 => $viter113) + { + $xfer += $output->writeString($kiter112); + $xfer += $output->writeString($viter113); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->deferredRebuild !== null) { + $xfer += $output->writeFieldBegin('deferredRebuild', TType::BOOL, 10); + $xfer += $output->writeBool($this->deferredRebuild); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Schema { + static $_TSPEC; + + public $fieldSchemas = null; + public $properties = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'fieldSchemas', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_FieldSchema', + ), + ), + 2 => array( + 'var' => 'properties', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['fieldSchemas'])) { + $this->fieldSchemas = $vals['fieldSchemas']; + } + if (isset($vals['properties'])) { + $this->properties = $vals['properties']; + } + } + } + + public function getName() { + return 'Schema'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->fieldSchemas = array(); + $_size114 = 0; + $_etype117 = 0; + $xfer += $input->readListBegin($_etype117, $_size114); + for ($_i118 = 0; $_i118 < $_size114; ++$_i118) + { + $elem119 = null; + $elem119 = new metastore_FieldSchema(); + $xfer += $elem119->read($input); + $this->fieldSchemas []= $elem119; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::MAP) { + $this->properties = array(); + $_size120 = 0; + $_ktype121 = 0; + $_vtype122 = 0; + $xfer += $input->readMapBegin($_ktype121, $_vtype122, $_size120); + for ($_i124 = 0; $_i124 < $_size120; ++$_i124) + { + $key125 = ''; + $val126 = ''; + $xfer += $input->readString($key125); + $xfer += $input->readString($val126); + $this->properties[$key125] = $val126; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Schema'); + if ($this->fieldSchemas !== null) { + if (!is_array($this->fieldSchemas)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fieldSchemas', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas)); + { + foreach ($this->fieldSchemas as $iter127) + { + $xfer += $iter127->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->properties !== null) { + if (!is_array($this->properties)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('properties', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); + { + foreach ($this->properties as $kiter128 => $viter129) + { + $xfer += $output->writeString($kiter128); + $xfer += $output->writeString($viter129); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ColumnPrivilegeBag { + static $_TSPEC; + + public $dbName = null; + public $tableName = null; + public $partitionName = null; + public $columnPrivileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'partitionName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'columnPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['partitionName'])) { + $this->partitionName = $vals['partitionName']; + } + if (isset($vals['columnPrivileges'])) { + $this->columnPrivileges = $vals['columnPrivileges']; + } + } + } + + public function getName() { + return 'ColumnPrivilegeBag'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->partitionName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->columnPrivileges = array(); + $_size130 = 0; + $_ktype131 = 0; + $_vtype132 = 0; + $xfer += $input->readMapBegin($_ktype131, $_vtype132, $_size130); + for ($_i134 = 0; $_i134 < $_size130; ++$_i134) + { + $key135 = ''; + $val136 = ''; + $xfer += $input->readString($key135); + $xfer += $input->readString($val136); + $this->columnPrivileges[$key135] = $val136; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ColumnPrivilegeBag'); + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 1); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 2); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionName !== null) { + $xfer += $output->writeFieldBegin('partitionName', TType::STRING, 3); + $xfer += $output->writeString($this->partitionName); + $xfer += $output->writeFieldEnd(); + } + if ($this->columnPrivileges !== null) { + if (!is_array($this->columnPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columnPrivileges', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->columnPrivileges)); + { + foreach ($this->columnPrivileges as $kiter137 => $viter138) + { + $xfer += $output->writeString($kiter137); + $xfer += $output->writeString($viter138); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_PrivilegeBag { + static $_TSPEC; + + public $userPrivileges = null; + public $dbPrivileges = null; + public $tablePrivileges = null; + public $partitionPrivileges = null; + public $columnPrivileges = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'userPrivileges', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'dbPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRUCT, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'tablePrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRUCT, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'partitionPrivileges', + 'type' => TType::MAP, + 'ktype' => TType::STRUCT, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 5 => array( + 'var' => 'columnPrivileges', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_ColumnPrivilegeBag', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['userPrivileges'])) { + $this->userPrivileges = $vals['userPrivileges']; + } + if (isset($vals['dbPrivileges'])) { + $this->dbPrivileges = $vals['dbPrivileges']; + } + if (isset($vals['tablePrivileges'])) { + $this->tablePrivileges = $vals['tablePrivileges']; + } + if (isset($vals['partitionPrivileges'])) { + $this->partitionPrivileges = $vals['partitionPrivileges']; + } + if (isset($vals['columnPrivileges'])) { + $this->columnPrivileges = $vals['columnPrivileges']; + } + } + } + + public function getName() { + return 'PrivilegeBag'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->userPrivileges); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::MAP) { + $this->dbPrivileges = array(); + $_size139 = 0; + $_ktype140 = 0; + $_vtype141 = 0; + $xfer += $input->readMapBegin($_ktype140, $_vtype141, $_size139); + for ($_i143 = 0; $_i143 < $_size139; ++$_i143) + { + $key144 = new metastore_Database(); + $val145 = ''; + $key144 = new metastore_Database(); + $xfer += $key144->read($input); + $xfer += $input->readString($val145); + $this->dbPrivileges[$key144] = $val145; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->tablePrivileges = array(); + $_size146 = 0; + $_ktype147 = 0; + $_vtype148 = 0; + $xfer += $input->readMapBegin($_ktype147, $_vtype148, $_size146); + for ($_i150 = 0; $_i150 < $_size146; ++$_i150) + { + $key151 = new metastore_Table(); + $val152 = ''; + $key151 = new metastore_Table(); + $xfer += $key151->read($input); + $xfer += $input->readString($val152); + $this->tablePrivileges[$key151] = $val152; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->partitionPrivileges = array(); + $_size153 = 0; + $_ktype154 = 0; + $_vtype155 = 0; + $xfer += $input->readMapBegin($_ktype154, $_vtype155, $_size153); + for ($_i157 = 0; $_i157 < $_size153; ++$_i157) + { + $key158 = new metastore_Partition(); + $val159 = ''; + $key158 = new metastore_Partition(); + $xfer += $key158->read($input); + $xfer += $input->readString($val159); + $this->partitionPrivileges[$key158] = $val159; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->columnPrivileges = array(); + $_size160 = 0; + $_etype163 = 0; + $xfer += $input->readListBegin($_etype163, $_size160); + for ($_i164 = 0; $_i164 < $_size160; ++$_i164) + { + $elem165 = null; + $elem165 = new metastore_ColumnPrivilegeBag(); + $xfer += $elem165->read($input); + $this->columnPrivileges []= $elem165; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('PrivilegeBag'); + if ($this->userPrivileges !== null) { + $xfer += $output->writeFieldBegin('userPrivileges', TType::STRING, 1); + $xfer += $output->writeString($this->userPrivileges); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbPrivileges !== null) { + if (!is_array($this->dbPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('dbPrivileges', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRUCT, TType::STRING, count($this->dbPrivileges)); + { + foreach ($this->dbPrivileges as $kiter166 => $viter167) + { + $xfer += $kiter166->write($output); + $xfer += $output->writeString($viter167); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->tablePrivileges !== null) { + if (!is_array($this->tablePrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tablePrivileges', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRUCT, TType::STRING, count($this->tablePrivileges)); + { + foreach ($this->tablePrivileges as $kiter168 => $viter169) + { + $xfer += $kiter168->write($output); + $xfer += $output->writeString($viter169); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionPrivileges !== null) { + if (!is_array($this->partitionPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitionPrivileges', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRUCT, TType::STRING, count($this->partitionPrivileges)); + { + foreach ($this->partitionPrivileges as $kiter170 => $viter171) + { + $xfer += $kiter170->write($output); + $xfer += $output->writeString($viter171); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->columnPrivileges !== null) { + if (!is_array($this->columnPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columnPrivileges', TType::LST, 5); + { + $output->writeListBegin(TType::STRUCT, count($this->columnPrivileges)); + { + foreach ($this->columnPrivileges as $iter172) + { + $xfer += $iter172->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_SecurityUser { + static $_TSPEC; + + public $principalName = null; + public $isRole = null; + public $isGroup = null; + public $privileges = null; + public $createTime = null; + public $grantor = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principalName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'isRole', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'isGroup', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; + } + if (isset($vals['isRole'])) { + $this->isRole = $vals['isRole']; + } + if (isset($vals['isGroup'])) { + $this->isGroup = $vals['isGroup']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + } + } + + public function getName() { + return 'SecurityUser'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principalName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isRole); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isGroup); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->privileges); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('SecurityUser'); + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 1); + $xfer += $output->writeString($this->principalName); + $xfer += $output->writeFieldEnd(); + } + if ($this->isRole !== null) { + $xfer += $output->writeFieldBegin('isRole', TType::BOOL, 2); + $xfer += $output->writeBool($this->isRole); + $xfer += $output->writeFieldEnd(); + } + if ($this->isGroup !== null) { + $xfer += $output->writeFieldBegin('isGroup', TType::BOOL, 3); + $xfer += $output->writeBool($this->isGroup); + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + $xfer += $output->writeFieldBegin('privileges', TType::STRING, 4); + $xfer += $output->writeString($this->privileges); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 6); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_SecurityDB { + static $_TSPEC; + + public $principalName = null; + public $isRole = null; + public $isGroup = null; + public $privileges = null; + public $createTime = null; + public $grantor = null; + public $db = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principalName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'isRole', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'isGroup', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'db', + 'type' => TType::STRUCT, + 'class' => 'metastore_Database', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; + } + if (isset($vals['isRole'])) { + $this->isRole = $vals['isRole']; + } + if (isset($vals['isGroup'])) { + $this->isGroup = $vals['isGroup']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + if (isset($vals['db'])) { + $this->db = $vals['db']; + } + } + } + + public function getName() { + return 'SecurityDB'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principalName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isRole); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isGroup); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->privileges); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->db = new metastore_Database(); + $xfer += $this->db->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('SecurityDB'); + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 1); + $xfer += $output->writeString($this->principalName); + $xfer += $output->writeFieldEnd(); + } + if ($this->isRole !== null) { + $xfer += $output->writeFieldBegin('isRole', TType::BOOL, 2); + $xfer += $output->writeBool($this->isRole); + $xfer += $output->writeFieldEnd(); + } + if ($this->isGroup !== null) { + $xfer += $output->writeFieldBegin('isGroup', TType::BOOL, 3); + $xfer += $output->writeBool($this->isGroup); + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + $xfer += $output->writeFieldBegin('privileges', TType::STRING, 4); + $xfer += $output->writeString($this->privileges); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 6); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + if ($this->db !== null) { + if (!is_object($this->db)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('db', TType::STRUCT, 7); + $xfer += $this->db->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_SecurityTablePartition { + static $_TSPEC; + + public $principalName = null; + public $isRole = null; + public $isGroup = null; + public $privileges = null; + public $createTime = null; + public $grantor = null; + public $table = null; + public $part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'principalName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'isRole', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'isGroup', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'table', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + 8 => array( + 'var' => 'part', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), ); } if (is_array($vals)) { - if (isset($vals['indexName'])) { - $this->indexName = $vals['indexName']; + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; } - if (isset($vals['indexHandlerClass'])) { - $this->indexHandlerClass = $vals['indexHandlerClass']; + if (isset($vals['isRole'])) { + $this->isRole = $vals['isRole']; } - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; + if (isset($vals['isGroup'])) { + $this->isGroup = $vals['isGroup']; } - if (isset($vals['origTableName'])) { - $this->origTableName = $vals['origTableName']; + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; } if (isset($vals['createTime'])) { $this->createTime = $vals['createTime']; } - if (isset($vals['lastAccessTime'])) { - $this->lastAccessTime = $vals['lastAccessTime']; - } - if (isset($vals['indexTableName'])) { - $this->indexTableName = $vals['indexTableName']; - } - if (isset($vals['sd'])) { - $this->sd = $vals['sd']; + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; } - if (isset($vals['parameters'])) { - $this->parameters = $vals['parameters']; + if (isset($vals['table'])) { + $this->table = $vals['table']; } - if (isset($vals['deferredRebuild'])) { - $this->deferredRebuild = $vals['deferredRebuild']; + if (isset($vals['part'])) { + $this->part = $vals['part']; } } } public function getName() { - return 'Index'; + return 'SecurityTablePartition'; } public function read($input) @@ -1834,28 +3505,28 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->indexName); + $xfer += $input->readString($this->principalName); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->indexHandlerClass); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isRole); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbName); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isGroup); } else { $xfer += $input->skip($ftype); } break; case 4: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->origTableName); + $xfer += $input->readString($this->privileges); } else { $xfer += $input->skip($ftype); } @@ -1868,50 +3539,24 @@ } break; case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->lastAccessTime); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); } else { $xfer += $input->skip($ftype); } break; case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->indexTableName); + if ($ftype == TType::STRUCT) { + $this->table = new metastore_Table(); + $xfer += $this->table->read($input); } else { $xfer += $input->skip($ftype); } break; case 8: if ($ftype == TType::STRUCT) { - $this->sd = new metastore_StorageDescriptor(); - $xfer += $this->sd->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size78 = 0; - $_ktype79 = 0; - $_vtype80 = 0; - $xfer += $input->readMapBegin($_ktype79, $_vtype80, $_size78); - for ($_i82 = 0; $_i82 < $_size78; ++$_i82) - { - $key83 = ''; - $val84 = ''; - $xfer += $input->readString($key83); - $xfer += $input->readString($val84); - $this->parameters[$key83] = $val84; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deferredRebuild); + $this->part = new metastore_Partition(); + $xfer += $this->part->read($input); } else { $xfer += $input->skip($ftype); } @@ -1928,25 +3573,25 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('Index'); - if ($this->indexName !== null) { - $xfer += $output->writeFieldBegin('indexName', TType::STRING, 1); - $xfer += $output->writeString($this->indexName); + $xfer += $output->writeStructBegin('SecurityTablePartition'); + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 1); + $xfer += $output->writeString($this->principalName); $xfer += $output->writeFieldEnd(); } - if ($this->indexHandlerClass !== null) { - $xfer += $output->writeFieldBegin('indexHandlerClass', TType::STRING, 2); - $xfer += $output->writeString($this->indexHandlerClass); + if ($this->isRole !== null) { + $xfer += $output->writeFieldBegin('isRole', TType::BOOL, 2); + $xfer += $output->writeBool($this->isRole); $xfer += $output->writeFieldEnd(); } - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 3); - $xfer += $output->writeString($this->dbName); + if ($this->isGroup !== null) { + $xfer += $output->writeFieldBegin('isGroup', TType::BOOL, 3); + $xfer += $output->writeBool($this->isGroup); $xfer += $output->writeFieldEnd(); } - if ($this->origTableName !== null) { - $xfer += $output->writeFieldBegin('origTableName', TType::STRING, 4); - $xfer += $output->writeString($this->origTableName); + if ($this->privileges !== null) { + $xfer += $output->writeFieldBegin('privileges', TType::STRING, 4); + $xfer += $output->writeString($this->privileges); $xfer += $output->writeFieldEnd(); } if ($this->createTime !== null) { @@ -1954,45 +3599,25 @@ $xfer += $output->writeI32($this->createTime); $xfer += $output->writeFieldEnd(); } - if ($this->lastAccessTime !== null) { - $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 6); - $xfer += $output->writeI32($this->lastAccessTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->indexTableName !== null) { - $xfer += $output->writeFieldBegin('indexTableName', TType::STRING, 7); - $xfer += $output->writeString($this->indexTableName); + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 6); + $xfer += $output->writeString($this->grantor); $xfer += $output->writeFieldEnd(); } - if ($this->sd !== null) { - if (!is_object($this->sd)) { + if ($this->table !== null) { + if (!is_object($this->table)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 8); - $xfer += $this->sd->write($output); + $xfer += $output->writeFieldBegin('table', TType::STRUCT, 7); + $xfer += $this->table->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->parameters !== null) { - if (!is_array($this->parameters)) { + if ($this->part !== null) { + if (!is_object($this->part)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); - { - foreach ($this->parameters as $kiter85 => $viter86) - { - $xfer += $output->writeString($kiter85); - $xfer += $output->writeString($viter86); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->deferredRebuild !== null) { - $xfer += $output->writeFieldBegin('deferredRebuild', TType::BOOL, 10); - $xfer += $output->writeBool($this->deferredRebuild); + $xfer += $output->writeFieldBegin('part', TType::STRUCT, 8); + $xfer += $this->part->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -2002,50 +3627,95 @@ } -class metastore_Schema { +class metastore_SecurityColumn { static $_TSPEC; - public $fieldSchemas = null; - public $properties = null; + public $principalName = null; + public $isRole = null; + public $isGroup = null; + public $privileges = null; + public $createTime = null; + public $grantor = null; + public $table = null; + public $partition = null; + public $column = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'fieldSchemas', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', - ), + 'var' => 'principalName', + 'type' => TType::STRING, ), 2 => array( - 'var' => 'properties', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, + 'var' => 'isRole', + 'type' => TType::BOOL, ), - 'val' => array( - 'type' => TType::STRING, - ), + 3 => array( + 'var' => 'isGroup', + 'type' => TType::BOOL, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'grantor', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'table', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + 8 => array( + 'var' => 'partition', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + 9 => array( + 'var' => 'column', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['fieldSchemas'])) { - $this->fieldSchemas = $vals['fieldSchemas']; + if (isset($vals['principalName'])) { + $this->principalName = $vals['principalName']; } - if (isset($vals['properties'])) { - $this->properties = $vals['properties']; + if (isset($vals['isRole'])) { + $this->isRole = $vals['isRole']; + } + if (isset($vals['isGroup'])) { + $this->isGroup = $vals['isGroup']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['grantor'])) { + $this->grantor = $vals['grantor']; + } + if (isset($vals['table'])) { + $this->table = $vals['table']; + } + if (isset($vals['partition'])) { + $this->partition = $vals['partition']; + } + if (isset($vals['column'])) { + $this->column = $vals['column']; } } } public function getName() { - return 'Schema'; + return 'SecurityColumn'; } public function read($input) @@ -2064,39 +3734,66 @@ switch ($fid) { case 1: - if ($ftype == TType::LST) { - $this->fieldSchemas = array(); - $_size87 = 0; - $_etype90 = 0; - $xfer += $input->readListBegin($_etype90, $_size87); - for ($_i91 = 0; $_i91 < $_size87; ++$_i91) - { - $elem92 = null; - $elem92 = new metastore_FieldSchema(); - $xfer += $elem92->read($input); - $this->fieldSchemas []= $elem92; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->principalName); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::MAP) { - $this->properties = array(); - $_size93 = 0; - $_ktype94 = 0; - $_vtype95 = 0; - $xfer += $input->readMapBegin($_ktype94, $_vtype95, $_size93); - for ($_i97 = 0; $_i97 < $_size93; ++$_i97) - { - $key98 = ''; - $val99 = ''; - $xfer += $input->readString($key98); - $xfer += $input->readString($val99); - $this->properties[$key98] = $val99; - } - $xfer += $input->readMapEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isRole); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isGroup); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->privileges); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->grantor); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->table = new metastore_Table(); + $xfer += $this->table->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->partition = new metastore_Partition(); + $xfer += $this->partition->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column); } else { $xfer += $input->skip($ftype); } @@ -2113,40 +3810,56 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('Schema'); - if ($this->fieldSchemas !== null) { - if (!is_array($this->fieldSchemas)) { + $xfer += $output->writeStructBegin('SecurityColumn'); + if ($this->principalName !== null) { + $xfer += $output->writeFieldBegin('principalName', TType::STRING, 1); + $xfer += $output->writeString($this->principalName); + $xfer += $output->writeFieldEnd(); + } + if ($this->isRole !== null) { + $xfer += $output->writeFieldBegin('isRole', TType::BOOL, 2); + $xfer += $output->writeBool($this->isRole); + $xfer += $output->writeFieldEnd(); + } + if ($this->isGroup !== null) { + $xfer += $output->writeFieldBegin('isGroup', TType::BOOL, 3); + $xfer += $output->writeBool($this->isGroup); + $xfer += $output->writeFieldEnd(); + } + if ($this->privileges !== null) { + $xfer += $output->writeFieldBegin('privileges', TType::STRING, 4); + $xfer += $output->writeString($this->privileges); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->grantor !== null) { + $xfer += $output->writeFieldBegin('grantor', TType::STRING, 6); + $xfer += $output->writeString($this->grantor); + $xfer += $output->writeFieldEnd(); + } + if ($this->table !== null) { + if (!is_object($this->table)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('fieldSchemas', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas)); - { - foreach ($this->fieldSchemas as $iter100) - { - $xfer += $iter100->write($output); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('table', TType::STRUCT, 7); + $xfer += $this->table->write($output); $xfer += $output->writeFieldEnd(); } - if ($this->properties !== null) { - if (!is_array($this->properties)) { + if ($this->partition !== null) { + if (!is_object($this->partition)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('properties', TType::MAP, 2); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); - { - foreach ($this->properties as $kiter101 => $viter102) - { - $xfer += $output->writeString($kiter101); - $xfer += $output->writeString($viter102); - } - } - $output->writeMapEnd(); - } + $xfer += $output->writeFieldBegin('partition', TType::STRUCT, 8); + $xfer += $this->partition->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->column !== null) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 9); + $xfer += $output->writeString($this->column); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); Index: metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote =================================================================== --- metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote (revision 1037574) +++ metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote (working copy) @@ -44,10 +44,13 @@ print ' bool drop_partition(string db_name, string tbl_name, part_vals, bool deleteData)' print ' bool drop_partition_by_name(string db_name, string tbl_name, string part_name, bool deleteData)' print ' Partition get_partition(string db_name, string tbl_name, part_vals)' + print ' Partition get_partition_with_auth(string db_name, string tbl_name, part_vals, string user_name, group_names)' print ' Partition get_partition_by_name(string db_name, string tbl_name, string part_name)' print ' get_partitions(string db_name, string tbl_name, i16 max_parts)' + print ' get_partitions_with_auth(string db_name, string tbl_name, i16 max_parts, string user_name, group_names)' print ' get_partition_names(string db_name, string tbl_name, i16 max_parts)' print ' get_partitions_ps(string db_name, string tbl_name, part_vals, i16 max_parts)' + print ' get_partitions_ps_with_auth(string db_name, string tbl_name, part_vals, i16 max_parts, string user_name, group_names)' print ' get_partition_names_ps(string db_name, string tbl_name, part_vals, i16 max_parts)' print ' get_partitions_by_filter(string db_name, string tbl_name, string filter, i16 max_parts)' print ' void alter_partition(string db_name, string tbl_name, Partition new_part)' @@ -60,6 +63,24 @@ print ' Index get_index_by_name(string db_name, string tbl_name, string index_name)' print ' get_indexes(string db_name, string tbl_name, i16 max_indexes)' print ' get_index_names(string db_name, string tbl_name, i16 max_indexes)' + print ' PrincipalPrivilegeSet get_user_privilege_set(string user_name, group_names)' + print ' PrincipalPrivilegeSet get_db_privilege_set(string db_name, string user_name, group_names)' + print ' PrincipalPrivilegeSet get_table_privilege_set(string db_name, string table_name, string user_name, group_names)' + print ' PrincipalPrivilegeSet get_partition_privilege_set(string db_name, string table_name, string part_name, string user_name, group_names)' + print ' PrincipalPrivilegeSet get_column_privilege_set(string db_name, string table_name, string part_name, string column_name, string user_name, group_names)' + print ' bool create_role(string role_name, string owner_name, string db_name)' + print ' bool drop_role(string role_name, string db_name)' + print ' bool add_role_member(string role_name, string user_name, bool is_role, bool is_group, string db_name)' + print ' bool remove_role_member(string role_name, string user_name, bool is_role, bool is_group, string db_name)' + print ' list_roles(string principal_name, bool is_role, bool is_group, string db_name)' + print ' list_security_user_grant(string principla_name, bool is_role, bool is_group)' + print ' list_security_db_grant(string principal_name, bool is_group, bool is_role, string db_name)' + print ' list_security_table_grant(string principal_name, bool is_group, bool is_role, string db_name, string table_name)' + print ' list_security_partition_grant(string principal_name, bool is_group, bool is_role, string db_name, string table_name, string part_name)' + print ' list_security_column_grant(string principal_name, bool is_group, bool is_role, string db_name, string table_name, string part_name, string column_name)' + print ' bool grant_privileges(string user_name, bool is_role, bool is_group, PrivilegeBag privileges, string grantor)' + print ' bool revoke_privileges(string user_name, bool is_role, bool is_group, PrivilegeBag privileges)' + print ' bool revoke_all_privileges(string user_name, bool is_role, bool is_group, bool remove_user_priv, dbs, tables, parts, columns)' print '' sys.exit(0) @@ -246,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' @@ -258,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' @@ -270,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' @@ -342,4 +381,112 @@ sys.exit(1) pp.pprint(client.get_index_names(args[0],args[1],eval(args[2]),)) +elif cmd == 'get_user_privilege_set': + if len(args) != 2: + print 'get_user_privilege_set requires 2 args' + sys.exit(1) + pp.pprint(client.get_user_privilege_set(args[0],eval(args[1]),)) + +elif cmd == 'get_db_privilege_set': + if len(args) != 3: + print 'get_db_privilege_set requires 3 args' + sys.exit(1) + pp.pprint(client.get_db_privilege_set(args[0],args[1],eval(args[2]),)) + +elif cmd == 'get_table_privilege_set': + if len(args) != 4: + print 'get_table_privilege_set requires 4 args' + sys.exit(1) + pp.pprint(client.get_table_privilege_set(args[0],args[1],args[2],eval(args[3]),)) + +elif cmd == 'get_partition_privilege_set': + if len(args) != 5: + print 'get_partition_privilege_set requires 5 args' + sys.exit(1) + pp.pprint(client.get_partition_privilege_set(args[0],args[1],args[2],args[3],eval(args[4]),)) + +elif cmd == 'get_column_privilege_set': + if len(args) != 6: + print 'get_column_privilege_set requires 6 args' + sys.exit(1) + pp.pprint(client.get_column_privilege_set(args[0],args[1],args[2],args[3],args[4],eval(args[5]),)) + +elif cmd == 'create_role': + if len(args) != 3: + print 'create_role requires 3 args' + sys.exit(1) + pp.pprint(client.create_role(args[0],args[1],args[2],)) + +elif cmd == 'drop_role': + if len(args) != 2: + print 'drop_role requires 2 args' + sys.exit(1) + pp.pprint(client.drop_role(args[0],args[1],)) + +elif cmd == 'add_role_member': + if len(args) != 5: + print 'add_role_member requires 5 args' + sys.exit(1) + pp.pprint(client.add_role_member(args[0],args[1],eval(args[2]),eval(args[3]),args[4],)) + +elif cmd == 'remove_role_member': + if len(args) != 5: + print 'remove_role_member requires 5 args' + sys.exit(1) + pp.pprint(client.remove_role_member(args[0],args[1],eval(args[2]),eval(args[3]),args[4],)) + +elif cmd == 'list_roles': + if len(args) != 4: + print 'list_roles requires 4 args' + sys.exit(1) + pp.pprint(client.list_roles(args[0],eval(args[1]),eval(args[2]),args[3],)) + +elif cmd == 'list_security_user_grant': + if len(args) != 3: + print 'list_security_user_grant requires 3 args' + sys.exit(1) + pp.pprint(client.list_security_user_grant(args[0],eval(args[1]),eval(args[2]),)) + +elif cmd == 'list_security_db_grant': + if len(args) != 4: + print 'list_security_db_grant requires 4 args' + sys.exit(1) + pp.pprint(client.list_security_db_grant(args[0],eval(args[1]),eval(args[2]),args[3],)) + +elif cmd == 'list_security_table_grant': + if len(args) != 5: + print 'list_security_table_grant requires 5 args' + sys.exit(1) + pp.pprint(client.list_security_table_grant(args[0],eval(args[1]),eval(args[2]),args[3],args[4],)) + +elif cmd == 'list_security_partition_grant': + if len(args) != 6: + print 'list_security_partition_grant requires 6 args' + sys.exit(1) + pp.pprint(client.list_security_partition_grant(args[0],eval(args[1]),eval(args[2]),args[3],args[4],args[5],)) + +elif cmd == 'list_security_column_grant': + if len(args) != 7: + print 'list_security_column_grant requires 7 args' + sys.exit(1) + pp.pprint(client.list_security_column_grant(args[0],eval(args[1]),eval(args[2]),args[3],args[4],args[5],args[6],)) + +elif cmd == 'grant_privileges': + if len(args) != 5: + print 'grant_privileges requires 5 args' + sys.exit(1) + pp.pprint(client.grant_privileges(args[0],eval(args[1]),eval(args[2]),eval(args[3]),args[4],)) + +elif cmd == 'revoke_privileges': + if len(args) != 4: + print 'revoke_privileges requires 4 args' + sys.exit(1) + pp.pprint(client.revoke_privileges(args[0],eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'revoke_all_privileges': + if len(args) != 8: + print 'revoke_all_privileges requires 8 args' + sys.exit(1) + pp.pprint(client.revoke_all_privileges(args[0],eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),eval(args[6]),eval(args[7]),)) + transport.close() Index: metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py =================================================================== --- metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py (revision 1037574) +++ metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py (working copy) @@ -198,6 +198,17 @@ """ pass + def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - user_name + - group_names + """ + pass + def get_partition_by_name(self, db_name, tbl_name, part_name): """ Parameters: @@ -216,6 +227,17 @@ """ pass + def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - max_parts + - user_name + - group_names + """ + pass + def get_partition_names(self, db_name, tbl_name, max_parts): """ Parameters: @@ -235,6 +257,18 @@ """ pass + def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names + """ + pass + def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): """ Parameters: @@ -341,6 +375,195 @@ """ pass + def get_user_privilege_set(self, user_name, group_names): + """ + Parameters: + - user_name + - group_names + """ + pass + + def get_db_privilege_set(self, db_name, user_name, group_names): + """ + Parameters: + - db_name + - user_name + - group_names + """ + pass + + def get_table_privilege_set(self, db_name, table_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - user_name + - group_names + """ + pass + + def get_partition_privilege_set(self, db_name, table_name, part_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - part_name + - user_name + - group_names + """ + pass + + def get_column_privilege_set(self, db_name, table_name, part_name, column_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - part_name + - column_name + - user_name + - group_names + """ + pass + + def create_role(self, role_name, owner_name, db_name): + """ + Parameters: + - role_name + - owner_name + - db_name + """ + pass + + def drop_role(self, role_name, db_name): + """ + Parameters: + - role_name + - db_name + """ + pass + + def add_role_member(self, role_name, user_name, is_role, is_group, db_name): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + - db_name + """ + pass + + def remove_role_member(self, role_name, user_name, is_role, is_group, db_name): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + - db_name + """ + pass + + def list_roles(self, principal_name, is_role, is_group, db_name): + """ + Parameters: + - principal_name + - is_role + - is_group + - db_name + """ + pass + + def list_security_user_grant(self, principla_name, is_role, is_group): + """ + Parameters: + - principla_name + - is_role + - is_group + """ + pass + + def list_security_db_grant(self, principal_name, is_group, is_role, db_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + """ + pass + + def list_security_table_grant(self, principal_name, is_group, is_role, db_name, table_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + """ + pass + + def list_security_partition_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_name + """ + pass + + def list_security_column_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name, column_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_name + - column_name + """ + pass + + def grant_privileges(self, user_name, is_role, is_group, privileges, grantor): + """ + Parameters: + - user_name + - is_role + - is_group + - privileges + - grantor + """ + pass + + def revoke_privileges(self, user_name, is_role, is_group, privileges): + """ + Parameters: + - user_name + - is_role + - is_group + - privileges + """ + pass + + def revoke_all_privileges(self, user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns): + """ + Parameters: + - user_name + - is_role + - is_group + - remove_user_priv + - dbs + - tables + - parts + - columns + """ + pass + class Client(fb303.FacebookService.Client, Iface): """ @@ -1168,6 +1391,48 @@ raise result.o2 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result"); + def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - user_name + - group_names + """ + self.send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names) + return self.recv_get_partition_with_auth() + + def send_get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names): + self._oprot.writeMessageBegin('get_partition_with_auth', TMessageType.CALL, self._seqid) + args = get_partition_with_auth_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partition_with_auth(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partition_with_auth_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_with_auth failed: unknown result"); + def get_partition_by_name(self, db_name, tbl_name, part_name): """ Parameters: @@ -1244,6 +1509,48 @@ raise result.o2 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result"); + def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - max_parts + - user_name + - group_names + """ + self.send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names) + return self.recv_get_partitions_with_auth() + + def send_get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names): + self._oprot.writeMessageBegin('get_partitions_with_auth', TMessageType.CALL, self._seqid) + args = get_partitions_with_auth_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.max_parts = max_parts + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_with_auth(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partitions_with_auth_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_with_auth failed: unknown result"); + def get_partition_names(self, db_name, tbl_name, max_parts): """ Parameters: @@ -1318,6 +1625,50 @@ raise result.o1 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result"); + def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + """ + Parameters: + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names + """ + self.send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names) + return self.recv_get_partitions_ps_with_auth() + + def send_get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names): + self._oprot.writeMessageBegin('get_partitions_ps_with_auth', TMessageType.CALL, self._seqid) + args = get_partitions_ps_with_auth_args() + args.db_name = db_name + args.tbl_name = tbl_name + args.part_vals = part_vals + args.max_parts = max_parts + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_partitions_ps_with_auth(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partitions_ps_with_auth_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + if result.o2 != None: + raise result.o2 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result"); + def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts): """ Parameters: @@ -1758,703 +2109,4884 @@ raise result.o2 raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result"); + def get_user_privilege_set(self, user_name, group_names): + """ + Parameters: + - user_name + - group_names + """ + self.send_get_user_privilege_set(user_name, group_names) + return self.recv_get_user_privilege_set() + + def send_get_user_privilege_set(self, user_name, group_names): + self._oprot.writeMessageBegin('get_user_privilege_set', TMessageType.CALL, self._seqid) + args = get_user_privilege_set_args() + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get_user_privilege_set(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_user_privilege_set_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_user_privilege_set failed: unknown result"); + + def get_db_privilege_set(self, db_name, user_name, group_names): + """ + Parameters: + - db_name + - user_name + - group_names + """ + self.send_get_db_privilege_set(db_name, user_name, group_names) + return self.recv_get_db_privilege_set() -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["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_get_db_privilege_set(self, db_name, user_name, group_names): + self._oprot.writeMessageBegin('get_db_privilege_set', TMessageType.CALL, self._seqid) + args = get_db_privilege_set_args() + args.db_name = db_name + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def 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_get_db_privilege_set(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_db_privilege_set_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_db_privilege_set failed: unknown result"); - def 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 get_table_privilege_set(self, db_name, table_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - user_name + - group_names + """ + self.send_get_table_privilege_set(db_name, table_name, user_name, group_names) + return self.recv_get_table_privilege_set() - def process_get_database(self, seqid, iprot, oprot): - args = get_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_database_result() - try: - result.success = self._handler.get_database(args.name) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_database", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_get_table_privilege_set(self, db_name, table_name, user_name, group_names): + self._oprot.writeMessageBegin('get_table_privilege_set', TMessageType.CALL, self._seqid) + args = get_table_privilege_set_args() + args.db_name = db_name + args.table_name = table_name + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_drop_database(self, seqid, iprot, oprot): - args = drop_database_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_database_result() - try: - self._handler.drop_database(args.name, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except InvalidOperationException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def recv_get_table_privilege_set(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_table_privilege_set_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table_privilege_set failed: unknown result"); - def process_get_databases(self, seqid, iprot, oprot): - args = get_databases_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_databases_result() - try: - result.success = self._handler.get_databases(args.pattern) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def get_partition_privilege_set(self, db_name, table_name, part_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - part_name + - user_name + - group_names + """ + self.send_get_partition_privilege_set(db_name, table_name, part_name, user_name, group_names) + return self.recv_get_partition_privilege_set() - def process_get_all_databases(self, seqid, iprot, oprot): - args = get_all_databases_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_all_databases_result() - try: - result.success = self._handler.get_all_databases() - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_all_databases", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_get_partition_privilege_set(self, db_name, table_name, part_name, user_name, group_names): + self._oprot.writeMessageBegin('get_partition_privilege_set', TMessageType.CALL, self._seqid) + args = get_partition_privilege_set_args() + args.db_name = db_name + args.table_name = table_name + args.part_name = part_name + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_get_type(self, seqid, iprot, oprot): - args = get_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_type_result() - try: - result.success = self._handler.get_type(args.name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def recv_get_partition_privilege_set(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_partition_privilege_set_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_privilege_set failed: unknown result"); - def process_create_type(self, seqid, iprot, oprot): - args = create_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_type_result() - try: - result.success = self._handler.create_type(args.type) - except AlreadyExistsException, o1: - result.o1 = o1 - except InvalidObjectException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("create_type", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def get_column_privilege_set(self, db_name, table_name, part_name, column_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - part_name + - column_name + - user_name + - group_names + """ + self.send_get_column_privilege_set(db_name, table_name, part_name, column_name, user_name, group_names) + return self.recv_get_column_privilege_set() - def process_drop_type(self, seqid, iprot, oprot): - args = drop_type_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_type_result() - try: - result.success = self._handler.drop_type(args.type) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_get_column_privilege_set(self, db_name, table_name, part_name, column_name, user_name, group_names): + self._oprot.writeMessageBegin('get_column_privilege_set', TMessageType.CALL, self._seqid) + args = get_column_privilege_set_args() + args.db_name = db_name + args.table_name = table_name + args.part_name = part_name + args.column_name = column_name + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_get_type_all(self, seqid, iprot, oprot): - args = get_type_all_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_type_all_result() - try: - result.success = self._handler.get_type_all(args.name) - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_type_all", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def recv_get_column_privilege_set(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_column_privilege_set_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_column_privilege_set failed: unknown result"); - def process_get_fields(self, seqid, iprot, oprot): - args = get_fields_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_fields_result() - try: - result.success = self._handler.get_fields(args.db_name, args.table_name) - except MetaException, o1: - result.o1 = o1 - except UnknownTableException, o2: - result.o2 = o2 - except UnknownDBException, o3: - result.o3 = o3 - oprot.writeMessageBegin("get_fields", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def create_role(self, role_name, owner_name, db_name): + """ + Parameters: + - role_name + - owner_name + - db_name + """ + self.send_create_role(role_name, owner_name, db_name) + return self.recv_create_role() - def process_get_schema(self, seqid, iprot, oprot): - args = get_schema_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_schema_result() - try: - result.success = self._handler.get_schema(args.db_name, args.table_name) - except MetaException, o1: - result.o1 = o1 - except UnknownTableException, o2: - result.o2 = o2 - except UnknownDBException, o3: - result.o3 = o3 - oprot.writeMessageBegin("get_schema", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_create_role(self, role_name, owner_name, db_name): + self._oprot.writeMessageBegin('create_role', TMessageType.CALL, self._seqid) + args = create_role_args() + args.role_name = role_name + args.owner_name = owner_name + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_create_table(self, seqid, iprot, oprot): - args = create_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = create_table_result() - try: - self._handler.create_table(args.tbl) - except AlreadyExistsException, o1: - result.o1 = o1 - except InvalidObjectException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - except NoSuchObjectException, o4: - result.o4 = o4 - oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def 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_drop_table(self, seqid, iprot, oprot): - args = drop_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_table_result() - try: - self._handler.drop_table(args.dbname, args.name, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def drop_role(self, role_name, db_name): + """ + Parameters: + - role_name + - db_name + """ + self.send_drop_role(role_name, db_name) + return self.recv_drop_role() - def process_get_tables(self, seqid, iprot, oprot): - args = get_tables_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_tables_result() - try: - result.success = self._handler.get_tables(args.db_name, args.pattern) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_tables", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_drop_role(self, role_name, db_name): + self._oprot.writeMessageBegin('drop_role', TMessageType.CALL, self._seqid) + args = drop_role_args() + args.role_name = role_name + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_get_all_tables(self, seqid, iprot, oprot): - args = get_all_tables_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_all_tables_result() - try: - result.success = self._handler.get_all_tables(args.db_name) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def 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 process_get_table(self, seqid, iprot, oprot): - args = get_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_table_result() - try: - result.success = self._handler.get_table(args.dbname, args.tbl_name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def add_role_member(self, role_name, user_name, is_role, is_group, db_name): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + - db_name + """ + self.send_add_role_member(role_name, user_name, is_role, is_group, db_name) + return self.recv_add_role_member() - def process_alter_table(self, seqid, iprot, oprot): - args = alter_table_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_table_result() - try: - self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) - except InvalidOperationException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("alter_table", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_add_role_member(self, role_name, user_name, is_role, is_group, db_name): + self._oprot.writeMessageBegin('add_role_member', TMessageType.CALL, self._seqid) + args = add_role_member_args() + args.role_name = role_name + args.user_name = user_name + args.is_role = is_role + args.is_group = is_group + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_add_partition(self, seqid, iprot, oprot): - args = add_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = add_partition_result() - try: - result.success = self._handler.add_partition(args.new_part) - except InvalidObjectException, o1: - result.o1 = o1 - except AlreadyExistsException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("add_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def recv_add_role_member(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = add_role_member_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_role_member failed: unknown result"); - def process_append_partition(self, seqid, iprot, oprot): - args = append_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = append_partition_result() - try: - result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) - except InvalidObjectException, o1: - result.o1 = o1 - except AlreadyExistsException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("append_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def remove_role_member(self, role_name, user_name, is_role, is_group, db_name): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + - db_name + """ + self.send_remove_role_member(role_name, user_name, is_role, is_group, db_name) + return self.recv_remove_role_member() + + def send_remove_role_member(self, role_name, user_name, is_role, is_group, db_name): + self._oprot.writeMessageBegin('remove_role_member', TMessageType.CALL, self._seqid) + args = remove_role_member_args() + args.role_name = role_name + args.user_name = user_name + args.is_role = is_role + args.is_group = is_group + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_append_partition_by_name(self, seqid, iprot, oprot): - args = append_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = append_partition_by_name_result() - try: - result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) - except InvalidObjectException, o1: - result.o1 = o1 - except AlreadyExistsException, o2: - result.o2 = o2 - except MetaException, o3: - result.o3 = o3 - oprot.writeMessageBegin("append_partition_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def recv_remove_role_member(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = remove_role_member_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "remove_role_member failed: unknown result"); - def process_drop_partition(self, seqid, iprot, oprot): - args = drop_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_partition_result() - try: - result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def list_roles(self, principal_name, is_role, is_group, db_name): + """ + Parameters: + - principal_name + - is_role + - is_group + - db_name + """ + self.send_list_roles(principal_name, is_role, is_group, db_name) + return self.recv_list_roles() - def process_drop_partition_by_name(self, seqid, iprot, oprot): - args = drop_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = drop_partition_by_name_result() - try: - result.success = self._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_partition_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_list_roles(self, principal_name, is_role, is_group, db_name): + self._oprot.writeMessageBegin('list_roles', TMessageType.CALL, self._seqid) + args = list_roles_args() + args.principal_name = principal_name + args.is_role = is_role + args.is_group = is_group + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_get_partition(self, seqid, iprot, oprot): - args = get_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_result() - try: - result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def 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 process_get_partition_by_name(self, seqid, iprot, oprot): - args = get_partition_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_by_name_result() - try: - result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partition_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def list_security_user_grant(self, principla_name, is_role, is_group): + """ + Parameters: + - principla_name + - is_role + - is_group + """ + self.send_list_security_user_grant(principla_name, is_role, is_group) + return self.recv_list_security_user_grant() - def process_get_partitions(self, seqid, iprot, oprot): - args = get_partitions_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_result() - try: - result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) - except NoSuchObjectException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partitions", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_list_security_user_grant(self, principla_name, is_role, is_group): + self._oprot.writeMessageBegin('list_security_user_grant', TMessageType.CALL, self._seqid) + args = list_security_user_grant_args() + args.principla_name = principla_name + args.is_role = is_role + args.is_group = is_group + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_get_partition_names(self, seqid, iprot, oprot): - args = get_partition_names_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_names_result() - try: - result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partition_names", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def recv_list_security_user_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_user_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_user_grant failed: unknown result"); - def process_get_partitions_ps(self, seqid, iprot, oprot): - args = get_partitions_ps_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_ps_result() - try: - result.success = self._handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_partitions_ps", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def list_security_db_grant(self, principal_name, is_group, is_role, db_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + """ + self.send_list_security_db_grant(principal_name, is_group, is_role, db_name) + return self.recv_list_security_db_grant() - def process_get_partition_names_ps(self, seqid, iprot, oprot): - args = get_partition_names_ps_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partition_names_ps_result() - try: - result.success = self._handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) - except MetaException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_partition_names_ps", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_list_security_db_grant(self, principal_name, is_group, is_role, db_name): + self._oprot.writeMessageBegin('list_security_db_grant', TMessageType.CALL, self._seqid) + args = list_security_db_grant_args() + args.principal_name = principal_name + args.is_group = is_group + args.is_role = is_role + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def process_get_partitions_by_filter(self, seqid, iprot, oprot): - args = get_partitions_by_filter_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_partitions_by_filter_result() - try: - result.success = self._handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_partitions_by_filter", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def recv_list_security_db_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_db_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_db_grant failed: unknown result"); - def process_alter_partition(self, seqid, iprot, oprot): - args = alter_partition_args() - args.read(iprot) - iprot.readMessageEnd() - result = alter_partition_result() - try: - self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part) - except InvalidOperationException, o1: - result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("alter_partition", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def list_security_table_grant(self, principal_name, is_group, is_role, db_name, table_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + """ + self.send_list_security_table_grant(principal_name, is_group, is_role, db_name, table_name) + return self.recv_list_security_table_grant() - def process_get_config_value(self, seqid, iprot, oprot): - args = get_config_value_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_config_value_result() - try: - result.success = self._handler.get_config_value(args.name, args.defaultValue) - except ConfigValSecurityException, o1: - result.o1 = o1 - oprot.writeMessageBegin("get_config_value", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def send_list_security_table_grant(self, principal_name, is_group, is_role, db_name, table_name): + self._oprot.writeMessageBegin('list_security_table_grant', TMessageType.CALL, self._seqid) + args = list_security_table_grant_args() + args.principal_name = principal_name + args.is_group = is_group + args.is_role = is_role + args.db_name = db_name + args.table_name = table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_table_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_table_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_table_grant failed: unknown result"); - def process_partition_name_to_vals(self, seqid, iprot, oprot): - args = partition_name_to_vals_args() + def list_security_partition_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_name + """ + self.send_list_security_partition_grant(principal_name, is_group, is_role, db_name, table_name, part_name) + return self.recv_list_security_partition_grant() + + def send_list_security_partition_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name): + self._oprot.writeMessageBegin('list_security_partition_grant', TMessageType.CALL, self._seqid) + args = list_security_partition_grant_args() + args.principal_name = principal_name + args.is_group = is_group + args.is_role = is_role + args.db_name = db_name + args.table_name = table_name + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_partition_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_partition_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_partition_grant failed: unknown result"); + + def list_security_column_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name, column_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_name + - column_name + """ + self.send_list_security_column_grant(principal_name, is_group, is_role, db_name, table_name, part_name, column_name) + return self.recv_list_security_column_grant() + + def send_list_security_column_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name, column_name): + self._oprot.writeMessageBegin('list_security_column_grant', TMessageType.CALL, self._seqid) + args = list_security_column_grant_args() + args.principal_name = principal_name + args.is_group = is_group + args.is_role = is_role + args.db_name = db_name + args.table_name = table_name + args.part_name = part_name + args.column_name = column_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_column_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_column_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_column_grant failed: unknown result"); + + def grant_privileges(self, user_name, is_role, is_group, privileges, grantor): + """ + Parameters: + - user_name + - is_role + - is_group + - privileges + - grantor + """ + self.send_grant_privileges(user_name, is_role, is_group, privileges, grantor) + return self.recv_grant_privileges() + + def send_grant_privileges(self, user_name, is_role, is_group, privileges, grantor): + self._oprot.writeMessageBegin('grant_privileges', TMessageType.CALL, self._seqid) + args = grant_privileges_args() + args.user_name = user_name + args.is_role = is_role + args.is_group = is_group + args.privileges = privileges + args.grantor = grantor + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_grant_privileges(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = grant_privileges_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_privileges failed: unknown result"); + + def revoke_privileges(self, user_name, is_role, is_group, privileges): + """ + Parameters: + - user_name + - is_role + - is_group + - privileges + """ + self.send_revoke_privileges(user_name, is_role, is_group, privileges) + return self.recv_revoke_privileges() + + def send_revoke_privileges(self, user_name, is_role, is_group, privileges): + self._oprot.writeMessageBegin('revoke_privileges', TMessageType.CALL, self._seqid) + args = revoke_privileges_args() + args.user_name = user_name + args.is_role = is_role + args.is_group = is_group + args.privileges = privileges + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_revoke_privileges(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = revoke_privileges_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result"); + + def revoke_all_privileges(self, user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns): + """ + Parameters: + - user_name + - is_role + - is_group + - remove_user_priv + - dbs + - tables + - parts + - columns + """ + self.send_revoke_all_privileges(user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns) + return self.recv_revoke_all_privileges() + + def send_revoke_all_privileges(self, user_name, is_role, is_group, remove_user_priv, dbs, tables, parts, columns): + self._oprot.writeMessageBegin('revoke_all_privileges', TMessageType.CALL, self._seqid) + args = revoke_all_privileges_args() + args.user_name = user_name + args.is_role = is_role + args.is_group = is_group + args.remove_user_priv = remove_user_priv + args.dbs = dbs + args.tables = tables + args.parts = parts + args.columns = columns + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_revoke_all_privileges(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = revoke_all_privileges_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_all_privileges failed: unknown result"); + + +class Processor(fb303.FacebookService.Processor, Iface, TProcessor): + def __init__(self, handler): + 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["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["get_user_privilege_set"] = Processor.process_get_user_privilege_set + self._processMap["get_db_privilege_set"] = Processor.process_get_db_privilege_set + self._processMap["get_table_privilege_set"] = Processor.process_get_table_privilege_set + self._processMap["get_partition_privilege_set"] = Processor.process_get_partition_privilege_set + self._processMap["get_column_privilege_set"] = Processor.process_get_column_privilege_set + self._processMap["create_role"] = Processor.process_create_role + self._processMap["drop_role"] = Processor.process_drop_role + self._processMap["add_role_member"] = Processor.process_add_role_member + self._processMap["remove_role_member"] = Processor.process_remove_role_member + self._processMap["list_roles"] = Processor.process_list_roles + self._processMap["list_security_user_grant"] = Processor.process_list_security_user_grant + self._processMap["list_security_db_grant"] = Processor.process_list_security_db_grant + self._processMap["list_security_table_grant"] = Processor.process_list_security_table_grant + self._processMap["list_security_partition_grant"] = Processor.process_list_security_partition_grant + self._processMap["list_security_column_grant"] = Processor.process_list_security_column_grant + self._processMap["grant_privileges"] = Processor.process_grant_privileges + self._processMap["revoke_privileges"] = Processor.process_revoke_privileges + self._processMap["revoke_all_privileges"] = Processor.process_revoke_all_privileges + + def process(self, iprot, oprot): + (name, type, seqid) = iprot.readMessageBegin() + if name not in self._processMap: + iprot.skip(TType.STRUCT) + iprot.readMessageEnd() + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + return + else: + self._processMap[name](self, seqid, iprot, oprot) + return True + + def process_create_database(self, seqid, iprot, oprot): + args = create_database_args() args.read(iprot) iprot.readMessageEnd() - result = partition_name_to_vals_result() + result = create_database_result() try: - result.success = self._handler.partition_name_to_vals(args.part_name) - except MetaException, o1: + self._handler.create_database(args.database) + except AlreadyExistsException, o1: result.o1 = o1 - oprot.writeMessageBegin("partition_name_to_vals", TMessageType.REPLY, seqid) + 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_partition_name_to_spec(self, seqid, iprot, oprot): - args = partition_name_to_spec_args() + def process_get_database(self, seqid, iprot, oprot): + args = get_database_args() args.read(iprot) iprot.readMessageEnd() - result = partition_name_to_spec_result() + result = get_database_result() try: - result.success = self._handler.partition_name_to_spec(args.part_name) - except MetaException, o1: + result.success = self._handler.get_database(args.name) + except NoSuchObjectException, o1: result.o1 = o1 - oprot.writeMessageBegin("partition_name_to_spec", TMessageType.REPLY, seqid) + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_database", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_add_index(self, seqid, iprot, oprot): - args = add_index_args() + def process_drop_database(self, seqid, iprot, oprot): + args = drop_database_args() args.read(iprot) iprot.readMessageEnd() - result = add_index_result() + result = drop_database_result() try: - result.success = self._handler.add_index(args.new_index, args.index_table) - except InvalidObjectException, o1: + self._handler.drop_database(args.name, args.deleteData) + except NoSuchObjectException, o1: result.o1 = o1 - except AlreadyExistsException, o2: + except InvalidOperationException, o2: result.o2 = o2 except MetaException, o3: result.o3 = o3 - oprot.writeMessageBegin("add_index", TMessageType.REPLY, seqid) + oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_alter_index(self, seqid, iprot, oprot): - args = alter_index_args() + def process_get_databases(self, seqid, iprot, oprot): + args = get_databases_args() args.read(iprot) iprot.readMessageEnd() - result = alter_index_result() + result = get_databases_result() try: - self._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) - except InvalidOperationException, o1: + result.success = self._handler.get_databases(args.pattern) + except MetaException, o1: result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("alter_index", TMessageType.REPLY, seqid) + oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_drop_index_by_name(self, seqid, iprot, oprot): - args = drop_index_by_name_args() + def process_get_all_databases(self, seqid, iprot, oprot): + args = get_all_databases_args() args.read(iprot) iprot.readMessageEnd() - result = drop_index_by_name_result() + result = get_all_databases_result() try: - result.success = self._handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) - except NoSuchObjectException, o1: + result.success = self._handler.get_all_databases() + except MetaException, o1: result.o1 = o1 - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("drop_index_by_name", TMessageType.REPLY, seqid) + oprot.writeMessageBegin("get_all_databases", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_get_index_by_name(self, seqid, iprot, oprot): - args = get_index_by_name_args() + def process_get_type(self, seqid, iprot, oprot): + args = get_type_args() args.read(iprot) iprot.readMessageEnd() - result = get_index_by_name_result() + result = get_type_result() try: - result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) + result.success = self._handler.get_type(args.name) except MetaException, o1: result.o1 = o1 except NoSuchObjectException, o2: result.o2 = o2 - oprot.writeMessageBegin("get_index_by_name", TMessageType.REPLY, seqid) + oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_get_indexes(self, seqid, iprot, oprot): - args = get_indexes_args() + def process_create_type(self, seqid, iprot, oprot): + args = create_type_args() args.read(iprot) iprot.readMessageEnd() - result = get_indexes_result() + result = create_type_result() try: - result.success = self._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) + result.success = self._handler.create_type(args.type) + except AlreadyExistsException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("create_type", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_type(self, seqid, iprot, oprot): + args = drop_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_type_result() + try: + result.success = self._handler.drop_type(args.type) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_type_all(self, seqid, iprot, oprot): + args = get_type_all_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_type_all_result() + try: + result.success = self._handler.get_type_all(args.name) + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_type_all", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_fields(self, seqid, iprot, oprot): + args = get_fields_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_fields_result() + try: + result.success = self._handler.get_fields(args.db_name, args.table_name) + except MetaException, o1: + result.o1 = o1 + except UnknownTableException, o2: + result.o2 = o2 + except UnknownDBException, o3: + result.o3 = o3 + oprot.writeMessageBegin("get_fields", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema(self, seqid, iprot, oprot): + args = get_schema_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_result() + try: + result.success = self._handler.get_schema(args.db_name, args.table_name) + except MetaException, o1: + result.o1 = o1 + except UnknownTableException, o2: + result.o2 = o2 + except UnknownDBException, o3: + result.o3 = o3 + oprot.writeMessageBegin("get_schema", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table(self, seqid, iprot, oprot): + args = create_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_result() + try: + self._handler.create_table(args.tbl) + except AlreadyExistsException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + except NoSuchObjectException, o4: + result.o4 = o4 + oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_table(self, seqid, iprot, oprot): + args = drop_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_table_result() + try: + self._handler.drop_table(args.dbname, args.name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_tables(self, seqid, iprot, oprot): + args = get_tables_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_tables_result() + try: + result.success = self._handler.get_tables(args.db_name, args.pattern) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_tables", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_tables(self, seqid, iprot, oprot): + args = get_all_tables_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_tables_result() + try: + result.success = self._handler.get_all_tables(args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table(self, seqid, iprot, oprot): + args = get_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_result() + try: + result.success = self._handler.get_table(args.dbname, args.tbl_name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_table(self, seqid, iprot, oprot): + args = alter_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_table_result() + try: + self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) + except InvalidOperationException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("alter_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partition(self, seqid, iprot, oprot): + args = add_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partition_result() + try: + result.success = self._handler.add_partition(args.new_part) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("add_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition(self, seqid, iprot, oprot): + args = append_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_result() + try: + result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("append_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition_by_name(self, seqid, iprot, oprot): + args = append_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_by_name_result() + try: + result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("append_partition_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition(self, seqid, iprot, oprot): + args = drop_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_result() + try: + result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) except NoSuchObjectException, o1: result.o1 = o1 except MetaException, o2: result.o2 = o2 - oprot.writeMessageBegin("get_indexes", TMessageType.REPLY, seqid) + oprot.writeMessageBegin("drop_partition", TMessageType.REPLY, seqid) result.write(oprot) oprot.writeMessageEnd() oprot.trans.flush() - def process_get_index_names(self, seqid, iprot, oprot): - args = get_index_names_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_index_names_result() - try: - result.success = self._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) - except MetaException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_index_names", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + def process_drop_partition_by_name(self, seqid, iprot, oprot): + args = drop_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_by_name_result() + try: + result.success = self._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_partition_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition(self, seqid, iprot, oprot): + args = get_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_result() + try: + result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_with_auth(self, seqid, iprot, oprot): + args = get_partition_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_with_auth_result() + try: + result.success = self._handler.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition_with_auth", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_by_name(self, seqid, iprot, oprot): + args = get_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_by_name_result() + try: + result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions(self, seqid, iprot, oprot): + args = get_partitions_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_result() + try: + result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partitions", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_with_auth(self, seqid, iprot, oprot): + args = get_partitions_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_with_auth_result() + try: + result.success = self._handler.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partitions_with_auth", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names(self, seqid, iprot, oprot): + args = get_partition_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_names_result() + try: + result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition_names", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_ps(self, seqid, iprot, oprot): + args = get_partitions_ps_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_ps_result() + try: + result.success = self._handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_partitions_ps", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_ps_with_auth(self, seqid, iprot, oprot): + args = get_partitions_ps_with_auth_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_ps_with_auth_result() + try: + result.success = self._handler.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partitions_ps_with_auth", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_names_ps(self, seqid, iprot, oprot): + args = get_partition_names_ps_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_names_ps_result() + try: + result.success = self._handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_partition_names_ps", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partitions_by_filter(self, seqid, iprot, oprot): + args = get_partitions_by_filter_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partitions_by_filter_result() + try: + result.success = self._handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partitions_by_filter", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_partition(self, seqid, iprot, oprot): + args = alter_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_partition_result() + try: + self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part) + except InvalidOperationException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("alter_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_config_value(self, seqid, iprot, oprot): + args = get_config_value_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_config_value_result() + try: + result.success = self._handler.get_config_value(args.name, args.defaultValue) + except ConfigValSecurityException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_config_value", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_to_vals(self, seqid, iprot, oprot): + args = partition_name_to_vals_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_to_vals_result() + try: + result.success = self._handler.partition_name_to_vals(args.part_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("partition_name_to_vals", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_partition_name_to_spec(self, seqid, iprot, oprot): + args = partition_name_to_spec_args() + args.read(iprot) + iprot.readMessageEnd() + result = partition_name_to_spec_result() + try: + result.success = self._handler.partition_name_to_spec(args.part_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("partition_name_to_spec", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_index(self, seqid, iprot, oprot): + args = add_index_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_index_result() + try: + result.success = self._handler.add_index(args.new_index, args.index_table) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("add_index", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_index(self, seqid, iprot, oprot): + args = alter_index_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_index_result() + try: + self._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx) + except InvalidOperationException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("alter_index", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_index_by_name(self, seqid, iprot, oprot): + args = drop_index_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_index_by_name_result() + try: + result.success = self._handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_index_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_index_by_name(self, seqid, iprot, oprot): + args = get_index_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_index_by_name_result() + try: + result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_index_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_indexes(self, seqid, iprot, oprot): + args = get_indexes_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_indexes_result() + try: + result.success = self._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_indexes", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_index_names(self, seqid, iprot, oprot): + args = get_index_names_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_index_names_result() + try: + result.success = self._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_index_names", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_user_privilege_set(self, seqid, iprot, oprot): + args = get_user_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_user_privilege_set_result() + try: + result.success = self._handler.get_user_privilege_set(args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_user_privilege_set", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_db_privilege_set(self, seqid, iprot, oprot): + args = get_db_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_db_privilege_set_result() + try: + result.success = self._handler.get_db_privilege_set(args.db_name, args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_db_privilege_set", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table_privilege_set(self, seqid, iprot, oprot): + args = get_table_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_privilege_set_result() + try: + result.success = self._handler.get_table_privilege_set(args.db_name, args.table_name, args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_table_privilege_set", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_privilege_set(self, seqid, iprot, oprot): + args = get_partition_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_privilege_set_result() + try: + result.success = self._handler.get_partition_privilege_set(args.db_name, args.table_name, args.part_name, args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_partition_privilege_set", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_column_privilege_set(self, seqid, iprot, oprot): + args = get_column_privilege_set_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_column_privilege_set_result() + try: + result.success = self._handler.get_column_privilege_set(args.db_name, args.table_name, args.part_name, args.column_name, args.user_name, args.group_names) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_column_privilege_set", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_role(self, seqid, iprot, oprot): + args = create_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_role_result() + try: + result.success = self._handler.create_role(args.role_name, args.owner_name, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("create_role", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_role(self, seqid, iprot, oprot): + args = drop_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_role_result() + try: + result.success = self._handler.drop_role(args.role_name, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("drop_role", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_role_member(self, seqid, iprot, oprot): + args = add_role_member_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_role_member_result() + try: + result.success = self._handler.add_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("add_role_member", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_remove_role_member(self, seqid, iprot, oprot): + args = remove_role_member_args() + args.read(iprot) + iprot.readMessageEnd() + result = remove_role_member_result() + try: + result.success = self._handler.remove_role_member(args.role_name, args.user_name, args.is_role, args.is_group, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("remove_role_member", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_roles(self, seqid, iprot, oprot): + args = list_roles_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_roles_result() + try: + result.success = self._handler.list_roles(args.principal_name, args.is_role, args.is_group, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_roles", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_security_user_grant(self, seqid, iprot, oprot): + args = list_security_user_grant_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_security_user_grant_result() + try: + result.success = self._handler.list_security_user_grant(args.principla_name, args.is_role, args.is_group) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_security_user_grant", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_security_db_grant(self, seqid, iprot, oprot): + args = list_security_db_grant_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_security_db_grant_result() + try: + result.success = self._handler.list_security_db_grant(args.principal_name, args.is_group, args.is_role, args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_security_db_grant", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_security_table_grant(self, seqid, iprot, oprot): + args = list_security_table_grant_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_security_table_grant_result() + try: + result.success = self._handler.list_security_table_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_security_table_grant", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_security_partition_grant(self, seqid, iprot, oprot): + args = list_security_partition_grant_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_security_partition_grant_result() + try: + result.success = self._handler.list_security_partition_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_security_partition_grant", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_list_security_column_grant(self, seqid, iprot, oprot): + args = list_security_column_grant_args() + args.read(iprot) + iprot.readMessageEnd() + result = list_security_column_grant_result() + try: + result.success = self._handler.list_security_column_grant(args.principal_name, args.is_group, args.is_role, args.db_name, args.table_name, args.part_name, args.column_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("list_security_column_grant", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_grant_privileges(self, seqid, iprot, oprot): + args = grant_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = grant_privileges_result() + try: + result.success = self._handler.grant_privileges(args.user_name, args.is_role, args.is_group, args.privileges, args.grantor) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("grant_privileges", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_revoke_privileges(self, seqid, iprot, oprot): + args = revoke_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = revoke_privileges_result() + try: + result.success = self._handler.revoke_privileges(args.user_name, args.is_role, args.is_group, args.privileges) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("revoke_privileges", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_revoke_all_privileges(self, seqid, iprot, oprot): + args = revoke_all_privileges_args() + args.read(iprot) + iprot.readMessageEnd() + result = revoke_all_privileges_result() + try: + result.success = self._handler.revoke_all_privileges(args.user_name, args.is_role, args.is_group, args.remove_user_priv, args.dbs, args.tables, args.parts, args.columns) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("revoke_all_privileges", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + +# HELPER FUNCTIONS AND STRUCTURES + +class create_database_args: + """ + Attributes: + - database + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 1 + ) + + def __init__(self, database=None,): + self.database = database + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.database = Database() + self.database.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_database_args') + if self.database != None: + oprot.writeFieldBegin('database', TType.STRUCT, 1) + self.database.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_database_result: + """ + Attributes: + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, o1=None, o2=None, o3=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_database_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_database_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_database_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_database_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Database, Database.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Database() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_database_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_database_args: + """ + Attributes: + - name + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.BOOL, 'deleteData', None, None, ), # 2 + ) + + def __init__(self, name=None, deleteData=None,): + self.name = name + self.deleteData = deleteData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_database_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 2) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_database_result: + """ + Attributes: + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, o1=None, o2=None, o3=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidOperationException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_database_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_databases_args: + """ + Attributes: + - pattern + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'pattern', None, None, ), # 1 + ) + + def __init__(self, pattern=None,): + self.pattern = pattern + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.pattern = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_databases_args') + if self.pattern != None: + oprot.writeFieldBegin('pattern', TType.STRING, 1) + oprot.writeString(self.pattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_databases_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype176, _size173) = iprot.readListBegin() + for _i177 in xrange(_size173): + _elem178 = iprot.readString(); + self.success.append(_elem178) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_databases_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter179 in self.success: + oprot.writeString(iter179) + 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 __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_databases_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_databases_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_databases_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype183, _size180) = iprot.readListBegin() + for _i184 in xrange(_size180): + _elem185 = iprot.readString(); + self.success.append(_elem185) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_databases_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter186 in self.success: + oprot.writeString(iter186) + 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 __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Type() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_type_args: + """ + Attributes: + - type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'type', (Type, Type.thrift_spec), None, ), # 1 + ) + + def __init__(self, type=None,): + self.type = type + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.type = Type() + self.type.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_type_args') + if self.type != None: + oprot.writeFieldBegin('type', TType.STRUCT, 1) + self.type.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_type_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_type_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_type_args: + """ + Attributes: + - type + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'type', None, None, ), # 1 + ) + + def __init__(self, type=None,): + self.type = type + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.type = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_type_args') + if self.type != None: + oprot.writeFieldBegin('type', TType.STRING, 1) + oprot.writeString(self.type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_type_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_type_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_all_args: + """ + Attributes: + - name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + ) + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_all_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_type_all_result: + """ + Attributes: + - success + - o2 + """ + + thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o2=None,): + self.success = success + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.MAP: + self.success = {} + (_ktype188, _vtype189, _size187 ) = iprot.readMapBegin() + for _i191 in xrange(_size187): + _key192 = iprot.readString(); + _val193 = Type() + _val193.read(iprot) + self.success[_key192] = _val193 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_type_all_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) + for kiter194,viter195 in self.success.items(): + oprot.writeString(kiter194) + viter195.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 1) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_fields_args: + """ + Attributes: + - db_name + - table_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + ) + + def __init__(self, db_name=None, table_name=None,): + self.db_name = db_name + self.table_name = table_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_fields_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_fields_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype199, _size196) = iprot.readListBegin() + for _i200 in xrange(_size196): + _elem201 = FieldSchema() + _elem201.read(iprot) + self.success.append(_elem201) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_fields_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter202 in self.success: + iter202.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_schema_args: + """ + Attributes: + - db_name + - table_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'table_name', None, None, ), # 2 + ) + + def __init__(self, db_name=None, table_name=None,): + self.db_name = db_name + self.table_name = table_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_schema_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_schema_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype206, _size203) = iprot.readListBegin() + for _i207 in xrange(_size203): + _elem208 = FieldSchema() + _elem208.read(iprot) + self.success.append(_elem208) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = UnknownTableException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = UnknownDBException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_schema_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter209 in self.success: + iter209.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_args: + """ + Attributes: + - tbl + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 + ) + + def __init__(self, tbl=None,): + self.tbl = tbl + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.tbl = Table() + self.tbl.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_args') + if self.tbl != None: + oprot.writeFieldBegin('tbl', TType.STRUCT, 1) + self.tbl.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class create_table_result: + """ + Attributes: + - o1 + - o2 + - o3 + - o4 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 + ) + + def __init__(self, o1=None, o2=None, o3=None, o4=None,): + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + self.o4 = o4 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = AlreadyExistsException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = InvalidObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.o4 = NoSuchObjectException() + self.o4.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('create_table_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + if self.o4 != None: + oprot.writeFieldBegin('o4', TType.STRUCT, 4) + self.o4.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_table_args: + """ + Attributes: + - dbname + - name + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'name', None, None, ), # 2 + (3, TType.BOOL, 'deleteData', None, None, ), # 3 + ) + + def __init__(self, dbname=None, name=None, deleteData=None,): + self.dbname = dbname + self.name = name + self.deleteData = deleteData + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_table_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 3) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class drop_table_result: + """ + Attributes: + - o1 + - o3 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o3=None,): + self.o1 = o1 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = NoSuchObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_table_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 2) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_tables_args: + """ + Attributes: + - db_name + - pattern + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'pattern', None, None, ), # 2 + ) + + def __init__(self, db_name=None, pattern=None,): + self.db_name = db_name + self.pattern = pattern + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.pattern = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_tables_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.pattern != None: + oprot.writeFieldBegin('pattern', TType.STRING, 2) + oprot.writeString(self.pattern) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_tables_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype213, _size210) = iprot.readListBegin() + for _i214 in xrange(_size210): + _elem215 = iprot.readString(); + self.success.append(_elem215) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_tables_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter216 in self.success: + oprot.writeString(iter216) + 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 __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_tables_args: + """ + Attributes: + - db_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + ) + + def __init__(self, db_name=None,): + self.db_name = db_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_tables_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_all_tables_result: + """ + Attributes: + - success + - o1 + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, o1=None,): + self.success = success + self.o1 = o1 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype220, _size217) = iprot.readListBegin() + for _i221 in xrange(_size217): + _elem222 = iprot.readString(); + self.success.append(_elem222) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_all_tables_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter223 in self.success: + oprot.writeString(iter223) + 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 __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_args: + """ + Attributes: + - dbname + - tbl_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + ) + + def __init__(self, dbname=None, tbl_name=None,): + self.dbname = dbname + self.tbl_name = tbl_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_table_result: + """ + Attributes: + - success + - o1 + - o2 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Table() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = MetaException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = NoSuchObjectException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_table_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_table_args: + """ + Attributes: + - dbname + - tbl_name + - new_tbl + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 + ) + + def __init__(self, dbname=None, tbl_name=None, new_tbl=None,): + self.dbname = dbname + self.tbl_name = tbl_name + self.new_tbl = new_tbl + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.dbname = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.new_tbl = Table() + self.new_tbl.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_table_args') + if self.dbname != None: + oprot.writeFieldBegin('dbname', TType.STRING, 1) + oprot.writeString(self.dbname) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_tbl != None: + oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) + self.new_tbl.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class alter_table_result: + """ + Attributes: + - o1 + - o2 + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + ) + + def __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidOperationException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('alter_table_result') + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partition_args: + """ + Attributes: + - new_part + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1 + ) + + def __init__(self, new_part=None,): + self.new_part = new_part + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partition_args') + if self.new_part != None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 1) + self.new_part.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class add_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('add_partition_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype227, _size224) = iprot.readListBegin() + for _i228 in xrange(_size224): + _elem229 = iprot.readString(); + self.part_vals.append(_elem229) + 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('append_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter230 in self.part_vals: + oprot.writeString(iter230) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + ) + + def __init__(self, db_name=None, tbl_name=None, part_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class append_partition_by_name_result: + """ + Attributes: + - success + - o1 + - o2 + - o3 + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + ) + + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + self.o3 = o3 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() + self.o1.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = AlreadyExistsException() + self.o2.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('append_partition_by_name_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __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_partition_args: + """ + Attributes: + - db_name + - tbl_name + - part_vals + - deleteData + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 + ) + + def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.deleteData = deleteData + + def 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 = [] + (_etype234, _size231) = iprot.readListBegin() + for _i235 in xrange(_size231): + _elem236 = iprot.readString(); + self.part_vals.append(_elem236) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('drop_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter237 in self.part_vals: + oprot.writeString(iter237) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __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_partition_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 + ) + + def __init__(self, success=None, o1=None, o2=None,): + self.success = success + self.o1 = o1 + self.o2 = o2 + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = 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('drop_partition_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) + oprot.writeFieldEnd() + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __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__ -# HELPER FUNCTIONS AND STRUCTURES + def __ne__(self, other): + return not (self == other) -class create_database_args: +class drop_partition_by_name_args: """ Attributes: - - database + - db_name + - tbl_name + - part_name + - deleteData """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 ) - def __init__(self, database=None,): - self.database = database + def __init__(self, db_name=None, tbl_name=None, part_name=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name + self.deleteData = deleteData def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -2466,9 +6998,23 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.database = Database() - self.database.read(iprot) + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); else: iprot.skip(ftype) else: @@ -2480,10 +7026,22 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('create_database_args') - if self.database != None: - oprot.writeFieldBegin('database', TType.STRUCT, 1) - self.database.write(oprot) + oprot.writeStructBegin('drop_partition_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2499,25 +7057,24 @@ def __ne__(self, other): return not (self == other) -class create_database_result: +class drop_partition_by_name_result: """ Attributes: + - success - o1 - o2 - - o3 """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): + self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -2528,24 +7085,23 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() + self.o2 = MetaException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -2555,7 +7111,11 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('create_database_result') + oprot.writeStructBegin('drop_partition_by_name_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) @@ -2564,10 +7124,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2582,19 +7138,25 @@ def __ne__(self, other): return not (self == other) -class get_database_args: +class get_partition_args: """ Attributes: - - name + - db_name + - tbl_name + - part_vals """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 ) - def __init__(self, name=None,): - self.name = name + def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -2607,7 +7169,22 @@ break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString(); + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype241, _size238) = iprot.readListBegin() + for _i242 in xrange(_size238): + _elem243 = iprot.readString(); + self.part_vals.append(_elem243) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -2619,10 +7196,21 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_database_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + oprot.writeStructBegin('get_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter244 in self.part_vals: + oprot.writeString(iter244) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2638,7 +7226,7 @@ def __ne__(self, other): return not (self == other) -class get_database_result: +class get_partition_result: """ Attributes: - success @@ -2647,9 +7235,9 @@ """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Database, Database.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) def __init__(self, success=None, o1=None, o2=None,): @@ -2668,19 +7256,19 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Database() + self.success = Partition() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = MetaException() + self.o2 = NoSuchObjectException() self.o2.read(iprot) else: iprot.skip(ftype) @@ -2693,7 +7281,7 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_database_result') + oprot.writeStructBegin('get_partition_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -2720,22 +7308,31 @@ def __ne__(self, other): return not (self == other) -class drop_database_args: +class get_partition_with_auth_args: """ Attributes: - - name - - deleteData + - db_name + - tbl_name + - part_vals + - user_name + - group_names """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.BOOL, 'deleteData', None, None, ), # 2 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.STRING, 'user_name', None, None, ), # 4 + (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5 ) - def __init__(self, name=None, deleteData=None,): - self.name = name - self.deleteData = deleteData + def __init__(self, db_name=None, tbl_name=None, part_vals=None, user_name=None, group_names=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.user_name = user_name + self.group_names = group_names def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -2748,12 +7345,37 @@ break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString(); + self.db_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype248, _size245) = iprot.readListBegin() + for _i249 in xrange(_size245): + _elem250 = iprot.readString(); + self.part_vals.append(_elem250) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.user_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype254, _size251) = iprot.readListBegin() + for _i255 in xrange(_size251): + _elem256 = iprot.readString(); + self.group_names.append(_elem256) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -2765,14 +7387,32 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_database_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + oprot.writeStructBegin('get_partition_with_auth_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 2) - oprot.writeBool(self.deleteData) + 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 iter257 in self.part_vals: + oprot.writeString(iter257) + 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 iter258 in self.group_names: + oprot.writeString(iter258) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2788,25 +7428,24 @@ def __ne__(self, other): return not (self == other) -class drop_database_result: +class get_partition_with_auth_result: """ Attributes: + - success - o1 - o2 - - o3 """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): + self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -2817,22 +7456,22 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: + if fid == 0: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) + self.success = Partition() + self.success.read(iprot) else: iprot.skip(ftype) - elif fid == 2: + elif fid == 1: if ftype == TType.STRUCT: - self.o2 = InvalidOperationException() - self.o2.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 3: + elif fid == 2: if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) + self.o2 = NoSuchObjectException() + self.o2.read(iprot) else: iprot.skip(ftype) else: @@ -2844,7 +7483,11 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_database_result') + oprot.writeStructBegin('get_partition_with_auth_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) @@ -2853,10 +7496,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2871,19 +7510,25 @@ def __ne__(self, other): return not (self == other) -class get_databases_args: +class get_partition_by_name_args: """ Attributes: - - pattern + - db_name + - tbl_name + - part_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'pattern', None, None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 ) - def __init__(self, pattern=None,): - self.pattern = pattern + def __init__(self, db_name=None, tbl_name=None, part_name=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_name = part_name def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -2896,7 +7541,17 @@ break if fid == 1: if ftype == TType.STRING: - self.pattern = iprot.readString(); + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -2908,10 +7563,18 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_databases_args') - if self.pattern != None: - oprot.writeFieldBegin('pattern', TType.STRING, 1) - oprot.writeString(self.pattern) + oprot.writeStructBegin('get_partition_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2927,21 +7590,24 @@ def __ne__(self, other): return not (self == other) -class get_databases_result: +class get_partition_by_name_result: """ Attributes: - success - o1 + - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 + self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -2953,13 +7619,9 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype106, _size103) = iprot.readListBegin() - for _i107 in xrange(_size103): - _elem108 = iprot.readString(); - self.success.append(_elem108) - iprot.readListEnd() + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: @@ -2968,6 +7630,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() @@ -2977,18 +7645,19 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_databases_result') + oprot.writeStructBegin('get_partition_by_name_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter109 in self.success: - oprot.writeString(iter109) - 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() @@ -3003,11 +7672,26 @@ def __ne__(self, other): return not (self == other) -class get_all_databases_args: +class get_partitions_args: + """ + Attributes: + - db_name + - tbl_name + - max_parts + """ thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_parts', None, -1, ), # 3 ) + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) @@ -3017,6 +7701,21 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break + if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3026,7 +7725,19 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_all_databases_args') + oprot.writeStructBegin('get_partitions_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3041,21 +7752,24 @@ def __ne__(self, other): return not (self == other) -class get_all_databases_result: +class get_partitions_result: """ Attributes: - success - o1 + - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 + self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3069,19 +7783,26 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype113, _size110) = iprot.readListBegin() - for _i114 in xrange(_size110): - _elem115 = iprot.readString(); - self.success.append(_elem115) + (_etype262, _size259) = iprot.readListBegin() + for _i263 in xrange(_size259): + _elem264 = Partition() + _elem264.read(iprot) + self.success.append(_elem264) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = MetaException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3091,18 +7812,22 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_all_databases_result') + oprot.writeStructBegin('get_partitions_result') if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter116 in self.success: - oprot.writeString(iter116) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter265 in self.success: + iter265.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() @@ -3117,19 +7842,31 @@ def __ne__(self, other): return not (self == other) -class get_type_args: +class get_partitions_with_auth_args: """ Attributes: - - name + - db_name + - tbl_name + - max_parts + - user_name + - group_names """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_parts', None, -1, ), # 3 + (4, TType.STRING, 'user_name', None, None, ), # 4 + (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5 ) - def __init__(self, name=None,): - self.name = name + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4], user_name=None, group_names=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts + self.user_name = user_name + self.group_names = group_names def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3142,7 +7879,32 @@ break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString(); + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.user_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype269, _size266) = iprot.readListBegin() + for _i270 in xrange(_size266): + _elem271 = iprot.readString(); + self.group_names.append(_elem271) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -3154,10 +7916,29 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_type_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + oprot.writeStructBegin('get_partitions_with_auth_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 3) + oprot.writeI16(self.max_parts) + oprot.writeFieldEnd() + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 4) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter272 in self.group_names: + oprot.writeString(iter272) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3173,7 +7954,7 @@ def __ne__(self, other): return not (self == other) -class get_type_result: +class get_partitions_with_auth_result: """ Attributes: - success @@ -3182,9 +7963,9 @@ """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) def __init__(self, success=None, o1=None, o2=None,): @@ -3200,22 +7981,27 @@ while True: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = Type() - self.success.read(iprot) + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype276, _size273) = iprot.readListBegin() + for _i277 in xrange(_size273): + _elem278 = Partition() + _elem278.read(iprot) + self.success.append(_elem278) + 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) @@ -3228,10 +8014,13 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_type_result') + oprot.writeStructBegin('get_partitions_with_auth_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter279 in self.success: + iter279.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -3255,19 +8044,25 @@ def __ne__(self, other): return not (self == other) -class create_type_args: +class get_partition_names_args: """ Attributes: - - type + - db_name + - tbl_name + - max_parts """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'type', (Type, Type.thrift_spec), None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.I16, 'max_parts', None, -1, ), # 3 ) - def __init__(self, type=None,): - self.type = type + def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.max_parts = max_parts def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3279,9 +8074,18 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.type = Type() - self.type.read(iprot) + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3293,10 +8097,18 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('create_type_args') - if self.type != None: - oprot.writeFieldBegin('type', TType.STRUCT, 1) - self.type.write(oprot) + oprot.writeStructBegin('get_partition_names_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 3) + oprot.writeI16(self.max_parts) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3312,27 +8124,21 @@ def __ne__(self, other): return not (self == other) -class create_type_result: +class get_partition_names_result: """ Attributes: - success - - o1 - o2 - - o3 """ thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o2=None,): self.success = success - self.o1 = o1 self.o2 = o2 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3344,28 +8150,21 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.LIST: + self.success = [] + (_etype283, _size280) = iprot.readListBegin() + for _i284 in xrange(_size280): + _elem285 = iprot.readString(); + self.success.append(_elem285) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() - self.o1.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() + self.o2 = MetaException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3375,23 +8174,18 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('create_type_result') + oprot.writeStructBegin('get_partition_names_result') if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter286 in self.success: + oprot.writeString(iter286) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) + oprot.writeFieldBegin('o2', TType.STRUCT, 1) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3406,19 +8200,28 @@ def __ne__(self, other): return not (self == other) -class drop_type_args: +class get_partitions_ps_args: """ Attributes: - - type + - db_name + - tbl_name + - part_vals + - max_parts """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'type', None, None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 ) - def __init__(self, type=None,): - self.type = type + def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3431,7 +8234,27 @@ break if fid == 1: if ftype == TType.STRING: - self.type = iprot.readString(); + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype290, _size287) = iprot.readListBegin() + for _i291 in xrange(_size287): + _elem292 = iprot.readString(); + self.part_vals.append(_elem292) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3443,10 +8266,25 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_type_args') - if self.type != None: - oprot.writeFieldBegin('type', TType.STRING, 1) - oprot.writeString(self.type) + oprot.writeStructBegin('get_partitions_ps_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter293 in self.part_vals: + oprot.writeString(iter293) + 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() @@ -3462,24 +8300,21 @@ def __ne__(self, other): return not (self == other) -class drop_type_result: +class get_partitions_ps_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3491,8 +8326,14 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.LIST: + self.success = [] + (_etype297, _size294) = iprot.readListBegin() + for _i298 in xrange(_size294): + _elem299 = Partition() + _elem299.read(iprot) + self.success.append(_elem299) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -3501,12 +8342,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() @@ -3516,19 +8351,18 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_type_result') + oprot.writeStructBegin('get_partitions_ps_result') if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter300 in self.success: + iter300.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() @@ -3543,19 +8377,34 @@ def __ne__(self, other): return not (self == other) -class get_type_all_args: +class get_partitions_ps_with_auth_args: """ Attributes: - - name + - db_name + - tbl_name + - part_vals + - max_parts + - user_name + - group_names """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 + (5, TType.STRING, 'user_name', None, None, ), # 5 + (6, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 6 ) - def __init__(self, name=None,): - self.name = name + def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4], user_name=None, group_names=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts + self.user_name = user_name + self.group_names = group_names def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3568,7 +8417,42 @@ break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString(); + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype304, _size301) = iprot.readListBegin() + for _i305 in xrange(_size301): + _elem306 = iprot.readString(); + self.part_vals.append(_elem306) + 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 = [] + (_etype310, _size307) = iprot.readListBegin() + for _i311 in xrange(_size307): + _elem312 = iprot.readString(); + self.group_names.append(_elem312) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -3580,10 +8464,36 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_type_all_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + oprot.writeStructBegin('get_partitions_ps_with_auth_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter313 in self.part_vals: + oprot.writeString(iter313) + 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 iter314 in self.group_names: + oprot.writeString(iter314) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3599,20 +8509,23 @@ def __ne__(self, other): return not (self == other) -class get_type_all_result: +class get_partitions_ps_with_auth_result: """ Attributes: - success + - o1 - o2 """ thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o2=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success + self.o1 = o1 self.o2 = o2 def read(self, iprot): @@ -3625,19 +8538,24 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.MAP: - self.success = {} - (_ktype118, _vtype119, _size117 ) = iprot.readMapBegin() - for _i121 in xrange(_size117): - _key122 = iprot.readString(); - _val123 = Type() - _val123.read(iprot) - self.success[_key122] = _val123 - iprot.readMapEnd() + if ftype == TType.LIST: + self.success = [] + (_etype318, _size315) = iprot.readListBegin() + for _i319 in xrange(_size315): + _elem320 = Partition() + _elem320.read(iprot) + self.success.append(_elem320) + 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: @@ -3651,17 +8569,20 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_type_all_result') + oprot.writeStructBegin('get_partitions_ps_with_auth_result') if self.success != None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) - for kiter124,viter125 in self.success.items(): - oprot.writeString(kiter124) - viter125.write(oprot) - oprot.writeMapEnd() + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter321 in self.success: + iter321.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() @@ -3678,22 +8599,28 @@ def __ne__(self, other): return not (self == other) -class get_fields_args: +class get_partition_names_ps_args: """ Attributes: - db_name - - table_name + - tbl_name + - part_vals + - max_parts """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 ) - def __init__(self, db_name=None, table_name=None,): + def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): self.db_name = db_name - self.table_name = table_name + self.tbl_name = tbl_name + self.part_vals = part_vals + self.max_parts = max_parts def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3711,7 +8638,22 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.table_name = iprot.readString(); + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.part_vals = [] + (_etype325, _size322) = iprot.readListBegin() + for _i326 in xrange(_size322): + _elem327 = iprot.readString(); + self.part_vals.append(_elem327) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3723,14 +8665,25 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_fields_args') + oprot.writeStructBegin('get_partition_names_ps_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.table_name != None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.part_vals != None: + oprot.writeFieldBegin('part_vals', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.part_vals)) + for iter328 in self.part_vals: + oprot.writeString(iter328) + 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() @@ -3746,27 +8699,21 @@ def __ne__(self, other): return not (self == other) -class get_fields_result: +class get_partition_names_ps_result: """ Attributes: - success - o1 - - o2 - - o3 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3780,11 +8727,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype129, _size126) = iprot.readListBegin() - for _i130 in xrange(_size126): - _elem131 = FieldSchema() - _elem131.read(iprot) - self.success.append(_elem131) + (_etype332, _size329) = iprot.readListBegin() + for _i333 in xrange(_size329): + _elem334 = iprot.readString(); + self.success.append(_elem334) iprot.readListEnd() else: iprot.skip(ftype) @@ -3794,18 +8740,6 @@ self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = UnknownTableException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3815,26 +8749,18 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_fields_result') + oprot.writeStructBegin('get_partition_names_ps_result') if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter132 in self.success: - iter132.write(oprot) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter335 in self.success: + oprot.writeString(iter335) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3849,22 +8775,28 @@ def __ne__(self, other): return not (self == other) -class get_schema_args: +class get_partitions_by_filter_args: """ Attributes: - db_name - - table_name + - tbl_name + - filter + - max_parts """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'table_name', None, None, ), # 2 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'filter', None, None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 ) - def __init__(self, db_name=None, table_name=None,): + def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): self.db_name = db_name - self.table_name = table_name + self.tbl_name = tbl_name + self.filter = filter + self.max_parts = max_parts def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3882,7 +8814,17 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.table_name = iprot.readString(); + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.filter = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3894,14 +8836,22 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_schema_args') + oprot.writeStructBegin('get_partitions_by_filter_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.table_name != None: - oprot.writeFieldBegin('table_name', TType.STRING, 2) - oprot.writeString(self.table_name) + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.filter != None: + oprot.writeFieldBegin('filter', TType.STRING, 3) + oprot.writeString(self.filter) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3917,27 +8867,24 @@ def __ne__(self, other): return not (self == other) -class get_schema_result: +class get_partitions_by_filter_result: """ Attributes: - success - o1 - o2 - - o3 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3951,11 +8898,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype136, _size133) = iprot.readListBegin() - for _i137 in xrange(_size133): - _elem138 = FieldSchema() - _elem138.read(iprot) - self.success.append(_elem138) + (_etype339, _size336) = iprot.readListBegin() + for _i340 in xrange(_size336): + _elem341 = Partition() + _elem341.read(iprot) + self.success.append(_elem341) iprot.readListEnd() else: iprot.skip(ftype) @@ -3967,16 +8914,10 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = UnknownTableException() + self.o2 = NoSuchObjectException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = UnknownDBException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3986,12 +8927,12 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_schema_result') + oprot.writeStructBegin('get_partitions_by_filter_result') if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter139 in self.success: - iter139.write(oprot) + for iter342 in self.success: + iter342.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -4002,10 +8943,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4020,19 +8957,25 @@ def __ne__(self, other): return not (self == other) -class create_table_args: +class alter_partition_args: """ Attributes: - - tbl + - db_name + - tbl_name + - new_part """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3 ) - def __init__(self, tbl=None,): - self.tbl = tbl + def __init__(self, db_name=None, tbl_name=None, new_part=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.new_part = new_part def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4044,9 +8987,19 @@ if ftype == TType.STOP: break if fid == 1: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: if ftype == TType.STRUCT: - self.tbl = Table() - self.tbl.read(iprot) + self.new_part = Partition() + self.new_part.read(iprot) else: iprot.skip(ftype) else: @@ -4058,10 +9011,18 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('create_table_args') - if self.tbl != None: - oprot.writeFieldBegin('tbl', TType.STRUCT, 1) - self.tbl.write(oprot) + oprot.writeStructBegin('alter_partition_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.new_part != None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 3) + self.new_part.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4077,28 +9038,22 @@ def __ne__(self, other): return not (self == other) -class create_table_result: +class alter_partition_result: """ Attributes: - o1 - o2 - - o3 - - o4 """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 - (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4 + (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, o1=None, o2=None, o3=None, o4=None,): + def __init__(self, o1=None, o2=None,): self.o1 = o1 self.o2 = o2 - self.o3 = o3 - self.o4 = o4 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4111,28 +9066,16 @@ break if fid == 1: if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() + self.o1 = InvalidOperationException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() + self.o2 = MetaException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = NoSuchObjectException() - self.o4.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -4142,7 +9085,7 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('create_table_result') + oprot.writeStructBegin('alter_partition_result') if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) @@ -4151,14 +9094,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() - if self.o4 != None: - oprot.writeFieldBegin('o4', TType.STRUCT, 4) - self.o4.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4173,25 +9108,22 @@ def __ne__(self, other): return not (self == other) -class drop_table_args: +class get_config_value_args: """ Attributes: - - dbname - name - - deleteData + - defaultValue """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'name', None, None, ), # 2 - (3, TType.BOOL, 'deleteData', None, None, ), # 3 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'defaultValue', None, None, ), # 2 ) - def __init__(self, dbname=None, name=None, deleteData=None,): - self.dbname = dbname + def __init__(self, name=None, defaultValue=None,): self.name = name - self.deleteData = deleteData + self.defaultValue = defaultValue def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4204,17 +9136,12 @@ break if fid == 1: if ftype == TType.STRING: - self.dbname = iprot.readString(); + self.name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); + self.defaultValue = iprot.readString(); else: iprot.skip(ftype) else: @@ -4226,18 +9153,14 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_table_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) - oprot.writeFieldEnd() + oprot.writeStructBegin('get_config_value_args') if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 2) + oprot.writeFieldBegin('name', TType.STRING, 1) oprot.writeString(self.name) oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 3) - oprot.writeBool(self.deleteData) + if self.defaultValue != None: + oprot.writeFieldBegin('defaultValue', TType.STRING, 2) + oprot.writeString(self.defaultValue) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4253,22 +9176,21 @@ def __ne__(self, other): return not (self == other) -class drop_table_result: +class get_config_value_result: """ Attributes: + - success - o1 - - o3 """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.STRING, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1 ) - def __init__(self, o1=None, o3=None,): + def __init__(self, success=None, o1=None,): + self.success = success self.o1 = o1 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4279,16 +9201,15 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() - self.o1.read(iprot) + if fid == 0: + if ftype == TType.STRING: + self.success = iprot.readString(); else: iprot.skip(ftype) - elif fid == 2: + elif fid == 1: if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) + self.o1 = ConfigValSecurityException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -4300,15 +9221,15 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_table_result') + oprot.writeStructBegin('get_config_value_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success) + oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 2) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4323,22 +9244,19 @@ def __ne__(self, other): return not (self == other) -class get_tables_args: +class partition_name_to_vals_args: """ Attributes: - - db_name - - pattern + - part_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'pattern', None, None, ), # 2 + (1, TType.STRING, 'part_name', None, None, ), # 1 ) - def __init__(self, db_name=None, pattern=None,): - self.db_name = db_name - self.pattern = pattern + def __init__(self, part_name=None,): + self.part_name = part_name def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4351,12 +9269,7 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.pattern = iprot.readString(); + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -4368,14 +9281,10 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_tables_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.pattern != None: - oprot.writeFieldBegin('pattern', TType.STRING, 2) - oprot.writeString(self.pattern) + oprot.writeStructBegin('partition_name_to_vals_args') + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 1) + oprot.writeString(self.part_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4391,7 +9300,7 @@ def __ne__(self, other): return not (self == other) -class get_tables_result: +class partition_name_to_vals_result: """ Attributes: - success @@ -4419,10 +9328,10 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype143, _size140) = iprot.readListBegin() - for _i144 in xrange(_size140): - _elem145 = iprot.readString(); - self.success.append(_elem145) + (_etype346, _size343) = iprot.readListBegin() + for _i347 in xrange(_size343): + _elem348 = iprot.readString(); + self.success.append(_elem348) iprot.readListEnd() else: iprot.skip(ftype) @@ -4441,12 +9350,12 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_tables_result') + oprot.writeStructBegin('partition_name_to_vals_result') if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) oprot.writeListBegin(TType.STRING, len(self.success)) - for iter146 in self.success: - oprot.writeString(iter146) + for iter349 in self.success: + oprot.writeString(iter349) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -4467,19 +9376,19 @@ def __ne__(self, other): return not (self == other) -class get_all_tables_args: +class partition_name_to_spec_args: """ Attributes: - - db_name + - part_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 + (1, TType.STRING, 'part_name', None, None, ), # 1 ) - def __init__(self, db_name=None,): - self.db_name = db_name + def __init__(self, part_name=None,): + self.part_name = part_name def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4492,7 +9401,7 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -4504,10 +9413,10 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_all_tables_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('partition_name_to_spec_args') + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 1) + oprot.writeString(self.part_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4523,7 +9432,7 @@ def __ne__(self, other): return not (self == other) -class get_all_tables_result: +class partition_name_to_spec_result: """ Attributes: - success @@ -4531,7 +9440,7 @@ """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -4549,13 +9458,14 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype150, _size147) = iprot.readListBegin() - for _i151 in xrange(_size147): - _elem152 = iprot.readString(); - self.success.append(_elem152) - iprot.readListEnd() + if ftype == TType.MAP: + self.success = {} + (_ktype351, _vtype352, _size350 ) = iprot.readMapBegin() + for _i354 in xrange(_size350): + _key355 = iprot.readString(); + _val356 = iprot.readString(); + self.success[_key355] = _val356 + iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: @@ -4573,13 +9483,14 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_all_tables_result') + oprot.writeStructBegin('partition_name_to_spec_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter153 in self.success: - oprot.writeString(iter153) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) + for kiter357,viter358 in self.success.items(): + oprot.writeString(kiter357) + oprot.writeString(viter358) + oprot.writeMapEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -4599,22 +9510,22 @@ def __ne__(self, other): return not (self == other) -class get_table_args: +class add_index_args: """ Attributes: - - dbname - - tbl_name + - new_index + - index_table """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (1, TType.STRUCT, 'new_index', (Index, Index.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'index_table', (Table, Table.thrift_spec), None, ), # 2 ) - def __init__(self, dbname=None, tbl_name=None,): - self.dbname = dbname - self.tbl_name = tbl_name + def __init__(self, new_index=None, index_table=None,): + self.new_index = new_index + self.index_table = index_table def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4626,13 +9537,15 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRING: - self.dbname = iprot.readString(); + if ftype == TType.STRUCT: + self.new_index = Index() + self.new_index.read(iprot) else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + if ftype == TType.STRUCT: + self.index_table = Table() + self.index_table.read(iprot) else: iprot.skip(ftype) else: @@ -4644,14 +9557,14 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_table_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) + oprot.writeStructBegin('add_index_args') + if self.new_index != None: + oprot.writeFieldBegin('new_index', TType.STRUCT, 1) + self.new_index.write(oprot) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.index_table != None: + oprot.writeFieldBegin('index_table', TType.STRUCT, 2) + self.index_table.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4667,24 +9580,27 @@ def __ne__(self, other): return not (self == other) -class get_table_result: +class add_index_result: """ Attributes: - success - o1 - o2 + - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 + (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None, o2=None, o3=None,): self.success = success self.o1 = o1 self.o2 = o2 + self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4697,22 +9613,28 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Table() + self.success = Index() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = MetaException() + self.o1 = InvalidObjectException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() + self.o2 = AlreadyExistsException() self.o2.read(iprot) else: iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.o3 = MetaException() + self.o3.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -4722,7 +9644,7 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_table_result') + oprot.writeStructBegin('add_index_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -4735,6 +9657,10 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() + if self.o3 != None: + oprot.writeFieldBegin('o3', TType.STRUCT, 3) + self.o3.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4749,25 +9675,28 @@ def __ne__(self, other): return not (self == other) -class alter_table_args: +class alter_index_args: """ Attributes: - dbname - - tbl_name - - new_tbl + - base_tbl_name + - idx_name + - new_idx """ thrift_spec = ( None, # 0 (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3 + (2, TType.STRING, 'base_tbl_name', None, None, ), # 2 + (3, TType.STRING, 'idx_name', None, None, ), # 3 + (4, TType.STRUCT, 'new_idx', (Index, Index.thrift_spec), None, ), # 4 ) - def __init__(self, dbname=None, tbl_name=None, new_tbl=None,): + def __init__(self, dbname=None, base_tbl_name=None, idx_name=None, new_idx=None,): self.dbname = dbname - self.tbl_name = tbl_name - self.new_tbl = new_tbl + self.base_tbl_name = base_tbl_name + self.idx_name = idx_name + self.new_idx = new_idx def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4785,13 +9714,18 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.base_tbl_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: + if ftype == TType.STRING: + self.idx_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: if ftype == TType.STRUCT: - self.new_tbl = Table() - self.new_tbl.read(iprot) + self.new_idx = Index() + self.new_idx.read(iprot) else: iprot.skip(ftype) else: @@ -4803,18 +9737,22 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('alter_table_args') + oprot.writeStructBegin('alter_index_args') if self.dbname != None: oprot.writeFieldBegin('dbname', TType.STRING, 1) oprot.writeString(self.dbname) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.base_tbl_name != None: + oprot.writeFieldBegin('base_tbl_name', TType.STRING, 2) + oprot.writeString(self.base_tbl_name) oprot.writeFieldEnd() - if self.new_tbl != None: - oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) - self.new_tbl.write(oprot) + if self.idx_name != None: + oprot.writeFieldBegin('idx_name', TType.STRING, 3) + oprot.writeString(self.idx_name) + oprot.writeFieldEnd() + if self.new_idx != None: + oprot.writeFieldBegin('new_idx', TType.STRUCT, 4) + self.new_idx.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4830,7 +9768,7 @@ def __ne__(self, other): return not (self == other) -class alter_table_result: +class alter_index_result: """ Attributes: - o1 @@ -4877,7 +9815,7 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('alter_table_result') + oprot.writeStructBegin('alter_index_result') if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) @@ -4900,19 +9838,28 @@ def __ne__(self, other): return not (self == other) -class add_partition_args: +class drop_index_by_name_args: """ Attributes: - - new_part + - db_name + - tbl_name + - index_name + - deleteData """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'index_name', None, None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 ) - def __init__(self, new_part=None,): - self.new_part = new_part + def __init__(self, db_name=None, tbl_name=None, index_name=None, deleteData=None,): + self.db_name = db_name + self.tbl_name = tbl_name + self.index_name = index_name + self.deleteData = deleteData def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4924,9 +9871,23 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.new_part = Partition() - self.new_part.read(iprot) + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tbl_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.index_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); else: iprot.skip(ftype) else: @@ -4938,10 +9899,22 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('add_partition_args') - if self.new_part != None: - oprot.writeFieldBegin('new_part', TType.STRUCT, 1) - self.new_part.write(oprot) + oprot.writeStructBegin('drop_index_by_name_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.index_name != None: + oprot.writeFieldBegin('index_name', TType.STRING, 3) + oprot.writeString(self.index_name) + oprot.writeFieldEnd() + if self.deleteData != None: + oprot.writeFieldBegin('deleteData', TType.BOOL, 4) + oprot.writeBool(self.deleteData) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4957,27 +9930,24 @@ def __ne__(self, other): return not (self == other) -class add_partition_result: +class drop_index_by_name_result: """ Attributes: - success - o1 - o2 - - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4989,29 +9959,22 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() + self.o2 = MetaException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -5021,10 +9984,10 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('add_partition_result') + oprot.writeStructBegin('drop_index_by_name_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -5034,10 +9997,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5052,25 +10011,25 @@ def __ne__(self, other): return not (self == other) -class append_partition_args: +class get_index_by_name_args: """ Attributes: - db_name - tbl_name - - part_vals + - index_name """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (3, TType.STRING, 'index_name', None, None, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + def __init__(self, db_name=None, tbl_name=None, index_name=None,): self.db_name = db_name self.tbl_name = tbl_name - self.part_vals = part_vals + self.index_name = index_name def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -5092,13 +10051,8 @@ else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype157, _size154) = iprot.readListBegin() - for _i158 in xrange(_size154): - _elem159 = iprot.readString(); - self.part_vals.append(_elem159) - iprot.readListEnd() + if ftype == TType.STRING: + self.index_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -5110,7 +10064,7 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('append_partition_args') + oprot.writeStructBegin('get_index_by_name_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) @@ -5119,12 +10073,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 iter160 in self.part_vals: - oprot.writeString(iter160) - oprot.writeListEnd() + if self.index_name != None: + oprot.writeFieldBegin('index_name', TType.STRING, 3) + oprot.writeString(self.index_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5140,27 +10091,24 @@ def __ne__(self, other): return not (self == other) -class append_partition_result: +class get_index_by_name_result: """ Attributes: - success - o1 - o2 - - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -5173,28 +10121,22 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Partition() + self.success = Index() self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() + self.o2 = NoSuchObjectException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -5204,7 +10146,7 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('append_partition_result') + oprot.writeStructBegin('get_index_by_name_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -5217,10 +10159,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5235,25 +10173,25 @@ def __ne__(self, other): return not (self == other) -class append_partition_by_name_args: +class get_indexes_args: """ Attributes: - db_name - tbl_name - - part_name + - max_indexes """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 + (3, TType.I16, 'max_indexes', None, -1, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, part_name=None,): + def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): self.db_name = db_name self.tbl_name = tbl_name - self.part_name = part_name + self.max_indexes = max_indexes def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -5275,8 +10213,8 @@ else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString(); + if ftype == TType.I16: + self.max_indexes = iprot.readI16(); else: iprot.skip(ftype) else: @@ -5288,7 +10226,7 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('append_partition_by_name_args') + oprot.writeStructBegin('get_indexes_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) @@ -5297,9 +10235,9 @@ oprot.writeFieldBegin('tbl_name', TType.STRING, 2) oprot.writeString(self.tbl_name) oprot.writeFieldEnd() - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) + if self.max_indexes != None: + oprot.writeFieldBegin('max_indexes', TType.I16, 3) + oprot.writeI16(self.max_indexes) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5315,27 +10253,24 @@ def __ne__(self, other): return not (self == other) -class append_partition_by_name_result: +class get_indexes_result: """ Attributes: - success - o1 - o2 - - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.LIST, 'success', (TType.STRUCT,(Index, Index.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 self.o2 = o2 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -5347,29 +10282,28 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = Partition() - self.success.read(iprot) + if ftype == TType.LIST: + self.success = [] + (_etype362, _size359) = iprot.readListBegin() + for _i363 in xrange(_size359): + _elem364 = Index() + _elem364.read(iprot) + self.success.append(_elem364) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() + self.o2 = MetaException() self.o2.read(iprot) else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -5379,10 +10313,13 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('append_partition_by_name_result') + oprot.writeStructBegin('get_indexes_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter365 in self.success: + iter365.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -5392,10 +10329,6 @@ oprot.writeFieldBegin('o2', TType.STRUCT, 2) self.o2.write(oprot) oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5410,28 +10343,25 @@ def __ne__(self, other): return not (self == other) -class drop_partition_args: +class get_index_names_args: """ Attributes: - db_name - tbl_name - - part_vals - - deleteData + - max_indexes """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 + (3, TType.I16, 'max_indexes', None, -1, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None,): + def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): self.db_name = db_name self.tbl_name = tbl_name - self.part_vals = part_vals - self.deleteData = deleteData + self.max_indexes = max_indexes def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -5453,18 +10383,8 @@ else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype164, _size161) = iprot.readListBegin() - for _i165 in xrange(_size161): - _elem166 = iprot.readString(); - self.part_vals.append(_elem166) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); + if ftype == TType.I16: + self.max_indexes = iprot.readI16(); else: iprot.skip(ftype) else: @@ -5476,7 +10396,7 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_partition_args') + oprot.writeStructBegin('get_index_names_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) @@ -5485,16 +10405,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 iter167 in self.part_vals: - oprot.writeString(iter167) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) + if self.max_indexes != None: + oprot.writeFieldBegin('max_indexes', TType.I16, 3) + oprot.writeI16(self.max_indexes) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5510,23 +10423,20 @@ def __ne__(self, other): return not (self == other) -class drop_partition_result: +class get_index_names_result: """ Attributes: - success - - o1 - o2 """ thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o2=None,): self.success = success - self.o1 = o1 self.o2 = o2 def read(self, iprot): @@ -5539,18 +10449,17 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.LIST: + self.success = [] + (_etype369, _size366) = iprot.readListBegin() + for _i370 in xrange(_size366): + _elem371 = iprot.readString(); + self.success.append(_elem371) + 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: @@ -5564,17 +10473,16 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_partition_result') + oprot.writeStructBegin('get_index_names_result') if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.o1 != None: - oprot.writeFieldBegin('o1', TType.STRUCT, 1) - self.o1.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter372 in self.success: + oprot.writeString(iter372) + 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() @@ -5591,28 +10499,22 @@ def __ne__(self, other): return not (self == other) -class drop_partition_by_name_args: +class get_user_privilege_set_args: """ Attributes: - - db_name - - tbl_name - - part_name - - deleteData + - user_name + - group_names """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 + (1, TType.STRING, 'user_name', None, None, ), # 1 + (2, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 2 ) - def __init__(self, db_name=None, tbl_name=None, part_name=None, deleteData=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name - self.deleteData = deleteData + def __init__(self, user_name=None, group_names=None,): + self.user_name = user_name + self.group_names = group_names def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -5625,22 +10527,17 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.part_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); + if ftype == TType.LIST: + self.group_names = [] + (_etype376, _size373) = iprot.readListBegin() + for _i377 in xrange(_size373): + _elem378 = iprot.readString(); + self.group_names.append(_elem378) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -5652,22 +10549,17 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_partition_by_name_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) + oprot.writeStructBegin('get_user_privilege_set_args') + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 1) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter379 in self.group_names: + oprot.writeString(iter379) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5683,24 +10575,21 @@ def __ne__(self, other): return not (self == other) -class drop_partition_by_name_result: +class get_user_privilege_set_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -5712,22 +10601,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() @@ -5737,19 +10621,15 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_partition_by_name_result') + oprot.writeStructBegin('get_user_privilege_set_result') if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5764,25 +10644,25 @@ def __ne__(self, other): return not (self == other) -class get_partition_args: +class get_db_privilege_set_args: """ Attributes: - db_name - - tbl_name - - part_vals + - user_name + - group_names """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (2, TType.STRING, 'user_name', None, None, ), # 2 + (3, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, part_vals=None,): + def __init__(self, db_name=None, user_name=None, group_names=None,): self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals + self.user_name = user_name + self.group_names = group_names def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -5800,16 +10680,16 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: if ftype == TType.LIST: - self.part_vals = [] - (_etype171, _size168) = iprot.readListBegin() - for _i172 in xrange(_size168): - _elem173 = iprot.readString(); - self.part_vals.append(_elem173) + self.group_names = [] + (_etype383, _size380) = iprot.readListBegin() + for _i384 in xrange(_size380): + _elem385 = iprot.readString(); + self.group_names.append(_elem385) iprot.readListEnd() else: iprot.skip(ftype) @@ -5822,20 +10702,20 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partition_args') + oprot.writeStructBegin('get_db_privilege_set_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 2) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter174 in self.part_vals: - oprot.writeString(iter174) + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter386 in self.group_names: + oprot.writeString(iter386) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5852,24 +10732,21 @@ def __ne__(self, other): return not (self == other) -class get_partition_result: +class get_db_privilege_set_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -5882,7 +10759,7 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Partition() + self.success = PrincipalPrivilegeSet() self.success.read(iprot) else: iprot.skip(ftype) @@ -5892,12 +10769,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() @@ -5907,7 +10778,7 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partition_result') + oprot.writeStructBegin('get_db_privilege_set_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -5916,10 +10787,6 @@ oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5934,25 +10801,28 @@ def __ne__(self, other): return not (self == other) -class get_partition_by_name_args: +class get_table_privilege_set_args: """ Attributes: - db_name - - tbl_name - - part_name + - table_name + - user_name + - group_names """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'part_name', None, None, ), # 3 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'user_name', None, None, ), # 3 + (4, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 4 ) - def __init__(self, db_name=None, tbl_name=None, part_name=None,): + def __init__(self, db_name=None, table_name=None, user_name=None, group_names=None,): self.db_name = db_name - self.tbl_name = tbl_name - self.part_name = part_name + self.table_name = table_name + self.user_name = user_name + self.group_names = group_names def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -5970,12 +10840,22 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.table_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.part_name = iprot.readString(); + self.user_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.group_names = [] + (_etype390, _size387) = iprot.readListBegin() + for _i391 in xrange(_size387): + _elem392 = iprot.readString(); + self.group_names.append(_elem392) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -5987,18 +10867,25 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partition_by_name_args') + oprot.writeStructBegin('get_table_privilege_set_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) oprot.writeFieldEnd() - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 3) - oprot.writeString(self.part_name) + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 3) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter393 in self.group_names: + oprot.writeString(iter393) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6014,24 +10901,21 @@ def __ne__(self, other): return not (self == other) -class get_partition_by_name_result: +class get_table_privilege_set_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0 + (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -6044,7 +10928,7 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Partition() + self.success = PrincipalPrivilegeSet() self.success.read(iprot) else: iprot.skip(ftype) @@ -6054,12 +10938,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() @@ -6069,7 +10947,7 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partition_by_name_result') + oprot.writeStructBegin('get_table_privilege_set_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -6078,10 +10956,6 @@ oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6096,25 +10970,31 @@ def __ne__(self, other): return not (self == other) -class get_partitions_args: +class get_partition_privilege_set_args: """ Attributes: - db_name - - tbl_name - - max_parts + - table_name + - part_name + - user_name + - group_names """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_parts', None, -1, ), # 3 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.STRING, 'user_name', None, None, ), # 4 + (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5 ) - def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + def __init__(self, db_name=None, table_name=None, part_name=None, user_name=None, group_names=None,): self.db_name = db_name - self.tbl_name = tbl_name - self.max_parts = max_parts + self.table_name = table_name + self.part_name = part_name + self.user_name = user_name + self.group_names = group_names def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -6132,12 +11012,27 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.user_name = iprot.readString(); else: iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype397, _size394) = iprot.readListBegin() + for _i398 in xrange(_size394): + _elem399 = iprot.readString(); + self.group_names.append(_elem399) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -6149,18 +11044,29 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partitions_args') + oprot.writeStructBegin('get_partition_privilege_set_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 3) - oprot.writeI16(self.max_parts) + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 4) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 5) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter400 in self.group_names: + oprot.writeString(iter400) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6176,24 +11082,21 @@ def __ne__(self, other): return not (self == other) -class get_partitions_result: +class get_partition_privilege_set_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -6205,28 +11108,17 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype178, _size175) = iprot.readListBegin() - for _i179 in xrange(_size175): - _elem180 = Partition() - _elem180.read(iprot) - self.success.append(_elem180) - iprot.readListEnd() + if ftype == TType.STRUCT: + self.success = PrincipalPrivilegeSet() + self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -6236,22 +11128,15 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partitions_result') + oprot.writeStructBegin('get_partition_privilege_set_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter181 in self.success: - iter181.write(oprot) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6266,25 +11151,34 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_args: +class get_column_privilege_set_args: """ Attributes: - db_name - - tbl_name - - max_parts + - table_name + - part_name + - column_name + - user_name + - group_names """ thrift_spec = ( None, # 0 (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_parts', None, -1, ), # 3 + (2, TType.STRING, 'table_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.STRING, 'column_name', None, None, ), # 4 + (5, TType.STRING, 'user_name', None, None, ), # 5 + (6, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 6 ) - def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],): + def __init__(self, db_name=None, table_name=None, part_name=None, column_name=None, user_name=None, group_names=None,): self.db_name = db_name - self.tbl_name = tbl_name - self.max_parts = max_parts + self.table_name = table_name + self.part_name = part_name + self.column_name = column_name + self.user_name = user_name + self.group_names = group_names def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -6302,12 +11196,32 @@ iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.table_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.column_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.user_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.group_names = [] + (_etype404, _size401) = iprot.readListBegin() + for _i405 in xrange(_size401): + _elem406 = iprot.readString(); + self.group_names.append(_elem406) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -6319,18 +11233,33 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partition_names_args') + oprot.writeStructBegin('get_column_privilege_set_args') if self.db_name != None: oprot.writeFieldBegin('db_name', TType.STRING, 1) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 2) + oprot.writeString(self.table_name) oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 3) - oprot.writeI16(self.max_parts) + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.column_name != None: + oprot.writeFieldBegin('column_name', TType.STRING, 4) + oprot.writeString(self.column_name) + oprot.writeFieldEnd() + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 5) + oprot.writeString(self.user_name) + oprot.writeFieldEnd() + if self.group_names != None: + oprot.writeFieldBegin('group_names', TType.LIST, 6) + oprot.writeListBegin(TType.STRING, len(self.group_names)) + for iter407 in self.group_names: + oprot.writeString(iter407) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6346,21 +11275,21 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_result: +class get_column_privilege_set_result: """ Attributes: - success - - o2 + - o1 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + (0, TType.STRUCT, 'success', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success - self.o2 = o2 + self.o1 = o1 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -6372,19 +11301,15 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype185, _size182) = iprot.readListBegin() - for _i186 in xrange(_size182): - _elem187 = iprot.readString(); - self.success.append(_elem187) - iprot.readListEnd() + if ftype == TType.STRUCT: + self.success = PrincipalPrivilegeSet() + self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -6396,17 +11321,14 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partition_names_result') + oprot.writeStructBegin('get_column_privilege_set_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter188 in self.success: - oprot.writeString(iter188) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 1) - self.o2.write(oprot) + if self.o1 != None: + oprot.writeFieldBegin('o1', TType.STRUCT, 1) + self.o1.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6422,28 +11344,25 @@ def __ne__(self, other): return not (self == other) -class get_partitions_ps_args: +class create_role_args: """ Attributes: + - role_name + - owner_name - db_name - - tbl_name - - part_vals - - max_parts """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'owner_name', None, None, ), # 2 + (3, TType.STRING, 'db_name', None, None, ), # 3 ) - def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): + def __init__(self, role_name=None, owner_name=None, db_name=None,): + self.role_name = role_name + self.owner_name = owner_name self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.max_parts = max_parts def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -6456,27 +11375,17 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.role_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.owner_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype192, _size189) = iprot.readListBegin() - for _i193 in xrange(_size189): - _elem194 = iprot.readString(); - self.part_vals.append(_elem194) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); + if ftype == TType.STRING: + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -6488,25 +11397,18 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partitions_ps_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + oprot.writeStructBegin('create_role_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter195 in self.part_vals: - oprot.writeString(iter195) - oprot.writeListEnd() + if self.owner_name != None: + oprot.writeFieldBegin('owner_name', TType.STRING, 2) + oprot.writeString(self.owner_name) oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 3) + oprot.writeString(self.db_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6522,7 +11424,7 @@ def __ne__(self, other): return not (self == other) -class get_partitions_ps_result: +class create_role_result: """ Attributes: - success @@ -6530,7 +11432,7 @@ """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -6548,14 +11450,8 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype199, _size196) = iprot.readListBegin() - for _i200 in xrange(_size196): - _elem201 = Partition() - _elem201.read(iprot) - self.success.append(_elem201) - iprot.readListEnd() + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: @@ -6573,13 +11469,10 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partitions_ps_result') + oprot.writeStructBegin('create_role_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter202 in self.success: - iter202.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) @@ -6599,28 +11492,22 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_ps_args: +class drop_role_args: """ Attributes: + - role_name - db_name - - tbl_name - - part_vals - - max_parts """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'db_name', None, None, ), # 2 ) - def __init__(self, db_name=None, tbl_name=None, part_vals=None, max_parts=thrift_spec[4][4],): + def __init__(self, role_name=None, db_name=None,): + self.role_name = role_name self.db_name = db_name - self.tbl_name = tbl_name - self.part_vals = part_vals - self.max_parts = max_parts def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -6633,27 +11520,12 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.role_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.part_vals = [] - (_etype206, _size203) = iprot.readListBegin() - for _i207 in xrange(_size203): - _elem208 = iprot.readString(); - self.part_vals.append(_elem208) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -6665,26 +11537,15 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partition_names_ps_args') + oprot.writeStructBegin('drop_role_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) + oprot.writeFieldEnd() if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeFieldBegin('db_name', TType.STRING, 2) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter209 in self.part_vals: - oprot.writeString(iter209) - 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() @@ -6699,7 +11560,7 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_ps_result: +class drop_role_result: """ Attributes: - success @@ -6707,7 +11568,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 ) @@ -6725,13 +11586,8 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype213, _size210) = iprot.readListBegin() - for _i214 in xrange(_size210): - _elem215 = iprot.readString(); - self.success.append(_elem215) - iprot.readListEnd() + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: @@ -6749,13 +11605,10 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partition_names_ps_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter216 in self.success: - oprot.writeString(iter216) - oprot.writeListEnd() + oprot.writeStructBegin('drop_role_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -6775,28 +11628,31 @@ def __ne__(self, other): return not (self == other) -class get_partitions_by_filter_args: +class add_role_member_args: """ Attributes: + - role_name + - user_name + - is_role + - is_group - db_name - - tbl_name - - filter - - max_parts """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'filter', None, None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'user_name', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.BOOL, 'is_group', None, None, ), # 4 + (5, TType.STRING, 'db_name', None, None, ), # 5 ) - def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): + def __init__(self, role_name=None, user_name=None, is_role=None, is_group=None, db_name=None,): + self.role_name = role_name + self.user_name = user_name + self.is_role = is_role + self.is_group = is_group self.db_name = db_name - self.tbl_name = tbl_name - self.filter = filter - self.max_parts = max_parts def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -6809,22 +11665,27 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.role_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRING: - self.filter = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 4: - if ftype == TType.I16: - self.max_parts = iprot.readI16(); + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -6836,22 +11697,26 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partitions_by_filter_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('add_role_member_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 2) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.filter != None: - oprot.writeFieldBegin('filter', TType.STRING, 3) - oprot.writeString(self.filter) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) oprot.writeFieldEnd() - if self.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 4) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 5) + oprot.writeString(self.db_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6867,24 +11732,21 @@ def __ne__(self, other): return not (self == other) -class get_partitions_by_filter_result: +class add_role_member_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -6896,14 +11758,8 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype220, _size217) = iprot.readListBegin() - for _i221 in xrange(_size217): - _elem222 = Partition() - _elem222.read(iprot) - self.success.append(_elem222) - iprot.readListEnd() + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: @@ -6912,12 +11768,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() @@ -6927,22 +11777,15 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partitions_by_filter_result') + oprot.writeStructBegin('add_role_member_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter223 in self.success: - iter223.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() @@ -6957,25 +11800,31 @@ def __ne__(self, other): return not (self == other) -class alter_partition_args: +class remove_role_member_args: """ Attributes: + - role_name + - user_name + - is_role + - is_group - db_name - - tbl_name - - new_part """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 3 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'user_name', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.BOOL, 'is_group', None, None, ), # 4 + (5, TType.STRING, 'db_name', None, None, ), # 5 ) - def __init__(self, db_name=None, tbl_name=None, new_part=None,): + def __init__(self, role_name=None, user_name=None, is_role=None, is_group=None, db_name=None,): + self.role_name = role_name + self.user_name = user_name + self.is_role = is_role + self.is_group = is_group self.db_name = db_name - self.tbl_name = tbl_name - self.new_part = new_part def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -6988,18 +11837,27 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.role_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRUCT: - self.new_part = Partition() - self.new_part.read(iprot) + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7011,18 +11869,26 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('alter_partition_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('remove_role_member_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 2) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.new_part != None: - oprot.writeFieldBegin('new_part', TType.STRUCT, 3) - self.new_part.write(oprot) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 4) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 5) + oprot.writeString(self.db_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7038,22 +11904,21 @@ def __ne__(self, other): return not (self == other) -class alter_partition_result: +class remove_role_member_result: """ Attributes: + - success - o1 - - o2 """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): + self.success = success self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -7064,16 +11929,15 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: - if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() - self.o1.read(iprot) + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) - elif fid == 2: + elif fid == 1: if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -7085,15 +11949,15 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('alter_partition_result') + oprot.writeStructBegin('remove_role_member_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7108,22 +11972,28 @@ def __ne__(self, other): return not (self == other) -class get_config_value_args: +class list_roles_args: """ Attributes: - - name - - defaultValue + - principal_name + - is_role + - is_group + - db_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'defaultValue', None, None, ), # 2 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.BOOL, 'is_role', None, None, ), # 2 + (3, TType.BOOL, 'is_group', None, None, ), # 3 + (4, TType.STRING, 'db_name', None, None, ), # 4 ) - def __init__(self, name=None, defaultValue=None,): - self.name = name - self.defaultValue = defaultValue + def __init__(self, principal_name=None, is_role=None, is_group=None, db_name=None,): + self.principal_name = principal_name + self.is_role = is_role + self.is_group = is_group + self.db_name = db_name def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -7136,12 +12006,22 @@ break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString(); + self.principal_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: if ftype == TType.STRING: - self.defaultValue = iprot.readString(); + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7153,14 +12033,22 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_config_value_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + oprot.writeStructBegin('list_roles_args') + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) oprot.writeFieldEnd() - if self.defaultValue != None: - oprot.writeFieldBegin('defaultValue', TType.STRING, 2) - oprot.writeString(self.defaultValue) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 2) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 3) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 4) + oprot.writeString(self.db_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7176,7 +12064,7 @@ def __ne__(self, other): return not (self == other) -class get_config_value_result: +class list_roles_result: """ Attributes: - success @@ -7184,8 +12072,8 @@ """ thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1 + (0, TType.LIST, 'success', (TType.STRUCT,(Role, Role.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) def __init__(self, success=None, o1=None,): @@ -7202,13 +12090,19 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString(); + if ftype == TType.LIST: + self.success = [] + (_etype411, _size408) = iprot.readListBegin() + for _i412 in xrange(_size408): + _elem413 = Role() + _elem413.read(iprot) + self.success.append(_elem413) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = ConfigValSecurityException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) @@ -7221,10 +12115,13 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_config_value_result') + oprot.writeStructBegin('list_roles_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter414 in self.success: + iter414.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -7244,19 +12141,25 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_vals_args: +class list_security_user_grant_args: """ Attributes: - - part_name + - principla_name + - is_role + - is_group """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'part_name', None, None, ), # 1 + (1, TType.STRING, 'principla_name', None, None, ), # 1 + (2, TType.BOOL, 'is_role', None, None, ), # 2 + (3, TType.BOOL, 'is_group', None, None, ), # 3 ) - def __init__(self, part_name=None,): - self.part_name = part_name + def __init__(self, principla_name=None, is_role=None, is_group=None,): + self.principla_name = principla_name + self.is_role = is_role + self.is_group = is_group def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -7269,7 +12172,17 @@ break if fid == 1: if ftype == TType.STRING: - self.part_name = iprot.readString(); + self.principla_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); else: iprot.skip(ftype) else: @@ -7281,10 +12194,18 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('partition_name_to_vals_args') - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 1) - oprot.writeString(self.part_name) + oprot.writeStructBegin('list_security_user_grant_args') + if self.principla_name != None: + oprot.writeFieldBegin('principla_name', TType.STRING, 1) + oprot.writeString(self.principla_name) + oprot.writeFieldEnd() + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 2) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 3) + oprot.writeBool(self.is_group) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7300,7 +12221,7 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_vals_result: +class list_security_user_grant_result: """ Attributes: - success @@ -7308,7 +12229,7 @@ """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityUser, SecurityUser.thrift_spec)), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -7328,10 +12249,11 @@ if fid == 0: if ftype == TType.LIST: self.success = [] - (_etype227, _size224) = iprot.readListBegin() - for _i228 in xrange(_size224): - _elem229 = iprot.readString(); - self.success.append(_elem229) + (_etype418, _size415) = iprot.readListBegin() + for _i419 in xrange(_size415): + _elem420 = SecurityUser() + _elem420.read(iprot) + self.success.append(_elem420) iprot.readListEnd() else: iprot.skip(ftype) @@ -7350,12 +12272,12 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('partition_name_to_vals_result') + oprot.writeStructBegin('list_security_user_grant_result') if self.success != None: oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter230 in self.success: - oprot.writeString(iter230) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter421 in self.success: + iter421.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -7376,19 +12298,28 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_spec_args: +class list_security_db_grant_args: """ Attributes: - - part_name + - principal_name + - is_group + - is_role + - db_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'part_name', None, None, ), # 1 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.BOOL, 'is_group', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.STRING, 'db_name', None, None, ), # 4 ) - def __init__(self, part_name=None,): - self.part_name = part_name + def __init__(self, principal_name=None, is_group=None, is_role=None, db_name=None,): + self.principal_name = principal_name + self.is_group = is_group + self.is_role = is_role + self.db_name = db_name def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -7401,7 +12332,22 @@ break if fid == 1: if ftype == TType.STRING: - self.part_name = iprot.readString(); + self.principal_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.db_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7413,10 +12359,22 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('partition_name_to_spec_args') - if self.part_name != None: - oprot.writeFieldBegin('part_name', TType.STRING, 1) - oprot.writeString(self.part_name) + oprot.writeStructBegin('list_security_db_grant_args') + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 2) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 4) + oprot.writeString(self.db_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7432,7 +12390,7 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_spec_result: +class list_security_db_grant_result: """ Attributes: - success @@ -7440,7 +12398,7 @@ """ thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityDB, SecurityDB.thrift_spec)), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -7458,14 +12416,14 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.MAP: - self.success = {} - (_ktype232, _vtype233, _size231 ) = iprot.readMapBegin() - for _i235 in xrange(_size231): - _key236 = iprot.readString(); - _val237 = iprot.readString(); - self.success[_key236] = _val237 - iprot.readMapEnd() + if ftype == TType.LIST: + self.success = [] + (_etype425, _size422) = iprot.readListBegin() + for _i426 in xrange(_size422): + _elem427 = SecurityDB() + _elem427.read(iprot) + self.success.append(_elem427) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -7483,14 +12441,13 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('partition_name_to_spec_result') + oprot.writeStructBegin('list_security_db_grant_result') if self.success != None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter238,viter239 in self.success.items(): - oprot.writeString(kiter238) - oprot.writeString(viter239) - oprot.writeMapEnd() + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter428 in self.success: + iter428.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -7510,22 +12467,31 @@ def __ne__(self, other): return not (self == other) -class add_index_args: +class list_security_table_grant_args: """ Attributes: - - new_index - - index_table + - principal_name + - is_group + - is_role + - db_name + - table_name """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'new_index', (Index, Index.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'index_table', (Table, Table.thrift_spec), None, ), # 2 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.BOOL, 'is_group', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.STRING, 'db_name', None, None, ), # 4 + (5, TType.STRING, 'table_name', None, None, ), # 5 ) - def __init__(self, new_index=None, index_table=None,): - self.new_index = new_index - self.index_table = index_table + def __init__(self, principal_name=None, is_group=None, is_role=None, db_name=None, table_name=None,): + self.principal_name = principal_name + self.is_group = is_group + self.is_role = is_role + self.db_name = db_name + self.table_name = table_name def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -7537,15 +12503,28 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.new_index = Index() - self.new_index.read(iprot) + if ftype == TType.STRING: + self.principal_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRUCT: - self.index_table = Table() - self.index_table.read(iprot) + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.table_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7557,14 +12536,26 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('add_index_args') - if self.new_index != None: - oprot.writeFieldBegin('new_index', TType.STRUCT, 1) - self.new_index.write(oprot) + oprot.writeStructBegin('list_security_table_grant_args') + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) oprot.writeFieldEnd() - if self.index_table != None: - oprot.writeFieldBegin('index_table', TType.STRUCT, 2) - self.index_table.write(oprot) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 2) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 4) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 5) + oprot.writeString(self.table_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7580,27 +12571,21 @@ def __ne__(self, other): return not (self == other) -class add_index_result: +class list_security_table_grant_result: """ Attributes: - success - o1 - - o2 - - o3 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3 + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityTablePartition, SecurityTablePartition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 - self.o3 = o3 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -7612,29 +12597,22 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = Index() - self.success.read(iprot) + if ftype == TType.LIST: + self.success = [] + (_etype432, _size429) = iprot.readListBegin() + for _i433 in xrange(_size429): + _elem434 = SecurityTablePartition() + _elem434.read(iprot) + self.success.append(_elem434) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = InvalidObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = AlreadyExistsException() - self.o2.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -7644,23 +12622,18 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('add_index_result') + oprot.writeStructBegin('list_security_table_grant_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter435 in self.success: + iter435.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() - if self.o3 != None: - oprot.writeFieldBegin('o3', TType.STRUCT, 3) - self.o3.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7675,28 +12648,34 @@ def __ne__(self, other): return not (self == other) -class alter_index_args: +class list_security_partition_grant_args: """ Attributes: - - dbname - - base_tbl_name - - idx_name - - new_idx + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'base_tbl_name', None, None, ), # 2 - (3, TType.STRING, 'idx_name', None, None, ), # 3 - (4, TType.STRUCT, 'new_idx', (Index, Index.thrift_spec), None, ), # 4 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.BOOL, 'is_group', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.STRING, 'db_name', None, None, ), # 4 + (5, TType.STRING, 'table_name', None, None, ), # 5 + (6, TType.STRING, 'part_name', None, None, ), # 6 ) - def __init__(self, dbname=None, base_tbl_name=None, idx_name=None, new_idx=None,): - self.dbname = dbname - self.base_tbl_name = base_tbl_name - self.idx_name = idx_name - self.new_idx = new_idx + def __init__(self, principal_name=None, is_group=None, is_role=None, db_name=None, table_name=None, part_name=None,): + self.principal_name = principal_name + self.is_group = is_group + self.is_role = is_role + self.db_name = db_name + self.table_name = table_name + self.part_name = part_name def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -7709,23 +12688,32 @@ break if fid == 1: if ftype == TType.STRING: - self.dbname = iprot.readString(); + self.principal_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.base_tbl_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRING: - self.idx_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 4: - if ftype == TType.STRUCT: - self.new_idx = Index() - self.new_idx.read(iprot) + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7737,22 +12725,30 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('alter_index_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) + oprot.writeStructBegin('list_security_partition_grant_args') + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) oprot.writeFieldEnd() - if self.base_tbl_name != None: - oprot.writeFieldBegin('base_tbl_name', TType.STRING, 2) - oprot.writeString(self.base_tbl_name) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 2) + oprot.writeBool(self.is_group) oprot.writeFieldEnd() - if self.idx_name != None: - oprot.writeFieldBegin('idx_name', TType.STRING, 3) - oprot.writeString(self.idx_name) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) oprot.writeFieldEnd() - if self.new_idx != None: - oprot.writeFieldBegin('new_idx', TType.STRUCT, 4) - self.new_idx.write(oprot) + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 4) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 5) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 6) + oprot.writeString(self.part_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7768,22 +12764,21 @@ def __ne__(self, other): return not (self == other) -class alter_index_result: +class list_security_partition_grant_result: """ Attributes: + - success - o1 - - o2 """ thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityTablePartition, SecurityTablePartition.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): + self.success = success self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -7794,16 +12789,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 = [] + (_etype439, _size436) = iprot.readListBegin() + for _i440 in xrange(_size436): + _elem441 = SecurityTablePartition() + _elem441.read(iprot) + self.success.append(_elem441) + 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: @@ -7815,15 +12815,18 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('alter_index_result') + oprot.writeStructBegin('list_security_partition_grant_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter442 in self.success: + iter442.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() @@ -7838,28 +12841,37 @@ def __ne__(self, other): return not (self == other) -class drop_index_by_name_args: +class list_security_column_grant_args: """ Attributes: + - principal_name + - is_group + - is_role - db_name - - tbl_name - - index_name - - deleteData + - table_name + - part_name + - column_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'index_name', None, None, ), # 3 - (4, TType.BOOL, 'deleteData', None, None, ), # 4 + (1, TType.STRING, 'principal_name', None, None, ), # 1 + (2, TType.BOOL, 'is_group', None, None, ), # 2 + (3, TType.BOOL, 'is_role', None, None, ), # 3 + (4, TType.STRING, 'db_name', None, None, ), # 4 + (5, TType.STRING, 'table_name', None, None, ), # 5 + (6, TType.STRING, 'part_name', None, None, ), # 6 + (7, TType.STRING, 'column_name', None, None, ), # 7 ) - def __init__(self, db_name=None, tbl_name=None, index_name=None, deleteData=None,): + def __init__(self, principal_name=None, is_group=None, is_role=None, db_name=None, table_name=None, part_name=None, column_name=None,): + self.principal_name = principal_name + self.is_group = is_group + self.is_role = is_role self.db_name = db_name - self.tbl_name = tbl_name - self.index_name = index_name - self.deleteData = deleteData + self.table_name = table_name + self.part_name = part_name + self.column_name = column_name def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -7872,22 +12884,37 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.principal_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.STRING: - self.index_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 4: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); + if ftype == TType.STRING: + self.db_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.table_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.part_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.column_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7899,22 +12926,34 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_index_by_name_args') + oprot.writeStructBegin('list_security_column_grant_args') + if self.principal_name != None: + oprot.writeFieldBegin('principal_name', TType.STRING, 1) + oprot.writeString(self.principal_name) + oprot.writeFieldEnd() + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 2) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 3) + oprot.writeBool(self.is_role) + oprot.writeFieldEnd() if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeFieldBegin('db_name', TType.STRING, 4) oprot.writeString(self.db_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.index_name != None: - oprot.writeFieldBegin('index_name', TType.STRING, 3) - oprot.writeString(self.index_name) + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 5) + oprot.writeString(self.table_name) oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 6) + oprot.writeString(self.part_name) + oprot.writeFieldEnd() + if self.column_name != None: + oprot.writeFieldBegin('column_name', TType.STRING, 7) + oprot.writeString(self.column_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7930,24 +12969,21 @@ def __ne__(self, other): return not (self == other) -class drop_index_by_name_result: +class list_security_column_grant_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityColumn, SecurityColumn.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -7959,22 +12995,22 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.LIST: + self.success = [] + (_etype446, _size443) = iprot.readListBegin() + for _i447 in xrange(_size443): + _elem448 = SecurityColumn() + _elem448.read(iprot) + self.success.append(_elem448) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.o2 = MetaException() - self.o2.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -7984,19 +13020,18 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('drop_index_by_name_result') + oprot.writeStructBegin('list_security_column_grant_result') if self.success != None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter449 in self.success: + iter449.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() @@ -8011,25 +13046,31 @@ def __ne__(self, other): return not (self == other) -class get_index_by_name_args: +class grant_privileges_args: """ Attributes: - - db_name - - tbl_name - - index_name + - user_name + - is_role + - is_group + - privileges + - grantor """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.STRING, 'index_name', None, None, ), # 3 + (1, TType.STRING, 'user_name', None, None, ), # 1 + (2, TType.BOOL, 'is_role', None, None, ), # 2 + (3, TType.BOOL, 'is_group', None, None, ), # 3 + (4, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 4 + (5, TType.STRING, 'grantor', None, None, ), # 5 ) - def __init__(self, db_name=None, tbl_name=None, index_name=None,): - self.db_name = db_name - self.tbl_name = tbl_name - self.index_name = index_name + def __init__(self, user_name=None, is_role=None, is_group=None, privileges=None, grantor=None,): + self.user_name = user_name + self.is_role = is_role + self.is_group = is_group + self.privileges = privileges + self.grantor = grantor def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -8042,17 +13083,28 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 3: + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: if ftype == TType.STRING: - self.index_name = iprot.readString(); + self.grantor = iprot.readString(); else: iprot.skip(ftype) else: @@ -8064,18 +13116,26 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_index_by_name_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('grant_privileges_args') + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 1) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 2) + oprot.writeBool(self.is_role) oprot.writeFieldEnd() - if self.index_name != None: - oprot.writeFieldBegin('index_name', TType.STRING, 3) - oprot.writeString(self.index_name) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 3) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 4) + self.privileges.write(oprot) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 5) + oprot.writeString(self.grantor) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8091,24 +13151,21 @@ def __ne__(self, other): return not (self == other) -class get_index_by_name_result: +class grant_privileges_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Index, Index.thrift_spec), None, ), # 0 + (0, TType.BOOL, 'success', None, None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -8120,9 +13177,8 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = Index() - self.success.read(iprot) + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: @@ -8131,12 +13187,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() @@ -8146,19 +13196,15 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_index_by_name_result') + oprot.writeStructBegin('grant_privileges_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) oprot.writeFieldEnd() - if self.o2 != None: - oprot.writeFieldBegin('o2', TType.STRUCT, 2) - self.o2.write(oprot) - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8173,25 +13219,28 @@ def __ne__(self, other): return not (self == other) -class get_indexes_args: +class revoke_privileges_args: """ Attributes: - - db_name - - tbl_name - - max_indexes + - user_name + - is_role + - is_group + - privileges """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_indexes', None, -1, ), # 3 + (1, TType.STRING, 'user_name', None, None, ), # 1 + (2, TType.BOOL, 'is_role', None, None, ), # 2 + (3, TType.BOOL, 'is_group', None, None, ), # 3 + (4, TType.STRUCT, 'privileges', (PrivilegeBag, PrivilegeBag.thrift_spec), None, ), # 4 ) - def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_indexes = max_indexes + def __init__(self, user_name=None, is_role=None, is_group=None, privileges=None,): + self.user_name = user_name + self.is_role = is_role + self.is_group = is_group + self.privileges = privileges def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -8204,17 +13253,23 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.I16: - self.max_indexes = iprot.readI16(); + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.privileges = PrivilegeBag() + self.privileges.read(iprot) else: iprot.skip(ftype) else: @@ -8226,18 +13281,22 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_indexes_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('revoke_privileges_args') + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 1) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 2) + oprot.writeBool(self.is_role) oprot.writeFieldEnd() - if self.max_indexes != None: - oprot.writeFieldBegin('max_indexes', TType.I16, 3) - oprot.writeI16(self.max_indexes) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 3) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 4) + self.privileges.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8253,24 +13312,21 @@ def __ne__(self, other): return not (self == other) -class get_indexes_result: +class revoke_privileges_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(Index, Index.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o1=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success self.o1 = o1 - self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -8282,28 +13338,16 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype243, _size240) = iprot.readListBegin() - for _i244 in xrange(_size240): - _elem245 = Index() - _elem245.read(iprot) - self.success.append(_elem245) - 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() @@ -8313,22 +13357,15 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_indexes_result') + oprot.writeStructBegin('revoke_privileges_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter246 in self.success: - iter246.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() @@ -8343,25 +13380,40 @@ def __ne__(self, other): return not (self == other) -class get_index_names_args: +class revoke_all_privileges_args: """ Attributes: - - db_name - - tbl_name - - max_indexes + - user_name + - is_role + - is_group + - remove_user_priv + - dbs + - tables + - parts + - columns """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.I16, 'max_indexes', None, -1, ), # 3 + (1, TType.STRING, 'user_name', None, None, ), # 1 + (2, TType.BOOL, 'is_role', None, None, ), # 2 + (3, TType.BOOL, 'is_group', None, None, ), # 3 + (4, TType.BOOL, 'remove_user_priv', None, None, ), # 4 + (5, TType.LIST, 'dbs', (TType.STRUCT,(Database, Database.thrift_spec)), None, ), # 5 + (6, TType.LIST, 'tables', (TType.STRUCT,(Table, Table.thrift_spec)), None, ), # 6 + (7, TType.LIST, 'parts', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 7 + (8, TType.MAP, 'columns', (TType.STRUCT,(Table, Table.thrift_spec),TType.LIST,(TType.STRING,None)), None, ), # 8 ) - def __init__(self, db_name=None, tbl_name=None, max_indexes=thrift_spec[3][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.max_indexes = max_indexes + def __init__(self, user_name=None, is_role=None, is_group=None, remove_user_priv=None, dbs=None, tables=None, parts=None, columns=None,): + self.user_name = user_name + self.is_role = is_role + self.is_group = is_group + self.remove_user_priv = remove_user_priv + self.dbs = dbs + self.tables = tables + self.parts = parts + self.columns = columns def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -8374,17 +13426,72 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.user_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.tbl_name = iprot.readString(); + if ftype == TType.BOOL: + self.is_role = iprot.readBool(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.I16: - self.max_indexes = iprot.readI16(); + if ftype == TType.BOOL: + self.is_group = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.remove_user_priv = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.dbs = [] + (_etype453, _size450) = iprot.readListBegin() + for _i454 in xrange(_size450): + _elem455 = Database() + _elem455.read(iprot) + self.dbs.append(_elem455) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.tables = [] + (_etype459, _size456) = iprot.readListBegin() + for _i460 in xrange(_size456): + _elem461 = Table() + _elem461.read(iprot) + self.tables.append(_elem461) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.LIST: + self.parts = [] + (_etype465, _size462) = iprot.readListBegin() + for _i466 in xrange(_size462): + _elem467 = Partition() + _elem467.read(iprot) + self.parts.append(_elem467) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.MAP: + self.columns = {} + (_ktype469, _vtype470, _size468 ) = iprot.readMapBegin() + for _i472 in xrange(_size468): + _key473 = Table() + _key473.read(iprot) + _val474 = [] + (_etype478, _size475) = iprot.readListBegin() + for _i479 in xrange(_size475): + _elem480 = iprot.readString(); + _val474.append(_elem480) + iprot.readListEnd() + self.columns[_key473] = _val474 + iprot.readMapEnd() else: iprot.skip(ftype) else: @@ -8396,18 +13503,54 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_index_names_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('revoke_all_privileges_args') + if self.user_name != None: + oprot.writeFieldBegin('user_name', TType.STRING, 1) + oprot.writeString(self.user_name) oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.is_role != None: + oprot.writeFieldBegin('is_role', TType.BOOL, 2) + oprot.writeBool(self.is_role) oprot.writeFieldEnd() - if self.max_indexes != None: - oprot.writeFieldBegin('max_indexes', TType.I16, 3) - oprot.writeI16(self.max_indexes) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 3) + oprot.writeBool(self.is_group) + oprot.writeFieldEnd() + if self.remove_user_priv != None: + oprot.writeFieldBegin('remove_user_priv', TType.BOOL, 4) + oprot.writeBool(self.remove_user_priv) + oprot.writeFieldEnd() + if self.dbs != None: + oprot.writeFieldBegin('dbs', TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.dbs)) + for iter481 in self.dbs: + iter481.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.tables != None: + oprot.writeFieldBegin('tables', TType.LIST, 6) + oprot.writeListBegin(TType.STRUCT, len(self.tables)) + for iter482 in self.tables: + iter482.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.parts != None: + oprot.writeFieldBegin('parts', TType.LIST, 7) + oprot.writeListBegin(TType.STRUCT, len(self.parts)) + for iter483 in self.parts: + iter483.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.columns != None: + oprot.writeFieldBegin('columns', TType.MAP, 8) + oprot.writeMapBegin(TType.STRUCT, TType.LIST, len(self.columns)) + for kiter484,viter485 in self.columns.items(): + kiter484.write(oprot) + oprot.writeListBegin(TType.STRING, len(viter485)) + for iter486 in viter485: + oprot.writeString(iter486) + oprot.writeListEnd() + oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8423,21 +13566,21 @@ def __ne__(self, other): return not (self == other) -class get_index_names_result: +class revoke_all_privileges_result: """ Attributes: - success - - o2 + - o1 """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) - def __init__(self, success=None, o2=None,): + def __init__(self, success=None, o1=None,): self.success = success - self.o2 = o2 + self.o1 = o1 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -8449,19 +13592,14 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype250, _size247) = iprot.readListBegin() - for _i251 in xrange(_size247): - _elem252 = iprot.readString(); - self.success.append(_elem252) - 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: @@ -8473,17 +13611,14 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_index_names_result') + oprot.writeStructBegin('revoke_all_privileges_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter253 in self.success: - oprot.writeString(iter253) - 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-py/hive_metastore/ttypes.py =================================================================== --- metastore/src/gen-py/hive_metastore/ttypes.py (revision 1037574) +++ metastore/src/gen-py/hive_metastore/ttypes.py (working copy) @@ -265,12 +265,123 @@ def __ne__(self, other): return not (self == other) +class PrincipalPrivilegeSet: + """ + Attributes: + - userPrivileges + - groupPrivileges + - rolePrivileges + """ + + thrift_spec = ( + None, # 0 + (1, TType.MAP, 'userPrivileges', (TType.STRING,None,TType.STRING,None), None, ), # 1 + (2, TType.MAP, 'groupPrivileges', (TType.STRING,None,TType.STRING,None), None, ), # 2 + (3, TType.MAP, 'rolePrivileges', (TType.STRING,None,TType.STRING,None), None, ), # 3 + ) + + def __init__(self, userPrivileges=None, groupPrivileges=None, rolePrivileges=None,): + self.userPrivileges = userPrivileges + self.groupPrivileges = groupPrivileges + self.rolePrivileges = rolePrivileges + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.userPrivileges = {} + (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin() + for _i11 in xrange(_size7): + _key12 = iprot.readString(); + _val13 = iprot.readString(); + self.userPrivileges[_key12] = _val13 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.groupPrivileges = {} + (_ktype15, _vtype16, _size14 ) = iprot.readMapBegin() + for _i18 in xrange(_size14): + _key19 = iprot.readString(); + _val20 = iprot.readString(); + self.groupPrivileges[_key19] = _val20 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.rolePrivileges = {} + (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin() + for _i25 in xrange(_size21): + _key26 = iprot.readString(); + _val27 = iprot.readString(); + self.rolePrivileges[_key26] = _val27 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('PrincipalPrivilegeSet') + if self.userPrivileges != None: + oprot.writeFieldBegin('userPrivileges', TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.userPrivileges)) + for kiter28,viter29 in self.userPrivileges.items(): + oprot.writeString(kiter28) + oprot.writeString(viter29) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.groupPrivileges != None: + oprot.writeFieldBegin('groupPrivileges', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.groupPrivileges)) + for kiter30,viter31 in self.groupPrivileges.items(): + oprot.writeString(kiter30) + oprot.writeString(viter31) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.rolePrivileges != None: + oprot.writeFieldBegin('rolePrivileges', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.rolePrivileges)) + for kiter32,viter33 in self.rolePrivileges.items(): + oprot.writeString(kiter32) + oprot.writeString(viter33) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __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: - name - description - locationUri + - privileges """ thrift_spec = ( @@ -278,12 +389,14 @@ (1, TType.STRING, 'name', None, None, ), # 1 (2, TType.STRING, 'description', None, None, ), # 2 (3, TType.STRING, 'locationUri', None, None, ), # 3 + (4, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 4 ) - def __init__(self, name=None, description=None, locationUri=None,): + def __init__(self, name=None, description=None, locationUri=None, privileges=None,): self.name = name self.description = description self.locationUri = locationUri + 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: @@ -309,6 +422,12 @@ self.locationUri = iprot.readString(); else: iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.privileges = PrincipalPrivilegeSet() + self.privileges.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -331,6 +450,103 @@ oprot.writeFieldBegin('locationUri', TType.STRING, 3) oprot.writeString(self.locationUri) oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 4) + self.privileges.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Role: + """ + Attributes: + - roleName + - database + - createTime + - ownerName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'roleName', None, None, ), # 1 + (2, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 2 + (3, TType.I32, 'createTime', None, None, ), # 3 + (4, TType.STRING, 'ownerName', None, None, ), # 4 + ) + + def __init__(self, roleName=None, database=None, createTime=None, ownerName=None,): + self.roleName = roleName + self.database = database + 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.STRUCT: + self.database = Database() + self.database.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.ownerName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Role') + if self.roleName != None: + oprot.writeFieldBegin('roleName', TType.STRING, 1) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + if self.database != None: + oprot.writeFieldBegin('database', TType.STRUCT, 2) + self.database.write(oprot) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 3) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.ownerName != None: + oprot.writeFieldBegin('ownerName', TType.STRING, 4) + oprot.writeString(self.ownerName) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -387,11 +603,11 @@ elif fid == 3: if ftype == TType.MAP: self.parameters = {} - (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin() - for _i11 in xrange(_size7): - _key12 = iprot.readString(); - _val13 = iprot.readString(); - self.parameters[_key12] = _val13 + (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin() + for _i38 in xrange(_size34): + _key39 = iprot.readString(); + _val40 = iprot.readString(); + self.parameters[_key39] = _val40 iprot.readMapEnd() else: iprot.skip(ftype) @@ -416,9 +632,9 @@ if self.parameters != None: oprot.writeFieldBegin('parameters', TType.MAP, 3) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter14,viter15 in self.parameters.items(): - oprot.writeString(kiter14) - oprot.writeString(viter15) + for kiter41,viter42 in self.parameters.items(): + oprot.writeString(kiter41) + oprot.writeString(viter42) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -556,11 +772,11 @@ if fid == 1: if ftype == TType.LIST: self.cols = [] - (_etype19, _size16) = iprot.readListBegin() - for _i20 in xrange(_size16): - _elem21 = FieldSchema() - _elem21.read(iprot) - self.cols.append(_elem21) + (_etype46, _size43) = iprot.readListBegin() + for _i47 in xrange(_size43): + _elem48 = FieldSchema() + _elem48.read(iprot) + self.cols.append(_elem48) iprot.readListEnd() else: iprot.skip(ftype) @@ -598,32 +814,32 @@ elif fid == 8: if ftype == TType.LIST: self.bucketCols = [] - (_etype25, _size22) = iprot.readListBegin() - for _i26 in xrange(_size22): - _elem27 = iprot.readString(); - self.bucketCols.append(_elem27) + (_etype52, _size49) = iprot.readListBegin() + for _i53 in xrange(_size49): + _elem54 = iprot.readString(); + self.bucketCols.append(_elem54) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.LIST: self.sortCols = [] - (_etype31, _size28) = iprot.readListBegin() - for _i32 in xrange(_size28): - _elem33 = Order() - _elem33.read(iprot) - self.sortCols.append(_elem33) + (_etype58, _size55) = iprot.readListBegin() + for _i59 in xrange(_size55): + _elem60 = Order() + _elem60.read(iprot) + self.sortCols.append(_elem60) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 10: if ftype == TType.MAP: self.parameters = {} - (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin() - for _i38 in xrange(_size34): - _key39 = iprot.readString(); - _val40 = iprot.readString(); - self.parameters[_key39] = _val40 + (_ktype62, _vtype63, _size61 ) = iprot.readMapBegin() + for _i65 in xrange(_size61): + _key66 = iprot.readString(); + _val67 = iprot.readString(); + self.parameters[_key66] = _val67 iprot.readMapEnd() else: iprot.skip(ftype) @@ -640,8 +856,8 @@ if self.cols != None: oprot.writeFieldBegin('cols', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.cols)) - for iter41 in self.cols: - iter41.write(oprot) + for iter68 in self.cols: + iter68.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.location != None: @@ -671,23 +887,23 @@ if self.bucketCols != None: oprot.writeFieldBegin('bucketCols', TType.LIST, 8) oprot.writeListBegin(TType.STRING, len(self.bucketCols)) - for iter42 in self.bucketCols: - oprot.writeString(iter42) + for iter69 in self.bucketCols: + oprot.writeString(iter69) oprot.writeListEnd() oprot.writeFieldEnd() if self.sortCols != None: oprot.writeFieldBegin('sortCols', TType.LIST, 9) oprot.writeListBegin(TType.STRUCT, len(self.sortCols)) - for iter43 in self.sortCols: - iter43.write(oprot) + for iter70 in self.sortCols: + iter70.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 kiter44,viter45 in self.parameters.items(): - oprot.writeString(kiter44) - oprot.writeString(viter45) + for kiter71,viter72 in self.parameters.items(): + oprot.writeString(kiter71) + oprot.writeString(viter72) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -719,6 +935,7 @@ - viewOriginalText - viewExpandedText - tableType + - privileges """ thrift_spec = ( @@ -735,9 +952,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 @@ -750,6 +968,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: @@ -799,22 +1018,22 @@ elif fid == 8: if ftype == TType.LIST: self.partitionKeys = [] - (_etype49, _size46) = iprot.readListBegin() - for _i50 in xrange(_size46): - _elem51 = FieldSchema() - _elem51.read(iprot) - self.partitionKeys.append(_elem51) + (_etype76, _size73) = iprot.readListBegin() + for _i77 in xrange(_size73): + _elem78 = FieldSchema() + _elem78.read(iprot) + self.partitionKeys.append(_elem78) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 9: if ftype == TType.MAP: self.parameters = {} - (_ktype53, _vtype54, _size52 ) = iprot.readMapBegin() - for _i56 in xrange(_size52): - _key57 = iprot.readString(); - _val58 = iprot.readString(); - self.parameters[_key57] = _val58 + (_ktype80, _vtype81, _size79 ) = iprot.readMapBegin() + for _i83 in xrange(_size79): + _key84 = iprot.readString(); + _val85 = iprot.readString(); + self.parameters[_key84] = _val85 iprot.readMapEnd() else: iprot.skip(ftype) @@ -833,6 +1052,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() @@ -874,16 +1099,16 @@ if self.partitionKeys != None: oprot.writeFieldBegin('partitionKeys', TType.LIST, 8) oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys)) - for iter59 in self.partitionKeys: - iter59.write(oprot) + for iter86 in self.partitionKeys: + iter86.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 kiter60,viter61 in self.parameters.items(): - oprot.writeString(kiter60) - oprot.writeString(viter61) + for kiter87,viter88 in self.parameters.items(): + oprot.writeString(kiter87) + oprot.writeString(viter88) oprot.writeMapEnd() oprot.writeFieldEnd() if self.viewOriginalText != None: @@ -898,6 +1123,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() @@ -922,6 +1151,7 @@ - lastAccessTime - sd - parameters + - privileges """ thrift_spec = ( @@ -933,9 +1163,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 @@ -943,6 +1174,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: @@ -956,10 +1188,10 @@ if fid == 1: if ftype == TType.LIST: self.values = [] - (_etype65, _size62) = iprot.readListBegin() - for _i66 in xrange(_size62): - _elem67 = iprot.readString(); - self.values.append(_elem67) + (_etype92, _size89) = iprot.readListBegin() + for _i93 in xrange(_size89): + _elem94 = iprot.readString(); + self.values.append(_elem94) iprot.readListEnd() else: iprot.skip(ftype) @@ -992,14 +1224,20 @@ elif fid == 7: if ftype == TType.MAP: self.parameters = {} - (_ktype69, _vtype70, _size68 ) = iprot.readMapBegin() - for _i72 in xrange(_size68): - _key73 = iprot.readString(); - _val74 = iprot.readString(); - self.parameters[_key73] = _val74 + (_ktype96, _vtype97, _size95 ) = iprot.readMapBegin() + for _i99 in xrange(_size95): + _key100 = iprot.readString(); + _val101 = iprot.readString(); + self.parameters[_key100] = _val101 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() @@ -1013,8 +1251,8 @@ if self.values != None: oprot.writeFieldBegin('values', TType.LIST, 1) oprot.writeListBegin(TType.STRING, len(self.values)) - for iter75 in self.values: - oprot.writeString(iter75) + for iter102 in self.values: + oprot.writeString(iter102) oprot.writeListEnd() oprot.writeFieldEnd() if self.dbName != None: @@ -1040,11 +1278,15 @@ if self.parameters != None: oprot.writeFieldBegin('parameters', TType.MAP, 7) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter76,viter77 in self.parameters.items(): - oprot.writeString(kiter76) - oprot.writeString(viter77) + for kiter103,viter104 in self.parameters.items(): + oprot.writeString(kiter103) + oprot.writeString(viter104) oprot.writeMapEnd() oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRUCT, 8) + self.privileges.write(oprot) + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -1153,11 +1395,11 @@ elif fid == 9: if ftype == TType.MAP: self.parameters = {} - (_ktype79, _vtype80, _size78 ) = iprot.readMapBegin() - for _i82 in xrange(_size78): - _key83 = iprot.readString(); - _val84 = iprot.readString(); - self.parameters[_key83] = _val84 + (_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) @@ -1211,9 +1453,9 @@ if self.parameters != None: oprot.writeFieldBegin('parameters', TType.MAP, 9) oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters)) - for kiter85,viter86 in self.parameters.items(): - oprot.writeString(kiter85) - oprot.writeString(viter86) + for kiter112,viter113 in self.parameters.items(): + oprot.writeString(kiter112) + oprot.writeString(viter113) oprot.writeMapEnd() oprot.writeFieldEnd() if self.deferredRebuild != None: @@ -1263,22 +1505,22 @@ if fid == 1: if ftype == TType.LIST: self.fieldSchemas = [] - (_etype90, _size87) = iprot.readListBegin() - for _i91 in xrange(_size87): - _elem92 = FieldSchema() - _elem92.read(iprot) - self.fieldSchemas.append(_elem92) + (_etype117, _size114) = iprot.readListBegin() + for _i118 in xrange(_size114): + _elem119 = FieldSchema() + _elem119.read(iprot) + self.fieldSchemas.append(_elem119) iprot.readListEnd() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.MAP: self.properties = {} - (_ktype94, _vtype95, _size93 ) = iprot.readMapBegin() - for _i97 in xrange(_size93): - _key98 = iprot.readString(); - _val99 = iprot.readString(); - self.properties[_key98] = _val99 + (_ktype121, _vtype122, _size120 ) = iprot.readMapBegin() + for _i124 in xrange(_size120): + _key125 = iprot.readString(); + _val126 = iprot.readString(); + self.properties[_key125] = _val126 iprot.readMapEnd() else: iprot.skip(ftype) @@ -1295,16 +1537,16 @@ if self.fieldSchemas != None: oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1) oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas)) - for iter100 in self.fieldSchemas: - iter100.write(oprot) + for iter127 in self.fieldSchemas: + iter127.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 kiter101,viter102 in self.properties.items(): - oprot.writeString(kiter101) - oprot.writeString(viter102) + for kiter128,viter129 in self.properties.items(): + oprot.writeString(kiter128) + oprot.writeString(viter129) oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -1321,19 +1563,28 @@ def __ne__(self, other): return not (self == other) -class MetaException(Exception): +class ColumnPrivilegeBag: """ Attributes: - - message + - dbName + - tableName + - partitionName + - columnPrivileges """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 + (1, TType.STRING, 'dbName', None, None, ), # 1 + (2, TType.STRING, 'tableName', None, None, ), # 2 + (3, TType.STRING, 'partitionName', None, None, ), # 3 + (4, TType.MAP, 'columnPrivileges', (TType.STRING,None,TType.STRING,None), None, ), # 4 ) - def __init__(self, message=None,): - self.message = message + def __init__(self, dbName=None, tableName=None, partitionName=None, columnPrivileges=None,): + self.dbName = dbName + self.tableName = tableName + self.partitionName = partitionName + self.columnPrivileges = columnPrivileges def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -1346,7 +1597,28 @@ break if fid == 1: if ftype == TType.STRING: - self.message = iprot.readString(); + self.dbName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.partitionName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.columnPrivileges = {} + (_ktype131, _vtype132, _size130 ) = iprot.readMapBegin() + for _i134 in xrange(_size130): + _key135 = iprot.readString(); + _val136 = iprot.readString(); + self.columnPrivileges[_key135] = _val136 + iprot.readMapEnd() else: iprot.skip(ftype) else: @@ -1358,17 +1630,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('MetaException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) + oprot.writeStructBegin('ColumnPrivilegeBag') + if self.dbName != None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName != None: + oprot.writeFieldBegin('tableName', TType.STRING, 2) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.partitionName != None: + oprot.writeFieldBegin('partitionName', TType.STRING, 3) + oprot.writeString(self.partitionName) + oprot.writeFieldEnd() + if self.columnPrivileges != None: + oprot.writeFieldBegin('columnPrivileges', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.columnPrivileges)) + for kiter137,viter138 in self.columnPrivileges.items(): + oprot.writeString(kiter137) + oprot.writeString(viter138) + oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() - def __str__(self): - return repr(self) - def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1380,19 +1665,31 @@ def __ne__(self, other): return not (self == other) -class UnknownTableException(Exception): +class PrivilegeBag: """ Attributes: - - message + - userPrivileges + - dbPrivileges + - tablePrivileges + - partitionPrivileges + - columnPrivileges """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 + (1, TType.STRING, 'userPrivileges', None, None, ), # 1 + (2, TType.MAP, 'dbPrivileges', (TType.STRUCT,(Database, Database.thrift_spec),TType.STRING,None), None, ), # 2 + (3, TType.MAP, 'tablePrivileges', (TType.STRUCT,(Table, Table.thrift_spec),TType.STRING,None), None, ), # 3 + (4, TType.MAP, 'partitionPrivileges', (TType.STRUCT,(Partition, Partition.thrift_spec),TType.STRING,None), None, ), # 4 + (5, TType.LIST, 'columnPrivileges', (TType.STRUCT,(ColumnPrivilegeBag, ColumnPrivilegeBag.thrift_spec)), None, ), # 5 ) - def __init__(self, message=None,): - self.message = message + def __init__(self, userPrivileges=None, dbPrivileges=None, tablePrivileges=None, partitionPrivileges=None, columnPrivileges=None,): + self.userPrivileges = userPrivileges + self.dbPrivileges = dbPrivileges + self.tablePrivileges = tablePrivileges + self.partitionPrivileges = partitionPrivileges + self.columnPrivileges = columnPrivileges def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -1405,7 +1702,54 @@ break if fid == 1: if ftype == TType.STRING: - self.message = iprot.readString(); + self.userPrivileges = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.dbPrivileges = {} + (_ktype140, _vtype141, _size139 ) = iprot.readMapBegin() + for _i143 in xrange(_size139): + _key144 = Database() + _key144.read(iprot) + _val145 = iprot.readString(); + self.dbPrivileges[_key144] = _val145 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.tablePrivileges = {} + (_ktype147, _vtype148, _size146 ) = iprot.readMapBegin() + for _i150 in xrange(_size146): + _key151 = Table() + _key151.read(iprot) + _val152 = iprot.readString(); + self.tablePrivileges[_key151] = _val152 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.partitionPrivileges = {} + (_ktype154, _vtype155, _size153 ) = iprot.readMapBegin() + for _i157 in xrange(_size153): + _key158 = Partition() + _key158.read(iprot) + _val159 = iprot.readString(); + self.partitionPrivileges[_key158] = _val159 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.columnPrivileges = [] + (_etype163, _size160) = iprot.readListBegin() + for _i164 in xrange(_size160): + _elem165 = ColumnPrivilegeBag() + _elem165.read(iprot) + self.columnPrivileges.append(_elem165) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -1417,17 +1761,45 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('UnknownTableException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) + oprot.writeStructBegin('PrivilegeBag') + if self.userPrivileges != None: + oprot.writeFieldBegin('userPrivileges', TType.STRING, 1) + oprot.writeString(self.userPrivileges) + oprot.writeFieldEnd() + if self.dbPrivileges != None: + oprot.writeFieldBegin('dbPrivileges', TType.MAP, 2) + oprot.writeMapBegin(TType.STRUCT, TType.STRING, len(self.dbPrivileges)) + for kiter166,viter167 in self.dbPrivileges.items(): + kiter166.write(oprot) + oprot.writeString(viter167) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.tablePrivileges != None: + oprot.writeFieldBegin('tablePrivileges', TType.MAP, 3) + oprot.writeMapBegin(TType.STRUCT, TType.STRING, len(self.tablePrivileges)) + for kiter168,viter169 in self.tablePrivileges.items(): + kiter168.write(oprot) + oprot.writeString(viter169) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.partitionPrivileges != None: + oprot.writeFieldBegin('partitionPrivileges', TType.MAP, 4) + oprot.writeMapBegin(TType.STRUCT, TType.STRING, len(self.partitionPrivileges)) + for kiter170,viter171 in self.partitionPrivileges.items(): + kiter170.write(oprot) + oprot.writeString(viter171) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.columnPrivileges != None: + oprot.writeFieldBegin('columnPrivileges', TType.LIST, 5) + oprot.writeListBegin(TType.STRUCT, len(self.columnPrivileges)) + for iter172 in self.columnPrivileges: + iter172.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() - def __str__(self): - return repr(self) - def __repr__(self): L = ['%s=%r' % (key, value) for key, value in self.__dict__.iteritems()] @@ -1439,19 +1811,34 @@ def __ne__(self, other): return not (self == other) -class UnknownDBException(Exception): +class SecurityUser: """ Attributes: - - message + - principalName + - isRole + - isGroup + - privileges + - createTime + - grantor """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 + (1, TType.STRING, 'principalName', None, None, ), # 1 + (2, TType.BOOL, 'isRole', None, None, ), # 2 + (3, TType.BOOL, 'isGroup', None, None, ), # 3 + (4, TType.STRING, 'privileges', None, None, ), # 4 + (5, TType.I32, 'createTime', None, None, ), # 5 + (6, TType.STRING, 'grantor', None, None, ), # 6 ) - def __init__(self, message=None,): - self.message = message + def __init__(self, principalName=None, isRole=None, isGroup=None, privileges=None, createTime=None, grantor=None,): + self.principalName = principalName + self.isRole = isRole + self.isGroup = isGroup + self.privileges = privileges + self.createTime = createTime + self.grantor = grantor def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -1464,7 +1851,32 @@ break if fid == 1: if ftype == TType.STRING: - self.message = iprot.readString(); + self.principalName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isRole = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.isGroup = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.privileges = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.grantor = iprot.readString(); else: iprot.skip(ftype) else: @@ -1476,6 +1888,625 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return + oprot.writeStructBegin('SecurityUser') + if self.principalName != None: + oprot.writeFieldBegin('principalName', TType.STRING, 1) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.isRole != None: + oprot.writeFieldBegin('isRole', TType.BOOL, 2) + oprot.writeBool(self.isRole) + oprot.writeFieldEnd() + if self.isGroup != None: + oprot.writeFieldBegin('isGroup', TType.BOOL, 3) + oprot.writeBool(self.isGroup) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRING, 4) + oprot.writeString(self.privileges) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 6) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SecurityDB: + """ + Attributes: + - principalName + - isRole + - isGroup + - privileges + - createTime + - grantor + - db + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'principalName', None, None, ), # 1 + (2, TType.BOOL, 'isRole', None, None, ), # 2 + (3, TType.BOOL, 'isGroup', None, None, ), # 3 + (4, TType.STRING, 'privileges', None, None, ), # 4 + (5, TType.I32, 'createTime', None, None, ), # 5 + (6, TType.STRING, 'grantor', None, None, ), # 6 + (7, TType.STRUCT, 'db', (Database, Database.thrift_spec), None, ), # 7 + ) + + def __init__(self, principalName=None, isRole=None, isGroup=None, privileges=None, createTime=None, grantor=None, db=None,): + self.principalName = principalName + self.isRole = isRole + self.isGroup = isGroup + self.privileges = privileges + self.createTime = createTime + self.grantor = grantor + self.db = db + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principalName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isRole = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.isGroup = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.privileges = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.grantor = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.db = Database() + self.db.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SecurityDB') + if self.principalName != None: + oprot.writeFieldBegin('principalName', TType.STRING, 1) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.isRole != None: + oprot.writeFieldBegin('isRole', TType.BOOL, 2) + oprot.writeBool(self.isRole) + oprot.writeFieldEnd() + if self.isGroup != None: + oprot.writeFieldBegin('isGroup', TType.BOOL, 3) + oprot.writeBool(self.isGroup) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRING, 4) + oprot.writeString(self.privileges) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 6) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.db != None: + oprot.writeFieldBegin('db', TType.STRUCT, 7) + self.db.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SecurityTablePartition: + """ + Attributes: + - principalName + - isRole + - isGroup + - privileges + - createTime + - grantor + - table + - part + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'principalName', None, None, ), # 1 + (2, TType.BOOL, 'isRole', None, None, ), # 2 + (3, TType.BOOL, 'isGroup', None, None, ), # 3 + (4, TType.STRING, 'privileges', None, None, ), # 4 + (5, TType.I32, 'createTime', None, None, ), # 5 + (6, TType.STRING, 'grantor', None, None, ), # 6 + (7, TType.STRUCT, 'table', (Table, Table.thrift_spec), None, ), # 7 + (8, TType.STRUCT, 'part', (Partition, Partition.thrift_spec), None, ), # 8 + ) + + def __init__(self, principalName=None, isRole=None, isGroup=None, privileges=None, createTime=None, grantor=None, table=None, part=None,): + self.principalName = principalName + self.isRole = isRole + self.isGroup = isGroup + self.privileges = privileges + self.createTime = createTime + self.grantor = grantor + self.table = table + self.part = part + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principalName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isRole = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.isGroup = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.privileges = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.grantor = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.table = Table() + self.table.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.part = Partition() + self.part.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SecurityTablePartition') + if self.principalName != None: + oprot.writeFieldBegin('principalName', TType.STRING, 1) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.isRole != None: + oprot.writeFieldBegin('isRole', TType.BOOL, 2) + oprot.writeBool(self.isRole) + oprot.writeFieldEnd() + if self.isGroup != None: + oprot.writeFieldBegin('isGroup', TType.BOOL, 3) + oprot.writeBool(self.isGroup) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRING, 4) + oprot.writeString(self.privileges) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 6) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.table != None: + oprot.writeFieldBegin('table', TType.STRUCT, 7) + self.table.write(oprot) + oprot.writeFieldEnd() + if self.part != None: + oprot.writeFieldBegin('part', TType.STRUCT, 8) + self.part.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class SecurityColumn: + """ + Attributes: + - principalName + - isRole + - isGroup + - privileges + - createTime + - grantor + - table + - partition + - column + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'principalName', None, None, ), # 1 + (2, TType.BOOL, 'isRole', None, None, ), # 2 + (3, TType.BOOL, 'isGroup', None, None, ), # 3 + (4, TType.STRING, 'privileges', None, None, ), # 4 + (5, TType.I32, 'createTime', None, None, ), # 5 + (6, TType.STRING, 'grantor', None, None, ), # 6 + (7, TType.STRUCT, 'table', (Table, Table.thrift_spec), None, ), # 7 + (8, TType.STRUCT, 'partition', (Partition, Partition.thrift_spec), None, ), # 8 + (9, TType.STRING, 'column', None, None, ), # 9 + ) + + def __init__(self, principalName=None, isRole=None, isGroup=None, privileges=None, createTime=None, grantor=None, table=None, partition=None, column=None,): + self.principalName = principalName + self.isRole = isRole + self.isGroup = isGroup + self.privileges = privileges + self.createTime = createTime + self.grantor = grantor + self.table = table + self.partition = partition + self.column = column + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.principalName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.isRole = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.isGroup = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.privileges = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.grantor = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.table = Table() + self.table.read(iprot) + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.partition = Partition() + self.partition.read(iprot) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.column = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SecurityColumn') + if self.principalName != None: + oprot.writeFieldBegin('principalName', TType.STRING, 1) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.isRole != None: + oprot.writeFieldBegin('isRole', TType.BOOL, 2) + oprot.writeBool(self.isRole) + oprot.writeFieldEnd() + if self.isGroup != None: + oprot.writeFieldBegin('isGroup', TType.BOOL, 3) + oprot.writeBool(self.isGroup) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRING, 4) + oprot.writeString(self.privileges) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 6) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + if self.table != None: + oprot.writeFieldBegin('table', TType.STRUCT, 7) + self.table.write(oprot) + oprot.writeFieldEnd() + if self.partition != None: + oprot.writeFieldBegin('partition', TType.STRUCT, 8) + self.partition.write(oprot) + oprot.writeFieldEnd() + if self.column != None: + oprot.writeFieldBegin('column', TType.STRING, 9) + oprot.writeString(self.column) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class MetaException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('MetaException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UnknownTableException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('UnknownTableException') + if self.message != None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class UnknownDBException(Exception): + """ + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return oprot.writeStructBegin('UnknownDBException') if self.message != None: oprot.writeFieldBegin('message', TType.STRING, 1) Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (revision 1037574) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (working copy) @@ -48,12 +48,27 @@ import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; +import org.apache.hadoop.hive.metastore.api.SecurityColumn; +import org.apache.hadoop.hive.metastore.api.SecurityDB; +import org.apache.hadoop.hive.metastore.api.SecurityTablePartition; +import org.apache.hadoop.hive.metastore.api.SecurityUser; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore; import org.apache.hadoop.hive.metastore.api.Type; import org.apache.hadoop.hive.metastore.api.UnknownDBException; import org.apache.hadoop.hive.metastore.api.UnknownTableException; import org.apache.hadoop.hive.metastore.hooks.JDOConnectionURLHook; +import org.apache.hadoop.hive.metastore.model.MPartition; +import org.apache.hadoop.hive.metastore.model.MSecurityColumn; +import org.apache.hadoop.hive.metastore.model.MSecurityDB; +import org.apache.hadoop.hive.metastore.model.MSecurityRoleEntity; +import org.apache.hadoop.hive.metastore.model.MSecurityTablePartition; +import org.apache.hadoop.hive.metastore.model.MSecurityUser; +import org.apache.hadoop.hive.metastore.model.MSecurityUserRoleMap; +import org.apache.hadoop.hive.metastore.model.MTable; import org.apache.hadoop.hive.serde2.Deserializer; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.SerDeUtils; @@ -360,7 +375,7 @@ } catch (NoSuchObjectException e) { ms.createDatabase( new Database(DEFAULT_DATABASE_NAME, DEFAULT_DATABASE_COMMENT, - wh.getDefaultDatabasePath(DEFAULT_DATABASE_NAME).toString())); + wh.getDefaultDatabasePath(DEFAULT_DATABASE_NAME).toString(), null)); } HMSHandler.createDefaultDB = true; } @@ -1225,17 +1240,20 @@ throw new NoSuchObjectException("Partition doesn't exist. " + part_vals); } - + isArchived = MetaStoreUtils.isArchived(part); if (isArchived) { archiveParentDir = MetaStoreUtils.getOriginalLocation(part); } + if (part.getSd() == null || part.getSd().getLocation() == null) { throw new MetaException("Partition metadata is corrupted"); } + if (!ms.dropPartition(db_name, tbl_name, part_vals)) { throw new MetaException("Unable to drop partition"); } + success = ms.commitTransaction(); partPath = new Path(part.getSd().getLocation()); tbl = get_table(db_name, tbl_name); @@ -1312,6 +1330,35 @@ } return ret; } + + @Override + public Partition get_partition_with_auth(final String db_name, + final String tbl_name, final List part_vals, + final String user_name, final List group_names) + throws MetaException, NoSuchObjectException, TException { + incrementCounter("get_partition_with_auth"); + logStartPartitionFunction("get_partition_with_auth", db_name, tbl_name, + part_vals); + + Partition ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Partition run(RawStore ms) throws Exception { + return ms.getPartitionWithAuth(db_name, tbl_name, part_vals, + user_name, group_names); + } + }); + } catch (MetaException e) { + throw e; + } catch (NoSuchObjectException e) { + throw e; + } catch (Exception e) { + assert (e instanceof RuntimeException); + throw (RuntimeException) e; + } + return ret; + } public List get_partitions(final String db_name, final String tbl_name, final short max_parts) throws NoSuchObjectException, MetaException { @@ -1337,6 +1384,35 @@ return ret; } + + @Override + public List get_partitions_with_auth(final String dbName, + final String tblName, final short maxParts, final String userName, + final List groupNames) throws NoSuchObjectException, + MetaException, TException { + incrementCounter("get_partitions_with_auth"); + logStartTableFunction("get_partitions_with_auth", dbName, tblName); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + return ms.getPartitionsWithAuth(dbName, tblName, maxParts, + userName, groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (NoSuchObjectException e) { + throw e; + } catch (Exception e) { + assert (e instanceof RuntimeException); + throw (RuntimeException) e; + } + return ret; + + } public List get_partition_names(final String db_name, final String tbl_name, final short max_parts) throws MetaException { @@ -1774,10 +1850,24 @@ @Override public List get_partitions_ps(final String db_name, - final String tbl_name, final List part_vals, final short max_parts) - throws MetaException, TException { + final String tbl_name, final List part_vals, + final short max_parts) throws MetaException, TException { + incrementCounter("get_partitions_ps"); + logStartPartitionFunction("get_partitions_ps", db_name, tbl_name, + part_vals); + + return this.get_partitions_ps_with_auth(db_name, tbl_name, part_vals, + max_parts, null, null); + } + + @Override + public List get_partitions_ps_with_auth(final String db_name, + final String tbl_name, final List part_vals, + final short max_parts, final String userName, + final List groupNames) throws MetaException, TException { incrementCounter("get_partitions_ps"); - logStartPartitionFunction("get_partitions_ps", db_name, tbl_name, part_vals); + logStartPartitionFunction("get_partitions_ps", db_name, tbl_name, + part_vals); Table t; try { @@ -1791,7 +1881,7 @@ } // Create a map from the partition column name to the partition value Map partKeyToValues = new LinkedHashMap(); - int i=0; + int i = 0; for (String value : part_vals) { String col = t.getPartitionKeys().get(i).getName(); if (value.length() > 0) { @@ -1799,21 +1889,48 @@ } i++; } - final String filter = MetaStoreUtils.makeFilterStringFromMap(partKeyToValues); + final String filter = MetaStoreUtils + .makeFilterStringFromMap(partKeyToValues); List ret = null; try { ret = executeWithRetry(new Command>() { @Override List run(RawStore ms) throws Exception { - return ms.getPartitionsByFilter(db_name, tbl_name, filter, max_parts); + return ms.getPartitionsByFilter(db_name, tbl_name, filter, + max_parts); } }); } catch (MetaException e) { throw e; } catch (Exception e) { - assert(e instanceof RuntimeException); - throw (RuntimeException)e; + assert (e instanceof RuntimeException); + throw (RuntimeException) e; + } + + if (ret != null && ret.size() > 0) { + for (Partition part : ret) { + final String partName = Warehouse.makePartName(t.getPartitionKeys(), + part.getValues()); + PrincipalPrivilegeSet partAuth = null; + try { + partAuth = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + PrincipalPrivilegeSet auth = ms.getPartitionPrivilegeSet( + db_name, tbl_name, partName, userName, groupNames); + return auth; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + assert (e instanceof RuntimeException); + throw (RuntimeException) e; + } + + part.setPrivileges(partAuth); + } } return ret; @@ -2163,6 +2280,505 @@ return ret; } + @Override + public PrincipalPrivilegeSet get_column_privilege_set(final String dbName, + final String tableName, final String partName, final String columnName, + final String userName, final List groupNames) throws MetaException, + TException { + incrementCounter("get_column_privilege_set"); + + PrincipalPrivilegeSet ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + return ms.getColumnPrivilegeSet(dbName, tableName, partName, columnName, userName, groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public PrincipalPrivilegeSet get_db_privilege_set(final String dbName, + final String userName, final List groupNames) throws MetaException, + TException { + incrementCounter("get_db_privilege_set"); + + PrincipalPrivilegeSet ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + return ms.getDBPrivilegeSet(dbName, userName, groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public PrincipalPrivilegeSet get_partition_privilege_set( + final String dbName, final String tableName, final String partName, + final String userName, final List groupNames) + throws MetaException, TException { + incrementCounter("get_partition_privilege_set"); + + PrincipalPrivilegeSet ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + return ms.getPartitionPrivilegeSet(dbName, tableName, partName, + userName, groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public PrincipalPrivilegeSet get_table_privilege_set(final String dbName, + final String tableName, final String userName, + final List groupNames) throws MetaException, TException { + incrementCounter("get_table_privilege_set"); + + PrincipalPrivilegeSet ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + return ms.getTablePrivilegeSet(dbName, tableName, userName, + groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean add_role_member(final String roleName, + final String userName, final boolean isRole, final boolean isGroup, + final String databaseName) throws MetaException, TException { + incrementCounter("add_role_member"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + Role role = ms.getRole(roleName, databaseName); + return ms.addRoleMember(role, userName, isRole, isGroup); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + public List list_roles(final String principalName, + final boolean isRole, final boolean isGroup, final String databaseName) throws MetaException, TException { + incrementCounter("list_roles"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List result = new ArrayList(); + List roleMap = ms.listRoles(principalName, + isRole, isGroup, databaseName); + if (roleMap!=null) { + Database db = get_database(databaseName); + for (MSecurityUserRoleMap role : roleMap) { + MSecurityRoleEntity r = role.getRole(); + result.add(new Role(r.getRoleName(), db, r + .getCreateTime(), r.getOwnerName())); + } + } + return result; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean create_role(final String roleName, final String ownerName, + final String databName) + throws MetaException, TException { + incrementCounter("create_role"); + + Boolean ret = null; + try { + + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.addRole(roleName, ownerName, databName); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean drop_role(final String roleName, final String databaseName) + throws MetaException, TException { + incrementCounter("drop_role"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.removeRole(roleName, databaseName); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean grant_privileges(final String userName, final boolean isRole, + final boolean isGroup, final PrivilegeBag privileges, final String grantor) throws MetaException, + TException { + incrementCounter("grant_privileges"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.grantPrivileges(userName, isRole, isGroup, privileges, grantor); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean remove_role_member(final String roleName, final String userName, + final boolean isRole, final boolean isGroup, final String databaseName) throws MetaException, TException { + incrementCounter("remove_role_member"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + Role mRole = ms.getRole(roleName, databaseName); + return ms.removeRoleMember(mRole, userName, isRole, isGroup); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean revoke_privileges(final String userName, final boolean isRole, + final boolean isGroup, final PrivilegeBag privileges) throws MetaException, + TException { + incrementCounter("revoke_privileges"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.revokePrivileges(userName, isRole, isGroup, privileges); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public PrincipalPrivilegeSet get_user_privilege_set(final String userName, + final List groupNames) throws MetaException, TException { + incrementCounter("get_user_privilege_set"); + + PrincipalPrivilegeSet ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + PrincipalPrivilegeSet run(RawStore ms) throws Exception { + return ms.getUserPrivilegeSet(userName, groupNames); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean revoke_all_privileges(final String userName, + final boolean isRole, final boolean isGroup, + final boolean removeUserPriv, final List dbs, + final List
tables, final List parts, + final Map> columns) throws MetaException, + TException { + incrementCounter("revoke_all_privileges"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.revokeAllPrivileges(userName, isRole, isGroup, + removeUserPriv, dbs, tables, parts, columns); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public List list_security_column_grant( + final String principalName, final boolean isGroup, + final boolean isRole, final String dbName, final String tableName, + final String partName, final String columnName) throws MetaException, + TException { + incrementCounter("list_security_column_grant"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List mCols = ms.listMSecurityTabOrPartColumnGrant(principalName, + isGroup, isRole, dbName, tableName, partName, columnName); + Table tbl = ms.getTable(dbName, tableName); + Partition part = null; + if (partName != null) { + part = get_partition_by_name(dbName, tableName, partName); + } + + if (mCols.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mCols.size(); i++) { + MSecurityColumn sCol = mCols.get(i); + SecurityColumn col = new SecurityColumn( + sCol.getPrincipalName(), sCol.getIsRole(), sCol + .getIsGroup(), sCol.getPrivileges(), sCol + .getCreateTime(), sCol.getGrantor(), tbl, part, sCol + .getColumnName()); + result.add(col); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public List list_security_db_grant(final String principalName, + final boolean isGroup, final boolean isRole, final String dbName) + throws MetaException, TException { + incrementCounter("list_security_db_grant"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List mDbs = ms.listMSecurityPrincipalDBGrant( + principalName, isGroup, isRole, dbName); + Database db = ms.getDatabase(dbName); + if (mDbs.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mDbs.size(); i++) { + MSecurityDB sDB = mDbs.get(i); + SecurityDB secdb = new SecurityDB(sDB.getPrincipalName(), sDB + .getIsRole(), sDB.getIsGroup(), sDB.getPrivileges(), sDB + .getCreateTime(), sDB.getGrantor(), db); + result.add(secdb); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public List list_security_partition_grant( + final String principalName, final boolean isGroup, + final boolean isRole, final String dbName, final String tableName, + final String partName) throws MetaException, TException { + incrementCounter("list_security_partition_grant"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List mParts = ms + .listMSecurityPrincipalPartitionGrant(principalName, isGroup, + isRole, dbName, tableName, partName); + Partition partObj = get_partition_by_name(dbName, tableName, + partName); + if (mParts.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mParts.size(); i++) { + MSecurityTablePartition sPart = mParts.get(i); + SecurityTablePartition secPart = new SecurityTablePartition( + sPart.getPrincipalName(), sPart.getIsRole(), sPart + .getIsGroup(), sPart.getPrivileges(), sPart + .getCreateTime(), sPart.getGrantor(), null, partObj); + result.add(secPart); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public List list_security_table_grant( + final String principalName, final boolean isGroup, + final boolean isRole, final String dbName, final String tableName) + throws MetaException, TException { + incrementCounter("list_security_table_grant"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List mTbls = ms + .listMSecurityPrincipalTableGrant(principalName, isGroup, + isRole, dbName, tableName); + Table tblObj = ms.getTable(dbName, tableName); + if (mTbls.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mTbls.size(); i++) { + MSecurityTablePartition sTbl = mTbls.get(i); + SecurityTablePartition secPart = new SecurityTablePartition( + sTbl.getPrincipalName(), sTbl.getIsRole(), sTbl + .getIsGroup(), sTbl.getPrivileges(), sTbl + .getCreateTime(), sTbl.getGrantor(), tblObj, null); + result.add(secPart); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public List list_security_user_grant( + final String principlaName, final boolean isRole, final boolean isGroup) + throws MetaException, TException { + incrementCounter("list_security_user_grant"); + + List ret = null; + try { + ret = executeWithRetry(new Command>() { + @Override + List run(RawStore ms) throws Exception { + List mUsers = ms.listMSecurityPrincipalUserGrant( + principlaName, isRole, isGroup); + if (mUsers.size() > 0) { + List result = new ArrayList(); + for (int i = 0; i < mUsers.size(); i++) { + MSecurityUser sUsr = mUsers.get(i); + SecurityUser secUser = new SecurityUser( + sUsr.getPrincipalName(), sUsr.getIsRole(), sUsr + .getIsGroup(), sUsr.getPrivileges(), sUsr + .getCreateTime(), sUsr.getGrantor()); + result.add(secUser); + } + return result; + } + return null; + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + } /** Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (revision 1037574) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (working copy) @@ -40,6 +40,13 @@ import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; +import org.apache.hadoop.hive.metastore.api.SecurityColumn; +import org.apache.hadoop.hive.metastore.api.SecurityDB; +import org.apache.hadoop.hive.metastore.api.SecurityTablePartition; +import org.apache.hadoop.hive.metastore.api.SecurityUser; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore; import org.apache.hadoop.hive.metastore.api.Type; @@ -515,6 +522,23 @@ return deepCopyPartitions( client.get_partitions_ps(db_name, tbl_name, part_vals, max_parts)); } + + @Override + public List listPartitionsWithAuthInfo(String db_name, + String tbl_name, short max_parts, String user_name, List group_names) + throws NoSuchObjectException, MetaException, TException { + return deepCopyPartitions( + client.get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names)); + } + + @Override + public List listPartitionsWithAuthInfo(String db_name, + String tbl_name, List part_vals, short max_parts, + String user_name, List group_names) throws NoSuchObjectException, + MetaException, TException { + return deepCopyPartitions(client.get_partitions_ps_with_auth(db_name, + tbl_name, part_vals, max_parts, user_name, group_names)); + } /** * Get list of partitions matching specified filter @@ -564,6 +588,14 @@ List part_vals) throws NoSuchObjectException, MetaException, TException { return deepCopy(client.get_partition(db_name, tbl_name, part_vals)); } + + @Override + public Partition getPartitionWithAuthInfo(String db_name, String tbl_name, + List part_vals, String user_name, List group_names) + throws MetaException, UnknownTableException, NoSuchObjectException, + TException { + return deepCopy(client.get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names)); + } /** * @param name @@ -891,4 +923,132 @@ return client.drop_index_by_name(dbName, tblName, name, deleteData); } + @Override + public boolean add_role_member(String roleName, String userName, + boolean isRole, boolean isGroup, String dbName) throws MetaException, TException { + return client.add_role_member(roleName, userName, isRole, isGroup, dbName); + } + + @Override + public boolean create_role(String roleName, String ownerName, String dbName) + throws MetaException, TException { + return client.create_role(roleName, ownerName, dbName); + } + + @Override + public boolean drop_role(String roleName, String dbName) throws MetaException, TException { + return client.drop_role(roleName, dbName); + } + + @Override + public List list_roles(String principalName, + boolean isRole, boolean isGroup, String dbName) throws MetaException, TException { + return client.list_roles(principalName, isRole, isGroup, dbName); + } + + @Override + public PrincipalPrivilegeSet get_column_privilege_set(String dbName, + String tableName, String partName, String columnName, String userName, + List groupNames) throws MetaException, TException { + return client.get_column_privilege_set(dbName, tableName, partName, + columnName, userName, groupNames); + } + + @Override + public PrincipalPrivilegeSet get_db_privilege_set(String dbName, + String userName, List groupNames) throws MetaException, + TException { + return client.get_db_privilege_set(dbName, userName, groupNames); + } + + @Override + public PrincipalPrivilegeSet get_partition_privilege_set(String dbName, + String tableName, String partName, String userName, + List groupNames) throws MetaException, TException { + return client.get_partition_privilege_set(dbName, tableName, partName, + userName, groupNames); + } + + @Override + public PrincipalPrivilegeSet get_table_privilege_set(String dbName, + String tableName, String userName, List groupNames) + throws MetaException, TException { + return client.get_table_privilege_set(dbName, tableName, userName, + groupNames); + } + + @Override + public PrincipalPrivilegeSet get_user_privilege_set(String userName, + List groupNames) throws MetaException, TException { + return client.get_user_privilege_set(userName, groupNames); + } + + @Override + public boolean grant_privileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges, String grantor) + throws MetaException, TException { + return client.grant_privileges(userName, isRole, isGroup, privileges, + grantor); + } + + @Override + public boolean remove_role_member(String roleName, String userName, + boolean isRole, boolean isGroup, String dbName) throws MetaException, TException { + return client.remove_role_member(roleName, userName, isRole, isGroup, dbName); + } + + @Override + public boolean revoke_all_privileges(String userName, boolean isRole, + boolean isGroup, boolean removeUserPriv, List dbs, + List
tables, List parts, + Map> columns) throws MetaException, TException { + return client.revoke_all_privileges(userName, isRole, isGroup, + removeUserPriv, dbs, tables, parts, columns); + } + + @Override + public boolean revoke_privileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges) throws MetaException, + TException { + return client.revoke_privileges(userName, isRole, isGroup, privileges); + } + + @Override + public List list_security_column_grant(String principalName, + boolean isGroup, boolean isRole, String dbName, String tableName, + String partName, String columnName) throws MetaException, TException { + return client.list_security_column_grant(principalName, isGroup, isRole, + dbName, tableName, partName, columnName); + } + + @Override + public List list_security_db_grant(String principalName, + boolean isGroup, boolean isRole, String dbName) throws MetaException, + TException { + return client + .list_security_db_grant(principalName, isGroup, isRole, dbName); + } + + @Override + public List list_security_partition_grant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partName) throws MetaException, TException { + return client.list_security_partition_grant(principalName, isGroup, isRole, + dbName, tableName, partName); + } + + @Override + public List list_security_table_grant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName) throws MetaException, TException { + return client.list_security_table_grant(principalName, isGroup, isRole, + dbName, tableName); + } + + @Override + public List list_security_user_grant(String principlaName, + boolean isRole, boolean isGroup) throws MetaException, TException { + return client.list_security_user_grant(principlaName, isRole, isGroup); + } + } Index: metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java (revision 1037574) +++ metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java (working copy) @@ -31,6 +31,13 @@ import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; +import org.apache.hadoop.hive.metastore.api.SecurityColumn; +import org.apache.hadoop.hive.metastore.api.SecurityDB; +import org.apache.hadoop.hive.metastore.api.SecurityTablePartition; +import org.apache.hadoop.hive.metastore.api.SecurityUser; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.UnknownDBException; import org.apache.hadoop.hive.metastore.api.UnknownTableException; @@ -263,6 +270,23 @@ public Partition getPartition(String dbName, String tblName, String name) throws MetaException, UnknownTableException, NoSuchObjectException, TException; + + /** + * @param dbName + * @param tableName + * @param pvals + * @param userName + * @param groupNames + * @return + * @throws MetaException + * @throws UnknownTableException + * @throws NoSuchObjectException + * @throws TException + */ + public Partition getPartitionWithAuthInfo(String dbName, String tableName, + List pvals, String userName, List groupNames) + throws MetaException, UnknownTableException, NoSuchObjectException, TException; + /** * @param tbl_name * @param db_name @@ -285,6 +309,33 @@ List part_vals, short max_parts) throws MetaException, TException; /** + * @param dbName + * @param tableName + * @param s + * @param userName + * @param groupNames + * @return + * @throws NoSuchObjectException + */ + public List listPartitionsWithAuthInfo(String dbName, + String tableName, short s, String userName, List groupNames) + throws MetaException, TException, NoSuchObjectException; + + /** + * @param dbName + * @param tableName + * @param partialPvals + * @param s + * @param userName + * @param groupNames + * @return + * @throws NoSuchObjectException + */ + public List listPartitionsWithAuthInfo(String dbName, + String tableName, List partialPvals, short s, String userName, + List groupNames) throws MetaException, TException, NoSuchObjectException; + + /** * @param tbl * @throws AlreadyExistsException * @throws InvalidObjectException @@ -478,4 +529,297 @@ public boolean dropIndex(String db_name, String tbl_name, String name, boolean deleteData) throws NoSuchObjectException, MetaException, TException; + + /** + * @param user_name + * user name + * @param group_names + * group names + * @return + * @throws MetaException + * @throws TException + */ + public PrincipalPrivilegeSet get_user_privilege_set(String user_name, + List group_names) throws MetaException, TException; + + /** + * @param db_name + * database name + * @param user_name + * user name + * @param group_names + * group names + * @return + * @throws MetaException + * @throws TException + */ + public PrincipalPrivilegeSet get_db_privilege_set(String db_name, + String user_name, List group_names) throws MetaException, + TException; + + /** + * @param db_name + * db name + * @param table_name + * table name + * @param user_name + * user name + * @param group_names + * group names + * @return + * @throws MetaException + * @throws TException + */ + public PrincipalPrivilegeSet get_table_privilege_set(String db_name, + String table_name, String user_name, List group_names) + throws MetaException, TException; + + /** + * @param db_name + * db name + * @param table_name + * table name + * @param part_name + * partition name + * @param user_name + * user name + * @param group_names + * group names + * @return + * @throws MetaException + * @throws TException + */ + public PrincipalPrivilegeSet get_partition_privilege_set(String db_name, + String table_name, String part_name, String user_name, + List group_names) throws MetaException, TException; + + /** + * @param db_name + * database name + * @param table_name + * table name + * @param part_name + * partition name + * @param column_name + * column name + * @param user_name + * user name + * @param group_names + * group names + * @return + * @throws MetaException + * @throws TException + */ + public PrincipalPrivilegeSet get_column_privilege_set(String db_name, + String table_name, String part_name, String column_name, + String user_name, List group_names) throws MetaException, + TException; + + /** + * @param role_name + * role name + * @param owner_name + * owner name + * @param db_name + * + * @return + * @throws MetaException + * @throws TException + */ + public boolean create_role(String role_name, String owner_name, String db_name) + throws MetaException, TException; + + /** + * @param role_name + * role name + * @param db_name + * + * @return + * @throws MetaException + * @throws TException + */ + public boolean drop_role(String role_name, String db_name) throws MetaException, TException; + + /** + * @param role_name + * role name + * @param user_name + * user name + * @param is_role + * is the given user name a role name + * @param is_group + * is the given user name a group name + * @param db_name + * + * @return + * @throws MetaException + * @throws TException + */ + public boolean add_role_member(String role_name, String user_name, + boolean is_role, boolean is_group, String db_name) throws MetaException, TException; + + /** + * @param role_name + * role name + * @param user_name + * user name + * @param is_role + * is the given user name a role + * @param is_group + * is the given group name a group + * @param db_name + * + * @return + * @throws MetaException + * @throws TException + */ + public boolean remove_role_member(String role_name, String user_name, + boolean is_role, boolean is_group, String db_name) throws MetaException, TException; + + /** + * @param principalName + * @param isRole + * @param isGroup + * @return + * @throws MetaException + * @throws TException + */ + public List list_roles(String principalName, boolean isRole, + boolean isGroup, String db_name) throws MetaException, TException; + + /** + * @param user_name + * user name + * @param is_role + * is the given user name a role + * @param is_group + * is the given user name a group + * @param privileges + * a bag of privilege - including user level, db level, table level, + * and column level + * @param grantor + * the name of the grantor + * @return + * @throws MetaException + * @throws TException + */ + public boolean grant_privileges(String user_name, boolean is_role, + boolean is_group, PrivilegeBag privileges, String grantor) + throws MetaException, TException; + + /** + * @param user_name + * user name + * @param is_role + * is the given user name a role + * @param is_group + * is the given user name a group + * @param privileges + * a bag of privileges + * @return + * @throws MetaException + * @throws TException + */ + public boolean revoke_privileges(String user_name, boolean is_role, + boolean is_group, PrivilegeBag privileges) throws MetaException, + TException; + + /** + * @param user_name + * user name + * @param is_role + * is the given user name a role + * @param is_group + * is the given user name a group + * @param remove_user_priv + * true if need to remove all user level privileges that were + * assigned the the given principal + * @param dbs + * a list of database on which all db level privileges for the given + * principal are going to be remove. + * @param tables + * a list of tables on which all table level privileges for the given + * principal are going to be removed. + * @param parts + * a list of partitions on on which all partition level privileges + * for the given principal are going to be removed. + * @param columns + * a list of columns on on which all column level privileges for the + * given principal are going to be removed. + * @return + * @throws MetaException + * @throws TException + */ + public boolean revoke_all_privileges(String user_name, boolean is_role, + boolean is_group, boolean remove_user_priv, List dbs, + List
tables, List parts, + Map> columns) throws MetaException, TException; + + /** + * @param principla_name + * @param is_role + * @param is_group + * @return + * @throws MetaException + * @throws TException + */ + public List list_security_user_grant(String principla_name, + boolean is_role, boolean is_group) throws MetaException, TException; + + /** + * @param principal_name + * @param is_group + * @param is_role + * @param db_name + * @return + * @throws MetaException + * @throws TException + */ + public List list_security_db_grant(String principal_name, + boolean is_group, boolean is_role, String db_name) throws MetaException, + TException; + + /** + * @param principal_name + * @param is_group + * @param is_role + * @param db_name + * @param table_name + * @return + * @throws MetaException + * @throws TException + */ + public List list_security_table_grant( + String principal_name, boolean is_group, boolean is_role, String db_name, + String table_name) throws MetaException, TException; + + /** + * @param principal_name + * @param is_group + * @param is_role + * @param db_name + * @param table_name + * @param part_name + * @return + * @throws MetaException + * @throws TException + */ + public List list_security_partition_grant( + String principal_name, boolean is_group, boolean is_role, String db_name, + String table_name, String part_name) throws MetaException, TException; + + /** + * @param principal_name + * @param is_group + * @param is_role + * @param db_name + * @param table_name + * @param column_name + * @return + * @throws MetaException + * @throws TException + */ + public List list_security_column_grant(String principal_name, + boolean is_group, boolean is_role, String db_name, String table_name, + String part_name, String column_name) throws MetaException, TException; } Index: metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (revision 1037574) +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (working copy) @@ -44,7 +44,9 @@ import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.common.FileUtils; import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.ColumnPrivilegeBag; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Index; @@ -53,6 +55,9 @@ import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Order; import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; import org.apache.hadoop.hive.metastore.api.SerDeInfo; import org.apache.hadoop.hive.metastore.api.StorageDescriptor; import org.apache.hadoop.hive.metastore.api.Table; @@ -62,6 +67,12 @@ import org.apache.hadoop.hive.metastore.model.MIndex; import org.apache.hadoop.hive.metastore.model.MOrder; import org.apache.hadoop.hive.metastore.model.MPartition; +import org.apache.hadoop.hive.metastore.model.MSecurityColumn; +import org.apache.hadoop.hive.metastore.model.MSecurityDB; +import org.apache.hadoop.hive.metastore.model.MSecurityRoleEntity; +import org.apache.hadoop.hive.metastore.model.MSecurityTablePartition; +import org.apache.hadoop.hive.metastore.model.MSecurityUser; +import org.apache.hadoop.hive.metastore.model.MSecurityUserRoleMap; import org.apache.hadoop.hive.metastore.model.MSerDeInfo; import org.apache.hadoop.hive.metastore.model.MStorageDescriptor; import org.apache.hadoop.hive.metastore.model.MTable; @@ -520,6 +531,51 @@ openTransaction(); MTable mtbl = convertToMTable(tbl); pm.makePersistent(mtbl); + PrincipalPrivilegeSet principalPrivs = tbl.getPrivileges(); + List toPersistPrivObjs = new ArrayList(); + if (principalPrivs != null) { + int now = (int)(System.currentTimeMillis()/1000); + Map userPrivs = principalPrivs.getUserPrivileges(); + if (userPrivs != null) { + for (Map.Entry entry: userPrivs.entrySet()) { + String principalName = entry.getKey(); + String privStr = entry.getValue(); + if (privStr == null) { + continue; + } + MSecurityTablePartition mTblSec = new MSecurityTablePartition( + principalName, false, false, mtbl, null, privStr, now, null); + toPersistPrivObjs.add(mTblSec); + } + } + Map groupPrivs = principalPrivs.getGroupPrivileges(); + if (groupPrivs != null) { + for (Map.Entry entry: groupPrivs.entrySet()) { + String principalName = entry.getKey(); + String privStr = entry.getValue(); + if (privStr == null) { + continue; + } + MSecurityTablePartition mTblSec = new MSecurityTablePartition( + principalName, false, true, mtbl, null, privStr, now, null); + toPersistPrivObjs.add(mTblSec); + } + } + Map rolePrivs = principalPrivs.getRolePrivileges(); + if (rolePrivs != null) { + for (Map.Entry entry: rolePrivs.entrySet()) { + String principalName = entry.getKey(); + String privStr = entry.getValue(); + if (privStr == null) { + continue; + } + MSecurityTablePartition mTblSec = new MSecurityTablePartition( + principalName, true, false, mtbl, null, privStr, now, null); + toPersistPrivObjs.add(mTblSec); + } + } + } + pm.makePersistentAll(toPersistPrivObjs); commited = commitTransaction(); } finally { if (!commited) { @@ -536,6 +592,16 @@ pm.retrieve(tbl); if (tbl != null) { // first remove all the partitions + List tabParts = listMSecurityTablePart(dbName, + tableName, false); + if (tabParts != null && tabParts.size() > 0) { + pm.deletePersistentAll(tabParts); + } + List colGrants = listMSecurityTablePartColumn(dbName, + tableName, false); + if (colGrants != null && colGrants.size() > 0) { + pm.deletePersistentAll(colGrants); + } pm.deletePersistentAll(listMPartitions(dbName, tableName, -1)); // then remove the table pm.deletePersistent(tbl); @@ -548,7 +614,7 @@ } return success; } - + public Table getTable(String dbName, String tableName) throws MetaException { boolean commited = false; Table tbl = null; @@ -651,7 +717,7 @@ .getRetention(), convertToStorageDescriptor(mtbl.getSd()), convertToFieldSchemas(mtbl.getPartitionKeys()), mtbl.getParameters(), mtbl.getViewOriginalText(), mtbl.getViewExpandedText(), - tableType); + tableType, null); } private MTable convertToMTable(Table tbl) throws InvalidObjectException, @@ -784,9 +850,39 @@ boolean success = false; boolean commited = false; try { + List tabGrants = this.listMSecurityTablePart(part + .getDbName(), part.getTableName(), true); + List tabColumnGrants = this.listMSecurityTablePartColumn( + part.getDbName(), part.getTableName(), true); openTransaction(); MPartition mpart = convertToMPart(part); pm.makePersistent(mpart); + + int now = (int)(System.currentTimeMillis()/1000); + List toPersist = new ArrayList(); + if (tabGrants != null) { + for (MSecurityTablePartition tab: tabGrants) { + MSecurityTablePartition partGrant = new MSecurityTablePartition(tab + .getPrincipalName(), tab.getIsRole(), tab.getIsGroup(), tab + .getTable(), mpart, tab.getPrivileges(), now, tab.getGrantor()); + toPersist.add(partGrant); + } + } + + if (tabColumnGrants != null) { + for (MSecurityColumn col : tabColumnGrants) { + MSecurityColumn partColumn = new MSecurityColumn(col + .getPrincipalName(), col.getIsRole(), col.getIsGroup(), col + .getTable(), mpart, col.getColumnName(), col.getPrivileges(), + now, col.getGrantor()); + toPersist.add(partColumn); + } + + if (toPersist.size() > 0) { + pm.makePersistentAll(toPersist); + } + } + commited = commitTransaction(); success = true; } finally { @@ -803,8 +899,31 @@ Partition part = convertToPart(getMPartition(dbName, tableName, part_vals)); commitTransaction(); if(part == null) { - throw new NoSuchObjectException(); + throw new NoSuchObjectException("partition values=" + + part_vals.toString()); + } + return part; + } + + @Override + public Partition getPartitionWithAuth(String dbName, String tblName, + List partVals, String user_name, List group_names) + throws NoSuchObjectException, MetaException, InvalidObjectException { + openTransaction(); + MPartition mpart = getMPartition(dbName, tblName, partVals); + if (mpart == null) { + commitTransaction(); + throw new NoSuchObjectException("partition values=" + partVals.toString()); } + Partition part = null; + MTable mtbl = mpart.getTable(); + part = convertToPart(mpart); + String partName = Warehouse.makePartName(this.convertToFieldSchemas(mtbl + .getPartitionKeys()), partVals); + commitTransaction(); + PrincipalPrivilegeSet partAuth = this.getPartitionPrivilegeSet(dbName, + tblName, partName, user_name, group_names); + part.setPrivileges(partAuth); return part; } @@ -863,7 +982,7 @@ return new Partition(mpart.getValues(), mpart.getTable().getDatabase() .getName(), mpart.getTable().getTableName(), mpart.getCreateTime(), mpart.getLastAccessTime(), convertToStorageDescriptor(mpart.getSd()), - mpart.getParameters()); + mpart.getParameters(), null); } public boolean dropPartition(String dbName, String tableName, @@ -873,6 +992,26 @@ openTransaction(); MPartition part = getMPartition(dbName, tableName, part_vals); if (part != null) { + List schemas = part.getTable().getPartitionKeys(); + List colNames = new ArrayList(); + for (MFieldSchema col: schemas) { + colNames.add(col.getName()); + } + String partName = FileUtils.makePartName(colNames, part_vals); + + List partGrants = listMSecurityPartition( + dbName, tableName, partName); + + if (partGrants != null && partGrants.size() > 0) { + pm.deletePersistentAll(partGrants); + } + + List partColumnGrants = listMSecurityPartitionColumn( + dbName, tableName, partName); + if (partColumnGrants != null && partColumnGrants.size() > 0) { + pm.deletePersistentAll(partColumnGrants); + } + pm.deletePersistent(part); } success = commitTransaction(); @@ -892,6 +1031,29 @@ commitTransaction(); return parts; } + + @Override + public List getPartitionsWithAuth(String dbName, String tblName, + short maxParts, String userName, List groupNames) + throws MetaException, NoSuchObjectException, InvalidObjectException { + openTransaction(); + List mparts = listMPartitions(dbName, tblName, maxParts); + List parts = new ArrayList(mparts.size()); + if (mparts != null && mparts.size()>0) { + for (MPartition mpart : mparts) { + MTable mtbl = mpart.getTable(); + Partition part = convertToPart(mpart); + String partName = Warehouse.makePartName(this.convertToFieldSchemas(mtbl + .getPartitionKeys()), part.getValues()); + PrincipalPrivilegeSet partAuth = this.getPartitionPrivilegeSet(dbName, + tblName, partName, userName, groupNames); + part.setPrivileges(partAuth); + } + } + commitTransaction(); + return parts; + } + private List convertToParts(List mparts) throws MetaException { @@ -1426,4 +1588,1274 @@ } return pns; } + + @Override + public boolean addRole(String roleName, String ownerName, String dbName) + throws InvalidObjectException, MetaException, NoSuchObjectException { + boolean success = false; + boolean commited = false; + try { + openTransaction(); + MDatabase db = this.getMDatabase(dbName); + MSecurityRoleEntity nameCheck = this.getMRole(roleName, dbName); + if (nameCheck != null) { + throw new RuntimeException("Role " + roleName + " already exists."); + } + int now = (int)(System.currentTimeMillis()/1000); + MSecurityRoleEntity mRole = new MSecurityRoleEntity(roleName, now, + ownerName, db); + pm.makePersistent(mRole); + commited = commitTransaction(); + success = true; + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return success; + } + + @Override + public boolean addRoleMember(Role role, String userName, boolean isRole, + boolean isGroup) throws MetaException, NoSuchObjectException { + boolean success = false; + boolean commited = false; + try { + MSecurityUserRoleMap roleMap = null; + try { + roleMap = this.getMSecurityUserRoleMap(userName, isRole, isGroup, role + .getRoleName(), role.getDatabase().getName()); + } catch (Exception e) { + e.printStackTrace(); + } + if (roleMap != null) { + throw new RuntimeException("Principal " + userName + + " already has the role " + role.getRoleName()); + } + openTransaction(); + MSecurityRoleEntity mRole = getMRole(role.getRoleName(), role + .getDatabase().getName()); + long now = System.currentTimeMillis()/1000; + MSecurityUserRoleMap roleMember = new MSecurityUserRoleMap(userName, + isRole, isGroup, mRole, (int) now); + pm.makePersistent(roleMember); + commited = commitTransaction(); + success = true; + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return success; + } + + @Override + public boolean removeRoleMember(Role role, String userName, boolean isRole, + boolean isGroup) throws MetaException, NoSuchObjectException { + boolean success = false; + try { + openTransaction(); + MSecurityUserRoleMap roleMember = getMSecurityUserRoleMap(userName, + isRole, isGroup, role.getRoleName(), role.getDatabase().getName()); + pm.deletePersistent(roleMember); + success = commitTransaction(); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return success; + } + + private MSecurityUserRoleMap getMSecurityUserRoleMap(String userName, + boolean isRole, boolean isGroup, String roleName, String dbName) { + MSecurityUserRoleMap mRoleMember = null; + boolean commited = false; + try { + openTransaction(); + Query query = pm.newQuery(MSecurityUserRoleMap.class, "principalName == t1 && isRole==t2 && isGroup == t3 && role.roleName == t4 && role.database.name == t5"); + query.declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4, java.lang.String t5"); + query.setUnique(true); + mRoleMember = (MSecurityUserRoleMap) query.executeWithArray(userName, isRole, isGroup, roleName, dbName); + pm.retrieve(mRoleMember); + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return mRoleMember; + } + + @Override + public boolean removeRole(String roleName, String dbName) throws MetaException, + NoSuchObjectException { + boolean success = false; + try { + openTransaction(); + MSecurityRoleEntity mRol = getMRole(roleName, dbName); + pm.retrieve(mRol); + if (mRol != null) { + // first remove all the membership, the membership that this role has + // been granted + List roleMap = listMSecurityUserRoleMember(mRol); + if (roleMap.size() > 0) { + pm.deletePersistentAll(roleMap); + } + List roleMember = listMSecurityPrincipalMembershipRole( + mRol.getRoleName(), true, false); + if (roleMember.size() > 0) { + pm.deletePersistentAll(roleMember); + } + // then remove all the grants + List userGrants = listMSecurityPrincipalUserGrant( + mRol.getRoleName(), true, false); + if (userGrants.size() > 0) { + pm.deletePersistentAll(userGrants); + } + List dbGrants = listAllMSecurityPrincipalDBGrant( + mRol.getRoleName(), true, false); + if (dbGrants.size() > 0) { + pm.deletePersistentAll(dbGrants); + } + List tabPartGrants = listAllMSecurityPrincipalTablePartGrant( + mRol.getRoleName(), true, false); + if (tabPartGrants.size() > 0) { + pm.deletePersistentAll(tabPartGrants); + } + List columnGrants = listAllMSecurityPrincipalColumnGrant( + mRol.getRoleName(), true, false); + if (columnGrants.size() > 0) { + pm.deletePersistentAll(columnGrants); + } + // last remove the role + pm.deletePersistent(mRol); + } + success = commitTransaction(); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return success; + } + + private List listRoles(String userName, + List groupNames, String databaseName) { + List ret = new ArrayList(); + if(userName != null) { + ret.addAll(listRoles(userName, false, false, databaseName)); + } + if (groupNames != null) { + for (String groupName: groupNames) { + ret.addAll(listRoles(groupName, false, true, databaseName)); + } + } + return ret; + } + + @SuppressWarnings("unchecked") + public List listRoles(String principalName, + boolean isRole, boolean isGroup, String databaseName) { + boolean success = false; + List mRoleMember = null; + try { + openTransaction(); + LOG.debug("Executing listRoles"); + Query query = pm + .newQuery( + MSecurityUserRoleMap.class, + "principalName == t1 && isGroup == t2 && isRole == t3 && role.database.name == t4"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4"); + query.setUnique(false); + mRoleMember = (List) query.executeWithArray( + principalName, isGroup, isRole, databaseName); + LOG.debug("Done executing query for listMSecurityUserRoleMap"); + pm.retrieveAll(mRoleMember); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityUserRoleMap"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mRoleMember; + } + + + @SuppressWarnings("unchecked") + private List listMSecurityPrincipalMembershipRole(final String roleName, + final boolean isRole, final boolean isGroup) { + boolean success = false; + List mRoleMemebership = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalMembershipRole"); + Query query = pm.newQuery(MSecurityUserRoleMap.class, + "principalName == t1 && isRole == t2 && isGroup == t3"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3"); + mRoleMemebership = (List) query.execute(roleName, + isRole, isGroup); + LOG + .debug("Done executing query for listMSecurityPrincipalMembershipRole"); + pm.retrieveAll(mRoleMemebership); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listMSecurityPrincipalMembershipRole"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mRoleMemebership; + } + + public Role getRole(String roleName, String dbName) throws NoSuchObjectException { + MSecurityRoleEntity mRole = this.getMRole(roleName, dbName); + if (mRole == null) { + throw new NoSuchObjectException(roleName + " role can not be found."); + } + Role ret = new Role(mRole.getRoleName(), this.getDatabase(mRole + .getDatabase().getName()), mRole.getCreateTime(), mRole.getOwnerName()); + return ret; + } + + private MSecurityRoleEntity getMRole(String roleName, String dbName) { + MSecurityRoleEntity mrole = null; + boolean commited = false; + try { + openTransaction(); + Query query = pm.newQuery(MSecurityRoleEntity.class, "roleName == t1 && database.name == t2"); + query.declareParameters("java.lang.String t1, java.lang.String t2"); + query.setUnique(true); + mrole = (MSecurityRoleEntity) query.execute(roleName, dbName); + pm.retrieve(mrole); + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return mrole; + } + + @Override + public PrincipalPrivilegeSet getUserPrivilegeSet(String userName, + List groupNames) throws InvalidObjectException, MetaException { + boolean commited = false; + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + List user = this.listMSecurityPrincipalUserGrant(userName, false, false); + if(user.size()>0) { + Map userPriv = new HashMap(); + String userPrivStr = user.get(0).getPrivileges(); + for (int i = 1; i < user.size(); i++) { + userPrivStr = userPrivStr + ";" + user.get(i).getPrivileges(); + } + userPriv.put(userName, userPrivStr); + ret.setUserPrivileges(userPriv); + } + } + if (groupNames != null && groupNames.size() > 0) { + Map groupPriv = new HashMap(); + for(String groupName: groupNames) { + List group = this.listMSecurityPrincipalUserGrant(groupName, false, true); + if(group.size()>0) { + String groupPrivStr = group.get(0).getPrivileges(); + for (int i = 1; i < group.size(); i++) { + groupPrivStr = groupPrivStr + ";" + group.get(i).getPrivileges(); + } + groupPriv.put(groupName, groupPrivStr); + } + } + ret.setGroupPrivileges(groupPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + @Override + public PrincipalPrivilegeSet getDBPrivilegeSet(String dbName, + String userName, List groupNames) throws InvalidObjectException, + MetaException { + boolean commited = false; + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + Map userDbPriv = new HashMap(); + userDbPriv.put(userName, getDBPrivilege(dbName, userName, false, false)); + ret.setUserPrivileges(userDbPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map groupDbPriv = new HashMap(); + for (String groupName : groupNames) { + groupDbPriv.put(groupName, getDBPrivilege(dbName, groupName, false, + true)); + } + ret.setGroupPrivileges(groupDbPriv); + } + List roles = listRoles(userName, groupNames, dbName); + if (roles != null && roles.size() > 0) { + Map roleDbPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String name = role.getRole().getRoleName(); + roleDbPriv.put(name, getDBPrivilege(dbName, name, true, false)); + } + ret.setRolePrivileges(roleDbPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + @Override + public PrincipalPrivilegeSet getPartitionPrivilegeSet(String dbName, + String tableName, String partition, String userName, + List groupNames) throws InvalidObjectException, MetaException { + boolean commited = false; + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + Map userPartitionPriv = new HashMap(); + userPartitionPriv.put(userName, getPartitionPrivilege(dbName, + tableName, partition, userName, false, false)); + ret.setUserPrivileges(userPartitionPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map groupPartitionPriv = new HashMap(); + for (String groupName : groupNames) { + groupPartitionPriv.put(groupName, getPartitionPrivilege(dbName, tableName, + partition, groupName, false, true)); + } + ret.setGroupPrivileges(groupPartitionPriv); + } + List roles = listRoles(userName, groupNames, dbName); + if (roles != null && roles.size() > 0) { + Map rolePartPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String roleName = role.getRole().getRoleName(); + rolePartPriv.put(roleName, getPartitionPrivilege(dbName, tableName, + partition, roleName, true, false)); + } + ret.setRolePrivileges(rolePartPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + @Override + public PrincipalPrivilegeSet getTablePrivilegeSet(String dbName, + String tableName, String userName, List groupNames) + throws InvalidObjectException, MetaException { + boolean commited = false; + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + Map userPartitionPriv = new HashMap(); + userPartitionPriv.put(userName, getTablePrivilege(dbName, + tableName, userName, false, false)); + ret.setUserPrivileges(userPartitionPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map groupPartitionPriv = new HashMap(); + for (String groupName : groupNames) { + groupPartitionPriv.put(groupName, getTablePrivilege(dbName, tableName, + groupName, false, true)); + } + ret.setGroupPrivileges(groupPartitionPriv); + } + List roles = listRoles(userName, groupNames, dbName); + if (roles != null && roles.size() > 0) { + Map rolePartPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String roleName = role.getRole().getRoleName(); + rolePartPriv.put(roleName, getTablePrivilege(dbName, tableName, + roleName, true, false)); + } + ret.setRolePrivileges(rolePartPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + @Override + public PrincipalPrivilegeSet getColumnPrivilegeSet(String dbName, + String tableName, String partitionName, String columnName, + String userName, List groupNames) throws InvalidObjectException, + MetaException { + boolean commited = false; + PrincipalPrivilegeSet ret = new PrincipalPrivilegeSet(); + try { + openTransaction(); + if (userName != null) { + Map userPartitionPriv = new HashMap(); + userPartitionPriv.put(userName, getColumnPrivilege(dbName, tableName, + columnName, partitionName, userName, false, false)); + ret.setUserPrivileges(userPartitionPriv); + } + if (groupNames != null && groupNames.size() > 0) { + Map groupPartitionPriv = new HashMap(); + for (String groupName : groupNames) { + groupPartitionPriv.put(groupName, getColumnPrivilege(dbName, + tableName, columnName, partitionName, groupName, false, true)); + } + ret.setGroupPrivileges(groupPartitionPriv); + } + List roles = listRoles(userName, groupNames, dbName); + if (roles != null && roles.size() > 0) { + Map rolePartPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String roleName = role.getRole().getRoleName(); + rolePartPriv.put(roleName, getColumnPrivilege(dbName, tableName, + columnName, partitionName, roleName, true, false)); + } + ret.setRolePrivileges(rolePartPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return ret; + } + + @Override + public boolean grantPrivileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges, String grantor) + throws InvalidObjectException, MetaException, NoSuchObjectException { + boolean committed = false; + int now = (int)(System.currentTimeMillis()/1000); + try { + openTransaction(); + List persistentObjs = new ArrayList(); + + String userPrivs = privileges.getUserPrivileges(); + if (userPrivs != null) { + MSecurityUser mDb = new MSecurityUser(userName, isRole, isGroup, + userPrivs, now, grantor); + persistentObjs.add(mDb); + } + + Map dbPrivs = privileges.getDbPrivileges(); + if (dbPrivs != null) { + for (Map.Entry db : dbPrivs.entrySet()) { + MDatabase dbObj = getMDatabase(db.getKey().getName()); + if (dbObj != null) { + MSecurityDB mDb = new MSecurityDB(userName, isRole, isGroup, dbObj, + db.getValue(), now, grantor); + persistentObjs.add(mDb); + } + } + } + + Map tablePriv = privileges.getTablePrivileges(); + if (tablePriv != null) { + for (Map.Entry table : tablePriv.entrySet()) { + MTable tblObj = getMTable(table.getKey().getDbName(), table.getKey() + .getTableName()); + if (tblObj != null) { + MSecurityTablePartition mTab = new MSecurityTablePartition( + userName, isRole, isGroup, tblObj, null, table.getValue(), now, + grantor); + persistentObjs.add(mTab); + } + } + } + + Map partitionPriv = privileges.getPartitionPrivileges(); + if (partitionPriv != null) { + for (Map.Entry part : partitionPriv.entrySet()) { + Partition partObj = part.getKey(); + MPartition tblObj = this.getMPartition(partObj.getDbName(), partObj + .getTableName(), partObj.getValues()); + if (tblObj != null) { + MSecurityTablePartition mTab = new MSecurityTablePartition( + userName, isRole, isGroup, tblObj.getTable(), tblObj, part + .getValue(), now, grantor); + persistentObjs.add(mTab); + } + } + } + + List columnPriv = privileges.getColumnPrivileges(); + if (columnPriv != null) { + for (ColumnPrivilegeBag col : columnPriv) { + Map columnMap = col.getColumnPrivileges(); + MTable tblObj = getMTable(col.getDbName(), col.getTableName()); + if (columnMap != null && tblObj != null) { + for (Map.Entry colPriv : columnMap.entrySet()) { + MSecurityColumn mCol = new MSecurityColumn(userName, isRole, + isGroup, tblObj, null, colPriv.getKey(), colPriv.getValue(), now, + grantor); + persistentObjs.add(mCol); + } + } + } + } + if (persistentObjs.size() > 0) { + pm.makePersistentAll(persistentObjs); + } + committed = commitTransaction(); + } finally { + if (!committed) { + rollbackTransaction(); + } + } + return committed; + } + + public boolean revokeAllPrivileges(String userName, boolean isRole, + boolean isGroup, boolean removeUserPriv, List dbs, + List
tables, List parts, + Map> columns) throws MetaException { + boolean committed = false; + try { + openTransaction(); + List persistentObjs = new ArrayList(); + if (removeUserPriv) { + List mSecUser = this.listMSecurityPrincipalUserGrant( + userName, isRole, isGroup); + if (mSecUser != null) { + persistentObjs.addAll(persistentObjs); + } + } + + if (dbs != null) { + for (Database db : dbs) { + List dbGrants = this.listMSecurityPrincipalDBGrant( + userName, isGroup, isRole, db.getName()); + persistentObjs.addAll(dbGrants); + } + } + + if(tables != null) { + for (Table tab : tables) { + List tabGrants = + this.listMSecurityPrincipalTableGrant(userName, isGroup, isRole, + tab.getDbName(), tab.getTableName()); + persistentObjs.addAll(tabGrants); + } + } + + if(parts != null) { + for (Partition part : parts) { + Table tabObj = this.getTable(part.getDbName(), part.getTableName()); + List partGrants = this + .listMSecurityPrincipalPartitionGrant(userName, isGroup, isRole, + part.getDbName(), part.getTableName(), + Warehouse.makePartName(tabObj.getPartitionKeys(), part.getValues())); + persistentObjs.addAll(partGrants); + } + } + + if(columns != null) { + for (Map.Entry> tableColMap : columns.entrySet()){ + Table table = tableColMap.getKey(); + List colList = tableColMap.getValue(); + for(String col : colList) { + List secCol = this.listMSecurityPrincipalTableColumnGrant(userName, isGroup, isRole, + table.getDbName(), table.getTableName(), col, false); + persistentObjs.addAll(secCol); + } + } + } + + if (persistentObjs.size() > 0) { + pm.deletePersistentAll(persistentObjs); + } + committed = commitTransaction(); + } finally { + if (!committed) { + rollbackTransaction(); + } + } + return committed; + } + + + @Override + public boolean revokePrivileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges) throws InvalidObjectException, + MetaException { + boolean committed = false; + try { + openTransaction(); + List persistentObjs = new ArrayList(); + String userPriv = privileges.getUserPrivileges(); + if (userPriv != null && !userPriv.trim().equals("")) { + List mSecUser = this.listMSecurityPrincipalUserGrant( + userName, isRole, isGroup); + boolean found = false; + if (mSecUser != null) { + String[] userPrivArray = userPriv.split(","); + for (MSecurityUser userGrant : mSecUser) { + String[] userGrantArray = userGrant.getPrivileges().split(","); + if (stringArrayEqualsIgnoreOrder(userPrivArray, userGrantArray)) { + found = true; + persistentObjs.add(userGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException( + "No user grant found for privileges " + userPriv); + } + } + } + + Map dbPrivileges = privileges.getDbPrivileges(); + if (dbPrivileges != null) { + for (Map.Entry dbPriv : dbPrivileges.entrySet()) { + Database db = dbPriv.getKey(); + String dbPrivStr = dbPriv.getValue(); + boolean found = false; + String[] dbPrivArray = dbPrivStr.split(","); + List dbGrants = this.listMSecurityPrincipalDBGrant( + userName, isGroup, isRole, db.getName()); + for (MSecurityDB dbGrant : dbGrants) { + String[] privStrArray = dbGrant.getPrivileges().split(","); + if (stringArrayEqualsIgnoreOrder(dbPrivArray, privStrArray)) { + found = true; + persistentObjs.add(dbGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException( + "No database grant found for privileges " + dbPrivStr + + " on database " + db.getName()); + } + } + } + + Map tablePrivileges = privileges.getTablePrivileges(); + if (tablePrivileges != null) { + for (Map.Entry tabPriv : tablePrivileges.entrySet()) { + Table table = tabPriv.getKey(); + String tblPrivStr = tabPriv.getValue(); + boolean found = false; + String[] tablePrivArray = tblPrivStr.split(","); + List tableGrants = + this.listMSecurityPrincipalTableGrant(userName, isGroup, isRole, + table.getDbName(), table.getTableName()); + for (MSecurityTablePartition tabGrant : tableGrants) { + String[] privStrArray = tabGrant.getPrivileges().split(","); + if (stringArrayEqualsIgnoreOrder(privStrArray, tablePrivArray)) { + found = true; + persistentObjs.add(tabGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException("No grant (" + tblPrivStr + + ") found " + " on table " + table.getTableName() + + ", database is " + table.getDbName()); + } + } + } + + Map partPrivileges = privileges + .getPartitionPrivileges(); + if (partPrivileges != null) { + for (Map.Entry partPriv : partPrivileges.entrySet()) { + Partition part = partPriv.getKey(); + String partPrivStr = partPriv.getValue(); + boolean found = false; + String[] partPrivArray = partPrivStr.split(","); + Table tabObj = this.getTable(part.getDbName(), part.getTableName()); + List partitionGrants = this + .listMSecurityPrincipalPartitionGrant(userName, isGroup, isRole, + part.getDbName(), part.getTableName(), + Warehouse.makePartName(tabObj.getPartitionKeys(), part + .getValues())); + for (MSecurityTablePartition tabGrant : partitionGrants) { + String[] privStrArray = tabGrant.getPrivileges().split(","); + if (stringArrayEqualsIgnoreOrder(privStrArray, partPrivArray)) { + found = true; + persistentObjs.add(tabGrant); + break; + } + } + if (!found) { + throw new InvalidObjectException("No grant (" + partPrivStr + + ") found " + " on table " + tabObj.getTableName() + + ", database is " + tabObj.getDbName()); + } + } + } + + List columnPrivileges = privileges + .getColumnPrivileges(); + if (columnPrivileges != null) { + for (ColumnPrivilegeBag colPriv : columnPrivileges) { + String dbName = colPriv.getDbName(); + String tabName = colPriv.getTableName(); + String partName = colPriv.getPartitionName(); + Map colPrivMap = colPriv.getColumnPrivileges(); + for (Map.Entry column : colPrivMap.entrySet()) { + List mSecCol = listMSecurityTabOrPartColumnGrant(userName, + isRole, isGroup, dbName, tabName, partName, column.getKey()); + boolean found = false; + if (mSecCol != null) { + String[] toBeMatched = column.getValue().split(","); + for (MSecurityColumn col : mSecCol) { + String[] candicate = col.getPrivileges().split(","); + if (stringArrayEqualsIgnoreOrder(candicate, toBeMatched)) { + found = true; + persistentObjs.add(col); + break; + } + } + if (!found) { + throw new InvalidObjectException("No grant (" + column + + ") found " + " on column " + column.getKey() + " table " + + tabName + ", database is " + dbName); + } + } + } + } + } + if (persistentObjs.size() > 0) { + pm.deletePersistentAll(persistentObjs); + } + committed = commitTransaction(); + } finally { + if (!committed) { + rollbackTransaction(); + } + } + return committed; + } + + private boolean stringArrayEqualsIgnoreOrder(String[] o1, String[] o2) { + if (o1 == o2) { + return true; + } + if (o1 != null && o2 != null) { + for (int i = 0; i < o1.length; i++) { + boolean found = false; + for (int j = 0; j < o2.length; j++) { + if (o1[i].equalsIgnoreCase(o2[j])) { + found = true; + break; + } + } + + if (!found) { + return false; + } + } + return true; + } else { + return false; + } + } + + public String getDBPrivilege(String dbName, + String principalName, boolean isRole, boolean isGroup) + throws InvalidObjectException, MetaException { + String privileges = null; + if (principalName != null) { + List userNameDbPriv = this.listMSecurityPrincipalDBGrant( + principalName, isGroup, isRole, dbName); + if (userNameDbPriv != null && userNameDbPriv.size() > 0) { + privileges = userNameDbPriv.get(0).getPrivileges(); + for (int i = 1; i < userNameDbPriv.size(); i++) { + privileges = privileges + "," + + userNameDbPriv.get(i).getPrivileges(); + } + } + } + return privileges; + } + + private String getTablePrivilege(String dbName, String tableName, + String principalName, boolean isRole, boolean isGroup) { + String privileges = null; + if (principalName != null) { + List userNameTabPartPriv = this + .listMSecurityPrincipalTableGrant(principalName, isGroup, isRole, + dbName, tableName); + if (userNameTabPartPriv != null && userNameTabPartPriv.size() > 0) { + privileges = userNameTabPartPriv.get(0).getPrivileges(); + for (int i = 1; i < userNameTabPartPriv.size(); i++) { + privileges = privileges + "," + + userNameTabPartPriv.get(i).getPrivileges(); + } + } + } + return privileges; + } + + private String getPartitionPrivilege(String dbName, String tableName, + String partName, String principalName, boolean isRole, boolean isGroup) { + String privileges = null; + if (principalName != null) { + List userNameTabPartPriv = this + .listMSecurityPrincipalPartitionGrant(principalName, isGroup, isRole, + dbName, tableName, partName); + if (userNameTabPartPriv != null && userNameTabPartPriv.size() > 0) { + privileges = userNameTabPartPriv.get(0).getPrivileges(); + for (int i = 1; i < userNameTabPartPriv.size(); i++) { + privileges = privileges + "," + + userNameTabPartPriv.get(i).getPrivileges(); + } + } + } + return privileges; + } + + private String getColumnPrivilege(String dbName, String tableName, + String columnName, String partitionName, String principalName, boolean isRole, boolean isGroup) { + String privileges = null; + List userNameTabPartPriv = null; + if (partitionName == null) { + userNameTabPartPriv = this.listMSecurityPrincipalTableColumnGrant( + principalName, isGroup, isRole, dbName, tableName, columnName, true); + } else { + userNameTabPartPriv = this.listMSecurityPrincipalPartitionColumnGrant( + principalName, isGroup, isRole, dbName, tableName, partitionName, + columnName); + } + if (userNameTabPartPriv != null && userNameTabPartPriv.size() > 0) { + privileges = userNameTabPartPriv.get(0).getPrivileges(); + for (int i = 1; i < userNameTabPartPriv.size(); i++) { + privileges = privileges + "," + + userNameTabPartPriv.get(i).getPrivileges(); + } + } + return privileges; + } + + @SuppressWarnings("unchecked") + private List listMSecurityUserRoleMember( + MSecurityRoleEntity mRol) { + boolean success = false; + List mRoleMemeberList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityUserRoleMember"); + Query query = pm.newQuery(MSecurityUserRoleMap.class, + "role.roleName == t1"); + query.declareParameters("java.lang.String t1"); + query.setUnique(false); + mRoleMemeberList = (List) query.execute( + mRol.getRoleName()); + LOG.debug("Done executing query for listMSecurityUserRoleMember"); + pm.retrieveAll(mRoleMemeberList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityUserRoleMember"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mRoleMemeberList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalUserGrant(String principlaName, + boolean isRole, boolean isGroup) { + boolean commited = false; + List userNameDbPriv = null; + try { + openTransaction(); + if (principlaName != null) { + Query query = pm.newQuery(MSecurityUser.class, + "principalName == t1 && isRole == t2 && isGroup== t3"); + query.declareParameters( + "java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3"); + userNameDbPriv = (List) query + .executeWithArray(principlaName, isRole, isGroup); + pm.retrieveAll(userNameDbPriv); + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return userNameDbPriv; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalDBGrant(String principalName, + boolean isGroup, boolean isRole, String dbName) { + boolean success = false; + List mSecurityDBList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalDBGrant"); + Query query = pm.newQuery(MSecurityDB.class, + "principalName == t1 && isGroup == t2 && isRole == t3 && database.name == t4"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4"); + mSecurityDBList = (List) query.executeWithArray(principalName, + isGroup, isRole, dbName); + LOG.debug("Done executing query for listMSecurityPrincipalDBGrant"); + pm.retrieveAll(mSecurityDBList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityPrincipalDBGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityDBList; + } + + @SuppressWarnings("unchecked") + private List listAllMSecurityPrincipalDBGrant(String principalName, + boolean isGroup, boolean isRole) { + boolean success = false; + List mSecurityDBList = null; + try { + openTransaction(); + LOG.debug("Executing listAllMSecurityPrincipalDBGrant"); + Query query = pm.newQuery(MSecurityDB.class, + "principalName == t1 && isGroup == t2 && isRole == t3"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3"); + mSecurityDBList = (List) query.execute(principalName, + isGroup, isRole); + LOG.debug("Done executing query for listAllMSecurityPrincipalDBGrant"); + pm.retrieveAll(mSecurityDBList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listAllMSecurityPrincipalDBGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityDBList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityTablePart(String dbName, + String tableName, boolean tableOnly) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityTable"); + String queryStr = "table.tableName == t1 && table.database.name == t2"; + if (tableOnly) { + queryStr = queryStr + " && partition == null"; + } + Query query = pm.newQuery( + MSecurityTablePartition.class, queryStr); + query.declareParameters( + "java.lang.String t1, java.lang.String t2"); + mSecurityTabPartList = (List) query + .executeWithArray(tableName, dbName); + LOG.debug("Done executing query for listMSecurityTable"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listMSecurityTable"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityTablePartColumn(String dbName, + String tableName, boolean tableOnly) { + boolean success = false; + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityTablePartColumn"); + String queryStr = "table.tableName == t1 && table.database.name == t2"; + if (tableOnly) { + queryStr = queryStr + " && partition == null"; + } + Query query = pm.newQuery(MSecurityColumn.class, queryStr); + query.declareParameters("java.lang.String t1, java.lang.String t2"); + mSecurityColList = (List) query + .executeWithArray(tableName, dbName); + LOG.debug("Done executing query for listMSecurityTablePartColumn"); + pm.retrieveAll(mSecurityColList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityTablePartColumn"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + @SuppressWarnings("unchecked") + private List listMSecurityPartition(String dbName, String tableName, + String partName) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityTablePartition"); + Query query = pm.newQuery(MSecurityTablePartition.class, + "table.tableName == t1 && table.database.name == t2 && partition.partitionName == t3"); + query.declareParameters( + "java.lang.String t1, java.lang.String t2, java.lang.String t3"); + mSecurityTabPartList = (List) query + .executeWithArray(tableName, dbName, partName); + LOG.debug("Done executing query for listMSecurityTablePartition"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityTablePartition"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPartitionColumn(String dbName, + String tableName, String partName) { + boolean success = false; + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPartitionColumn"); + Query query = pm.newQuery( + MSecurityColumn.class, + "table.tableName == t1 && table.database.name == t2 && partition.partitionName == t3"); + query.declareParameters( + "java.lang.String t1, java.lang.String t2, java.lang.String t3"); + mSecurityColList = (List) query + .executeWithArray(tableName, dbName, partName); + LOG.debug("Done executing query for listMSecurityPartitionColumn"); + pm.retrieveAll(mSecurityColList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityPartitionColumn"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalTableGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalTableGrant"); + Query query = pm.newQuery( + MSecurityTablePartition.class, + "principalName == t1 && isGroup == t2 && isRole == t3 && table.tableName == t4 && table.database.name == t5 && partition == null"); + query.declareParameters( + "java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4, java.lang.String t5"); + mSecurityTabPartList = (List) query + .executeWithArray(principalName, isGroup, isRole, tableName, dbName); + LOG.debug("Done executing query for listMSecurityPrincipalTableGrant"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listMSecurityPrincipalTableGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalPartitionGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partName) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalPartitionGrant"); + Query query = pm.newQuery( + MSecurityTablePartition.class, + "principalName == t1 && isGroup == t2 && isRole == t3 && table.tableName == t4 " + + "&& table.database.name == t5 && partition.partitionName == t6"); + query.declareParameters( + "java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4, java.lang.String t5, java.lang.String t6"); + mSecurityTabPartList = (List) query + .executeWithArray(principalName, isGroup, isRole, tableName, dbName, partName); + LOG.debug("Done executing query for listMSecurityPrincipalPartitionGrant"); + + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityPrincipalPartitionGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + @SuppressWarnings("unchecked") + private List listAllMSecurityPrincipalTablePartGrant( + String principalName, boolean isGroup, boolean isRole) { + boolean success = false; + List mSecurityTabPartList = null; + try { + openTransaction(); + LOG.debug("Executing listAllMSecurityPrincipalTablePartGrant"); + Query query = pm.newQuery(MSecurityTablePartition.class, + "principalName == t1 && isGroup == t2 && isRole == t3"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3"); + mSecurityTabPartList = (List) query.execute( + principalName, isGroup, isRole); + LOG.debug("Done executing query for listAllMSecurityPrincipalTablePartGrant"); + pm.retrieveAll(mSecurityTabPartList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listAllMSecurityPrincipalTablePartGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityTabPartList; + } + + public List listMSecurityTabOrPartColumnGrant(String userName, + boolean isRole, boolean isGroup, String dbName, String tabName, + String partName, String columnName) { + List mSecCol = null; + if (partName != null) { + mSecCol = this.listMSecurityPrincipalPartitionColumnGrant(userName, + isGroup, isRole, dbName, tabName, partName, columnName); + } else { + mSecCol = this.listMSecurityPrincipalTableColumnGrant(userName, isGroup, + isRole, dbName, tabName, columnName, true); + } + return mSecCol; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalTableColumnGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String columnName, boolean tableOnly) { + boolean success = false; + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalColumnGrant"); + String queryStr = "principalName == t1 && isGroup == t2 && isRole == t3 && " + + "table.tableName == t4 && table.database.name == t5 && columnName == t6 "; + if (tableOnly) { + queryStr = queryStr + " && partition == null"; + } + Query query = pm.newQuery(MSecurityColumn.class, queryStr); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4, java.lang.String t5, java.lang.String t6"); + mSecurityColList = (List) query.executeWithArray( + principalName, isGroup, isRole, tableName, dbName, columnName); + LOG.debug("Done executing query for listMSecurityPrincipalColumnGrant"); + pm.retrieveAll(mSecurityColList); + success = commitTransaction(); + LOG + .debug("Done retrieving all objects for listMSecurityPrincipalColumnGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalPartitionColumnGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partitionName, String columnName) { + boolean success = false; + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalPartitionColumnGrant"); + Query query = pm.newQuery( + MSecurityColumn.class, + "principalName == t1 && isGroup == t2 && isRole == t3 && table.tableName == t4 && table.database.name == t5 && " + + "partition.partitionName == t6 && columnName == t7"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4, java.lang.String t5, java.lang.String t6, java.lang.String t7"); + + mSecurityColList = (List) query.executeWithArray( + principalName, isGroup, isRole, tableName, dbName, partitionName, + columnName); + LOG.debug("Done executing query for listMSecurityPrincipalPartitionColumnGrant"); + pm.retrieveAll(mSecurityColList); + + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listMSecurityPrincipalPartitionColumnGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColList; + } + + @SuppressWarnings("unchecked") + private List listAllMSecurityPrincipalColumnGrant( + String principalName, boolean isGroup, boolean isRole) { + boolean success = false; + List mSecurityColumnList = null; + try { + openTransaction(); + LOG.debug("Executing listAllMSecurityPrincipalColumnGrant"); + Query query = pm.newQuery(MSecurityColumn.class, + "principalName == t1 && isGroup == t2 && isRole == t3"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3"); + mSecurityColumnList = (List) query.execute( + principalName, isGroup, isRole); + LOG.debug("Done executing query for listAllMSecurityPrincipalColumnGrant"); + pm.retrieveAll(mSecurityColumnList); + success = commitTransaction(); + LOG.debug("Done retrieving all objects for listAllMSecurityPrincipalColumnGrant"); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return mSecurityColumnList; + } + } Index: metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java (revision 1037574) +++ metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java (working copy) @@ -19,6 +19,7 @@ package org.apache.hadoop.hive.metastore; import java.util.List; +import java.util.Map; import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.hive.metastore.api.Database; @@ -27,8 +28,16 @@ import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.api.Type; +import org.apache.hadoop.hive.metastore.model.MSecurityColumn; +import org.apache.hadoop.hive.metastore.model.MSecurityDB; +import org.apache.hadoop.hive.metastore.model.MSecurityTablePartition; +import org.apache.hadoop.hive.metastore.model.MSecurityUser; +import org.apache.hadoop.hive.metastore.model.MSecurityUserRoleMap; public interface RawStore extends Configurable { @@ -131,5 +140,82 @@ public abstract List getPartitionsByFilter( String dbName, String tblName, String filter, short maxParts) throws MetaException, NoSuchObjectException; + + public abstract boolean addRole(String rowName, String ownerName, + String dbName) throws InvalidObjectException, MetaException, + NoSuchObjectException; + + public abstract boolean removeRole(String roleName, String dbName) throws MetaException, NoSuchObjectException; + + public abstract boolean addRoleMember(Role role, String userName, boolean isRole, boolean isGroup) + throws MetaException, NoSuchObjectException; + + public abstract boolean removeRoleMember(Role role, String userName, boolean isRole, boolean isGroup) + throws MetaException, NoSuchObjectException; + public abstract PrincipalPrivilegeSet getUserPrivilegeSet(String userName, + List groupNames) throws InvalidObjectException, MetaException; + + public abstract PrincipalPrivilegeSet getDBPrivilegeSet (String dbName, String userName, + List groupNames) throws InvalidObjectException, MetaException; + + public abstract PrincipalPrivilegeSet getTablePrivilegeSet (String dbName, String tableName, + String userName, List groupNames) throws InvalidObjectException, MetaException; + + public abstract PrincipalPrivilegeSet getPartitionPrivilegeSet (String dbName, String tableName, + String partition, String userName, List groupNames) throws InvalidObjectException, MetaException; + + public abstract PrincipalPrivilegeSet getColumnPrivilegeSet (String dbName, String tableName, String partitionName, + String columnName, String userName, List groupNames) throws InvalidObjectException, MetaException; + + public abstract List listMSecurityPrincipalUserGrant(String principlaName, + boolean isRole, boolean isGroup); + + public abstract List listMSecurityPrincipalDBGrant(String principalName, + boolean isGroup, boolean isRole, String dbName); + + public abstract List listMSecurityPrincipalTableGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName); + + public abstract List listMSecurityPrincipalPartitionGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partName); + + public List listMSecurityTabOrPartColumnGrant(String userName, + boolean isRole, boolean isGroup, String dbName, String tabName, + String partName, String column); + + public abstract List listMSecurityPrincipalTableColumnGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String columnName, boolean tableOnly); + + public abstract List listMSecurityPrincipalPartitionColumnGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partName, String columnName); + + public abstract boolean grantPrivileges (String userName, boolean isRole, boolean isGroup, PrivilegeBag privileges, String grantor) + throws InvalidObjectException, MetaException, NoSuchObjectException; + + public abstract boolean revokePrivileges (String userName, boolean isRole, boolean isGroup, PrivilegeBag privileges) + throws InvalidObjectException, MetaException; + + public abstract org.apache.hadoop.hive.metastore.api.Role getRole(String roleName, String dbName) throws NoSuchObjectException; + + public List listRoles(String principalName, + boolean isRole, boolean isGroup, String databaseName); + + public boolean revokeAllPrivileges(String userName, boolean isRole, + boolean isGroup, boolean removeUserPriv, List dbs, + List
tables, List parts, + Map> columns) throws MetaException; + + public abstract Partition getPartitionWithAuth(String dbName, String tblName, + List partVals, String user_name, List group_names) + throws MetaException, NoSuchObjectException, InvalidObjectException; + + public abstract List getPartitionsWithAuth(String dbName, + String tblName, short maxParts, String userName, List groupNames) + throws MetaException, NoSuchObjectException, InvalidObjectException;; + } Index: metastore/src/model/package.jdo =================================================================== --- metastore/src/model/package.jdo (revision 1037574) +++ metastore/src/model/package.jdo (working copy) @@ -250,7 +250,7 @@ - + @@ -345,5 +345,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityColumn.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityColumn.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityColumn.java (revision 0) @@ -0,0 +1,180 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +public class MSecurityColumn { + + private String principalName; + + private boolean isRole; + + private boolean isGroup; + + private MTable table; + + private MPartition partition; + + private String columnName; + + private String privileges; + + private int createTime; + + private String grantor; + + public MSecurityColumn() { + } + + /** + * @param principalName + * @param isRole + * @param isGroup + * @param table + * @param partition + * @param columnName + * @param privileges + * @param createTime + * @param grantor + */ + public MSecurityColumn(String principalName, boolean isRole, boolean isGroup, + MTable table, MPartition partition, String columnName, String privileges, int createTime, + String grantor) { + super(); + this.principalName = principalName; + this.isRole = isRole; + this.isGroup = isGroup; + this.table = table; + this.partition = partition; + this.columnName = columnName; + this.privileges = privileges; + this.createTime = createTime; + this.grantor = grantor; + } + + /** + * @return true if this user name is a role + */ + public boolean getIsRole() { + return isRole; + } + + /** + * @param isRole is this user name a role? + */ + public void setIsRole(boolean isRole) { + this.isRole = isRole; + } + + /** + * @return true if this user name is a group, false else + */ + public boolean getIsGroup() { + return isGroup; + } + + /** + * @param isGroup true if is this user name a group + */ + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + /** + * @return column name + */ + public String getColumnName() { + return columnName; + } + + /** + * @param columnName column name + */ + public void setColumnName(String columnName) { + this.columnName = columnName; + } + + /** + * @return a set of privileges this user/role/group has + */ + public String getPrivileges() { + return privileges; + } + + /** + * @param dbPrivileges a set of privileges this user/role/group has + */ + public void setPrivileges(String dbPrivileges) { + this.privileges = dbPrivileges; + } + + /** + * @return create time + */ + public int getCreateTime() { + return createTime; + } + + /** + * @param createTime create time + */ + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + public String getPrincipalName() { + return principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public MTable getTable() { + return table; + } + + public void setTable(MTable table) { + this.table = table; + } + + public MPartition getPartition() { + return partition; + } + + public void setPartition(MPartition partition) { + this.partition = partition; + } + + public void setRole(boolean isRole) { + this.isRole = isRole; + } + + public void setGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + public String getGrantor() { + return grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityDB.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityDB.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityDB.java (revision 0) @@ -0,0 +1,140 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +public class MSecurityDB { + + private String principalName; + + private boolean isRole; + + private boolean isGroup; + + private MDatabase database; + + private int createTime; + + private String privileges; + + private String grantor; + + public MSecurityDB() { + } + + public MSecurityDB(String principalName, boolean isRole, boolean isGroup, + MDatabase database, String dbPrivileges, int createTime, String grantor) { + super(); + this.principalName = principalName; + this.isRole = isRole; + this.isGroup = isGroup; + this.database = database; + this.privileges = dbPrivileges; + this.createTime = createTime; + this.grantor = grantor; + } + + /** + * @return user name, role name, or group name + */ + public String getPrincipalName() { + return principalName; + } + + /** + * @param userName user/role/group name + */ + public void setPrincipalName(String userName) { + this.principalName = userName; + } + + /** + * @return true if this user name is a role + */ + public boolean getIsRole() { + return isRole; + } + + /** + * @param isRole is this user name a role? + */ + public void setIsRole(boolean isRole) { + this.isRole = isRole; + } + + /** + * @return true if this user name is a group, false else + */ + public boolean getIsGroup() { + return isGroup; + } + + /** + * @param isGroup is this user name a group + */ + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + /** + * @return a set of privileges this user/role/group has + */ + public String getPrivileges() { + return privileges; + } + + /** + * @param dbPrivileges a set of privileges this user/role/group has + */ + public void setPrivileges(String dbPrivileges) { + this.privileges = dbPrivileges; + } + + public MDatabase getDatabase() { + return database; + } + + public void setDatabase(MDatabase database) { + this.database = database; + } + + public void setRole(boolean isRole) { + this.isRole = isRole; + } + + public void setGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + public int getCreateTime() { + return createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + public String getGrantor() { + return grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityRoleEntity.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityRoleEntity.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityRoleEntity.java (revision 0) @@ -0,0 +1,96 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +public class MSecurityRoleEntity { + + private String roleName; + + private int createTime; + + private String ownerName; + + private MDatabase database; + + public MSecurityRoleEntity() { + } + + public MSecurityRoleEntity(String roleName, int createTime, String ownerName, + MDatabase database) { + super(); + this.roleName = roleName; + this.createTime = createTime; + this.ownerName = ownerName; + this.database = database; + } + + /** + * @return role name + */ + public String getRoleName() { + return roleName; + } + + /** + * @param roleName + */ + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + /** + * @return create time + */ + public int getCreateTime() { + return createTime; + } + + /** + * @param createTime + * role create time + */ + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + /** + * @return the principal name who created this role + */ + public String getOwnerName() { + return ownerName; + } + + public void setOwnerName(String ownerName) { + this.ownerName = ownerName; + } + + /** + * @return the database this role belongs to + */ + public MDatabase getDatabase() { + return database; + } + + /** + * @param database + */ + public void setDatabase(MDatabase database) { + this.database = database; + } +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityTablePartition.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityTablePartition.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityTablePartition.java (revision 0) @@ -0,0 +1,158 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +public class MSecurityTablePartition { + + private String principalName; + + private boolean isRole; + + private boolean isGroup; + + private MTable table; + + private MPartition partition; + + private String privileges; + + private int createTime; + + private String grantor; + + public MSecurityTablePartition() { + } + + public MSecurityTablePartition(String principalName, boolean isRole, + boolean isGroup, MTable table, MPartition partition, String privileges, + int createTime, String grantor) { + super(); + this.principalName = principalName; + this.isRole = isRole; + this.isGroup = isGroup; + this.table = table; + this.partition = partition; + this.privileges = privileges; + this.createTime = createTime; + this.grantor = grantor; + } + + public String getPrincipalName() { + return principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + /** + * @return true if this user name is a role + */ + public boolean getIsRole() { + return isRole; + } + + /** + * @param isRole is this user name a role? + */ + public void setIsRole(boolean isRole) { + this.isRole = isRole; + } + + /** + * @return true if this user name is a group, false else + */ + public boolean getIsGroup() { + return isGroup; + } + + /** + * @param isGroup true if is this user name a group + */ + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + /** + * @return a set of privileges this user/role/group has + */ + public String getPrivileges() { + return privileges; + } + + /** + * @param dbPrivileges a set of privileges this user/role/group has + */ + public void setPrivileges(String dbPrivileges) { + this.privileges = dbPrivileges; + } + + /** + * @return create time + */ + public int getCreateTime() { + return createTime; + } + + /** + * @param createTime create time + */ + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + /** + * @return + */ + public String getGrantor() { + return grantor; + } + + /** + * @param grantor + */ + public void setGrantor(String grantor) { + this.grantor = grantor; + } + + public void setRole(boolean isRole) { + this.isRole = isRole; + } + + public void setGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + public MTable getTable() { + return table; + } + + public void setTable(MTable table) { + this.table = table; + } + + public MPartition getPartition() { + return partition; + } + + public void setPartition(MPartition partition) { + this.partition = partition; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUser.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUser.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUser.java (revision 0) @@ -0,0 +1,128 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +/** + * User global level privileges + */ +public class MSecurityUser { + + //principal name, can be a user, group, or role + private String principalName; + + private boolean isRole; + + private boolean isGroup; + + private String privileges; + + private int createTime; + + private String grantor; + + public MSecurityUser() { + super(); + } + + public MSecurityUser(String userName, boolean isRole, boolean isGroup, + String dbPrivileges, int createTime, String grantor) { + super(); + this.principalName = userName; + this.isRole = isRole; + this.isGroup = isGroup; + this.privileges = dbPrivileges; + this.createTime = createTime; + this.grantor = grantor; + } + + /** + * @return is this user name a role name? + */ + public boolean getIsRole() { + return isRole; + } + + /** + * @param isRole this user name is a role name? + */ + public void setIsRole(boolean isRole) { + this.isRole = isRole; + } + + /** + * @return is this user name a group name? + */ + public boolean getIsGroup() { + return isGroup; + } + + /** + * @param isGroup this user name a group name + */ + public void setIsGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + /** + * @return a set of global privileges granted to this user + */ + public String getPrivileges() { + return privileges; + } + + /** + * @param dbPrivileges set of global privileges to user + */ + public void setPrivileges(String dbPrivileges) { + this.privileges = dbPrivileges; + } + + public void setRole(boolean isRole) { + this.isRole = isRole; + } + + public void setGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + public String getPrincipalName() { + return principalName; + } + + public void setPrincipalName(String principalName) { + this.principalName = principalName; + } + + public int getCreateTime() { + return createTime; + } + + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + public String getGrantor() { + return grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; + } + +} Index: metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUserRoleMap.java =================================================================== --- metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUserRoleMap.java (revision 0) +++ metastore/src/model/org/apache/hadoop/hive/metastore/model/MSecurityUserRoleMap.java (revision 0) @@ -0,0 +1,110 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +public class MSecurityUserRoleMap { + + private String principalName; + + private boolean isRole; + + private boolean isGroup; + + private MSecurityRoleEntity role; + + private int addTime; + + public MSecurityUserRoleMap() { + } + + public MSecurityUserRoleMap(String principalName, boolean isRole, + boolean isGroup, MSecurityRoleEntity role, int addTime) { + super(); + this.principalName = principalName; + this.isRole = isRole; + this.isGroup = isGroup; + this.role = role; + this.addTime = addTime; + } + + /** + * @return principal name + */ + public String getPrincipalName() { + return principalName; + } + + /** + * @param userName principal name + */ + public void setPrincipalName(String userName) { + this.principalName = userName; + } + + /** + * @return is role + */ + public boolean isRole() { + return isRole; + } + + /** + * @param isRole + */ + public void setRole(boolean isRole) { + this.isRole = isRole; + } + + /** + * @return is group + */ + public boolean isGroup() { + return isGroup; + } + + /** + * @param isGroup + */ + public void setGroup(boolean isGroup) { + this.isGroup = isGroup; + } + + /** + * @return add time + */ + public int getAddTime() { + return addTime; + } + + /** + * @param addTime + */ + public void setAddTime(int addTime) { + this.addTime = addTime; + } + + public MSecurityRoleEntity getRole() { + return role; + } + + public void setRole(MSecurityRoleEntity role) { + this.role = role; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/Driver.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/Driver.java (revision 1037574) +++ 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; @@ -65,22 +66,29 @@ import org.apache.hadoop.hive.ql.lockmgr.HiveLockMode; import org.apache.hadoop.hive.ql.lockmgr.HiveLockObject; 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.plan.TableDesc; import org.apache.hadoop.hive.ql.processors.CommandProcessor; import org.apache.hadoop.hive.ql.processors.CommandProcessorResponse; @@ -369,8 +377,20 @@ if (plan.getFetchTask() != null) { plan.getFetchTask().initialize(conf, plan, null); } + + //do the authorization check + if (HiveConf.getBoolVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_ENABLED)) { + try { + doAuthorization(sem); + } catch (AuthorizationException authExp) { + console.printError("Authrization failed:" + authExp.getMessage() + + ". Use show grant to get more details."); + return 403; + } + } - return (0); + return 0; } catch (SemanticException e) { errorMessage = "FAILED: Error in semantic analysis: " + e.getMessage(); SQLState = ErrorMsg.findSQLState(e.getMessage()); @@ -392,6 +412,138 @@ } } + private boolean doAuthorization(BaseSemanticAnalyzer sem) + throws HiveException, AuthorizationException { + HashSet inputs = sem.getInputs(); + HashSet outputs = sem.getOutputs(); + SessionState ss = SessionState.get(); + HiveOperation op = ss.getHiveOperation(); + Hive db = sem.getDb(); + boolean pass = true; + if (op != null) { + if (op.equals(HiveOperation.CREATETABLE_AS_SELECT) + || op.equals(HiveOperation.CREATETABLE)) { + pass = ss.getAuthorizer().authorize( + db.getDatabase(db.getCurrentDatabase()), null, + HiveOperation.CREATETABLE_AS_SELECT.getOutputRequiredPrivileges()); + } + if (outputs != null && outputs.size() > 0) { + for (WriteEntity write : outputs) { + + if (write.getType() == WriteEntity.Type.PARTITION) { + Partition part = db.getPartition(write.getTable(), write + .getPartition().getSpec(), false); + if (part != null) { + pass = pass + && ss.getAuthorizer().authorize(write.getPartition(), null, + op.getOutputRequiredPrivileges()); + continue; + } + } + + if (write.getTable() != null) { + pass = pass + && ss.getAuthorizer().authorize(write.getTable(), null, + op.getOutputRequiredPrivileges()); + } + + if (!pass) { + break; + } + } + + } + } + + if (pass && inputs != null && inputs.size() > 0) { + + Map> tab2Cols = new HashMap>(); + Map> part2Cols = new HashMap>(); + + for (ReadEntity read : inputs) { + boolean part = read.getPartition() != null; + if (part) { + part2Cols.put(read.getPartition(), new ArrayList()); + } else { + tab2Cols.put(read.getTable(), new ArrayList()); + } + } + + if (op.equals(HiveOperation.CREATETABLE_AS_SELECT) + || op.equals(HiveOperation.QUERY)) { + SemanticAnalyzer querySem = (SemanticAnalyzer) sem; + ParseContext parseCtx = querySem.getParseContext(); + Map tsoTopMap = parseCtx.getTopToTable(); + + for (Map.Entry> topOpMap : querySem + .getParseContext().getTopOps().entrySet()) { + Operator topOp = topOpMap.getValue(); + if (topOp instanceof TableScanOperator + && tsoTopMap.containsKey(topOp)) { + TableScanOperator tableScanOp = (TableScanOperator) topOp; + Table tbl = tsoTopMap.get(tableScanOp); + List neededColumnIds = tableScanOp.getNeededColumnIDs(); + List columns = tbl.getCols(); + List cols = new ArrayList(); + if (neededColumnIds != null && neededColumnIds.size() > 0) { + for (int i = 0; i < neededColumnIds.size(); i++) { + cols.add(columns.get(neededColumnIds.get(i)).getName()); + } + } else { + for (int i = 0; i < columns.size(); i++) { + cols.add(columns.get(i).getName()); + } + } + if (tbl.isPartitioned()) { + String alias_id = topOpMap.getKey(); + PrunedPartitionList partsList = PartitionPruner.prune(parseCtx + .getTopToTable().get(topOp), parseCtx.getOpToPartPruner() + .get(topOp), parseCtx.getConf(), alias_id, parseCtx + .getPrunedPartitions()); + Set parts = new HashSet(); + parts.addAll(partsList.getConfirmedPartns()); + parts.addAll(partsList.getUnknownPartns()); + for (Partition part : parts) { + part2Cols.put(part, cols); + } + } else { + tab2Cols.put(tbl, cols); + } + } + } + } + + for (ReadEntity read : inputs) { + if (read.getPartition() != null) { + List cols = part2Cols.get(read.getPartition()); + if (cols != null && cols.size() > 0) { + pass = pass + && ss.getAuthorizer().authorize(read.getPartition().getTable(), + read.getPartition(), cols, op.getInputRequiredPrivileges(), + null); + } else { + pass = pass + && ss.getAuthorizer().authorize(read.getPartition(), + op.getInputRequiredPrivileges(), null); + } + } else if (read.getTable() != null) { + List cols = tab2Cols.get(read.getTable()); + if (cols != null && cols.size() > 0) { + pass = pass + && ss.getAuthorizer().authorize(read.getTable(), null, cols, + op.getInputRequiredPrivileges(), null); + } else { + pass = pass + && ss.getAuthorizer().authorize(read.getTable(), + op.getInputRequiredPrivileges(), null); + } + } + } + + } + return pass; + } + /** * @return The current query plan associated with this Driver, if any. */ @@ -685,7 +837,7 @@ releaseLocks(ctx.getHiveLocks()); return new CommandProcessorResponse(ret, errorMessage, SQLState); } - + ret = acquireReadWriteLocks(); if (ret != 0) { releaseLocks(ctx.getHiveLocks()); @@ -752,8 +904,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 1037574) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (working copy) @@ -33,6 +33,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; +import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -57,6 +58,7 @@ import org.apache.hadoop.hive.metastore.TableType; import org.apache.hadoop.hive.metastore.Warehouse; import org.apache.hadoop.hive.metastore.api.AlreadyExistsException; +import org.apache.hadoop.hive.metastore.api.ColumnPrivilegeBag; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Index; @@ -64,6 +66,12 @@ import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Order; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; +import org.apache.hadoop.hive.metastore.api.SecurityColumn; +import org.apache.hadoop.hive.metastore.api.SecurityDB; +import org.apache.hadoop.hive.metastore.api.SecurityTablePartition; +import org.apache.hadoop.hive.metastore.api.SecurityUser; import org.apache.hadoop.hive.metastore.api.Index; import org.apache.hadoop.hive.ql.Context; import org.apache.hadoop.hive.ql.DriverContext; @@ -99,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 +128,7 @@ import org.apache.hadoop.hive.ql.plan.UnlockTableDesc; import org.apache.hadoop.hive.ql.plan.AlterTableDesc.AlterTableTypes; import org.apache.hadoop.hive.ql.plan.api.StageType; +import org.apache.hadoop.hive.ql.security.authorization.Privilege; import org.apache.hadoop.hive.serde.Constants; import org.apache.hadoop.hive.serde2.Deserializer; import org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe; @@ -122,6 +139,7 @@ import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; import org.apache.hadoop.hive.shims.HadoopShims; import org.apache.hadoop.hive.shims.ShimLoader; +import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.util.ToolRunner; /** * DDLTask implementation. @@ -291,7 +309,33 @@ if (showParts != null) { return showPartitions(db, showParts); } - + + RoleDDLDesc roleDDLDesc = work.getRoleDDLDesc(); + if (roleDDLDesc != null) { + return roleDDL(roleDDLDesc); + } + + GrantDesc grantDesc = work.getGrantDesc(); + if (grantDesc != null) { + return grantOrRevokePrivileges(grantDesc.getPrincipals(), grantDesc.getPrivileges(), grantDesc.getPrivilegeSubjectDesc(), true); + } + + RevokeDesc revokeDesc = work.getRevokeDesc(); + if (revokeDesc != null) { + return grantOrRevokePrivileges(revokeDesc.getPrincipals(), revokeDesc + .getPrivileges(), revokeDesc.getPrivilegeSubjectDesc(), false); + } + + ShowGrantDesc showGrantDesc = work.getShowGrantDesc(); + if (showGrantDesc != null) { + return showGrants(showGrantDesc); + } + + GrantRevokeRoleDDL grantOrRevokeRoleDDL = work.getGrantRevokeRoleDDL(); + if (grantOrRevokeRoleDDL != null) { + return grantOrRevokeRole(grantOrRevokeRoleDDL); + } + ShowIndexesDesc showIndexes = work.getShowIndexesDesc(); if (showIndexes != null) { return showIndexes(db, showIndexes); @@ -315,6 +359,385 @@ return 0; } + private int grantOrRevokeRole(GrantRevokeRoleDDL grantOrRevokeRoleDDL) + throws HiveException { + try { + boolean grantRole = grantOrRevokeRoleDDL.getGrant(); + List principals = grantOrRevokeRoleDDL.getPrincipalDesc(); + List roles = grantOrRevokeRoleDDL.getRoles(); + for (PrincipalDesc principal : principals) { + String userName = principal.getName(); + boolean isRole = principal.getType() == PrincipalDesc.PrincipalType.ROLE; + boolean isGroup = principal.getType() == PrincipalDesc.PrincipalType.GROUP; + for (String roleName : roles) { + if (grantRole) { + db.addRoleMember(roleName, userName, isRole, isGroup); + } else { + db.removeRoleMember(roleName, userName, isRole, isGroup); + } + } + } + } catch (Exception e) { + e.printStackTrace(); + throw new HiveException(e); + } + return 0; + } + + private int showGrants(ShowGrantDesc showGrantDesc) throws HiveException { + try { + Path resFile = new Path(showGrantDesc.getResFile()); + FileSystem fs = resFile.getFileSystem(conf); + DataOutput outStream = fs.create(resFile); + PrincipalDesc principalDesc = showGrantDesc.getPrincipalDesc(); + boolean isGroup = (principalDesc.getType()== PrincipalDesc.PrincipalType.GROUP); + boolean isRole = (principalDesc.getType()== PrincipalDesc.PrincipalType.ROLE); + PrivilegeObjectDesc hiveObjectDesc = showGrantDesc.getHiveObj(); + String principalName = principalDesc.getName(); + if (hiveObjectDesc == null) { + //show user level privileges + List users = db.showUserLevelGrant(principalName, + isGroup, isRole); + if (users != null && users.size() > 0) { + boolean first = true; + for(SecurityUser usr: users) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfor(outStream, isGroup, isRole, + principalName, null, null, null, null, + usr.getPrivileges(), usr.getCreateTime(), usr.getGrantor()); + + } + } + } else { + String obj = hiveObjectDesc.getObject(); + boolean notFound = true; + String dbName = null; + String tableName = null; + Table tableObj = null; + Database dbObj = null; + + if (hiveObjectDesc.getTable()) { + String[] dbTab = obj.split("\\."); + if (dbTab.length == 2) { + dbName = dbTab[0]; + tableName = dbTab[1]; + } else { + dbName = db.getCurrentDatabase(); + tableName = obj; + } + dbObj = db.getDatabase(dbName); + tableObj = db.getTable(dbName, tableName); + notFound = (dbObj == null || tableObj == null); + } else { + dbName = hiveObjectDesc.getObject(); + dbObj = db.getDatabase(dbName); + notFound = (dbObj == null); + } + if (notFound) { + throw new HiveException(obj + " can not be found"); + } + + String partName = null; + if (hiveObjectDesc.getPartSpec() != null) { + partName = Warehouse + .makePartName(hiveObjectDesc.getPartSpec(), false); + } + + if (!hiveObjectDesc.getTable()) { + // show database level privileges + List dbs = db.showDBLevelGrant(principalName, isGroup, + isRole, dbName); + if (dbs != null && dbs.size() > 0) { + boolean first = true; + for(SecurityDB db: dbs) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfor(outStream, isGroup, isRole, + principalName, dbName, null, null, null, + db.getPrivileges(), db.getCreateTime(), db.getGrantor()); + + } + } + + } else { + if (showGrantDesc.getColumns() != null) { + // show column level privileges + for (String columnName : showGrantDesc.getColumns()) { + List columnss = db.showColumnGrant(principalName, + isGroup, isRole, dbName, tableName, partName, columnName); + if (columnss != null && columnss.size() > 0) { + boolean first = true; + for (SecurityColumn col : columnss) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfor(outStream, isGroup, isRole, + principalName, dbName, tableName, partName, columnName, + col.getPrivileges(), col.getCreateTime(), col.getGrantor()); + } + } + } + } else if (hiveObjectDesc.getPartSpec() != null) { + // show partition level privileges + List parts = db.showPartitionGrant(principalName, + isGroup, isRole, dbName, tableName, partName); + if (parts != null && parts.size() > 0) { + boolean first = true; + for(SecurityTablePartition part: parts) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfor(outStream, isGroup, isRole, + principalName, dbName, tableName, partName, null, + part.getPrivileges(), part.getCreateTime(), part.getGrantor()); + + } + } + } + else { + // show table level privileges + List tbls = db.showTableLevelGrant( + principalName, isGroup, isRole, dbName, tableName); + if (tbls!= null && tbls.size() > 0) { + boolean first = true; + for(SecurityTablePartition tbl: tbls) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + + writeGrantInfor(outStream, isGroup, isRole, + principalName, dbName, tableName, null, null, + tbl.getPrivileges(), tbl.getCreateTime(), tbl.getGrantor()); + + } + } + } + } + } + ((FSDataOutputStream) outStream).close(); + } catch (FileNotFoundException e) { + LOG.info("show table status: " + stringifyException(e)); + return 1; + } catch (IOException e) { + LOG.info("show table status: " + stringifyException(e)); + return 1; + } catch (Exception e) { + e.printStackTrace(); + throw new HiveException(e); + } + return 0; + } + + private int grantOrRevokePrivileges(List principals, + List privileges, PrivilegeObjectDesc privSubjectDesc, + boolean grant) { + if (privileges == null || privileges.size() == 0) { + console.printError("No privilege found."); + return 1; + } + + String dbName = null; + String tableName = null; + Table tableObj = null; + Database dbObj = null; + + try { + + if (privSubjectDesc != null) { + if (privSubjectDesc.getPartSpec() != null && grant) { + throw new HiveException("Grant does not support partition level."); + } + String obj = privSubjectDesc.getObject(); + boolean notFound = true; + if (privSubjectDesc.getTable()) { + String[] dbTab = obj.split("\\."); + if (dbTab.length == 2) { + dbName = dbTab[0]; + tableName = dbTab[1]; + } else { + dbName = db.getCurrentDatabase(); + tableName = obj; + } + dbObj = db.getDatabase(dbName); + tableObj = db.getTable(dbName, tableName); + notFound = (dbObj == null || tableObj == null); + } else { + dbName = privSubjectDesc.getObject(); + dbObj = db.getDatabase(dbName); + notFound = (dbObj == null); + } + if (notFound) { + throw new HiveException(obj + " can not be found"); + } + } + + PrivilegeBag privBag = new PrivilegeBag(); + String userPrivs = ""; + if (privSubjectDesc == null) { + boolean first = true; + for (int idx = 0; idx < privileges.size(); idx++) { + Privilege priv = privileges.get(idx).getPrivilege(); + if (privileges.get(idx).getColumns() != null + && privileges.get(idx).getColumns().size() > 0) { + throw new HiveException( + "For user-level privielges, column sets should be null. columns=" + + privileges.get(idx).getColumns().toString()); + } + if (!first) { + userPrivs = userPrivs + StringUtils.COMMA; + } else { + first = false; + } + userPrivs = userPrivs + priv.getPriv(); + } + privBag.setUserPrivileges(userPrivs); + } else { + List columnPrivBags = new ArrayList(); + Map dbPrivs = new HashMap(); + Map tabPrivs = new HashMap(); + Map partPrivs = new HashMap(); + org.apache.hadoop.hive.metastore.api.Partition partObj = null; + + if ((!tableObj.isPartitioned()) + && privSubjectDesc.getPartSpec() != null) { + throw new HiveException( + "Table is partitioned, but partition spec found. partSpec=" + + privSubjectDesc.getPartSpec().toString()); + } + + String partName = null; + if (privSubjectDesc.getPartSpec() != null) { + partObj = db.getPartition(tableObj, privSubjectDesc.getPartSpec(), false).getTPartition(); + partName = Warehouse.makePartName(tableObj.getPartCols(), + partObj.getValues()); + } + + for (PrivilegeDesc privDesc : privileges) { + List columns = privDesc.getColumns(); + Privilege priv = privDesc.getPrivilege(); + if (columns != null && columns.size() > 0) { + if (!priv.supportColumnLevel()) { + throw new HiveException(priv.getPriv() + + " does not support column level."); + } + if (privSubjectDesc == null || tableName == null) { + throw new HiveException( + "For user-level/database-level privielges, column sets should be null. columns=" + + columns); + } + Map columnPrivileges = new HashMap(); + for (int i = 0; i < columns.size(); i++) { + columnPrivileges.put(columns.get(i), priv.getPriv()); + } + ColumnPrivilegeBag columnPrivBag = new ColumnPrivilegeBag(dbName, + tableName, partName, columnPrivileges); + columnPrivBags.add(columnPrivBag); + } else { + if (privSubjectDesc.getTable()) { + if (privSubjectDesc.getPartSpec() != null && !grant) { + partPrivs.put(partObj, priv.getPriv()); + } else { + tabPrivs.put(tableObj.getTTable(), priv.getPriv()); + } + } else { + dbPrivs.put(dbObj, priv.getPriv()); + } + } + } + + if (columnPrivBags.size() > 0) { + privBag.setColumnPrivileges(columnPrivBags); + } + if (tabPrivs.size() > 0) { + privBag.setTablePrivileges(tabPrivs); + } + + if (partPrivs != null && partPrivs.size() > 0) { + privBag.setPartitionPrivileges(partPrivs); + } + if (dbPrivs.size() > 0) { + privBag.setDbPrivileges(dbPrivs); + } + } + + for (PrincipalDesc principal : principals) { + boolean isRole = (principal.getType() == PrincipalDesc.PrincipalType.ROLE); + boolean isGroup = (principal.getType() == PrincipalDesc.PrincipalType.GROUP); + if (grant) { + db + .grantPrivileges(principal.getName(), isRole, isGroup, privBag, + ""); + } else { + db + .revokePrivileges(principal.getName(), isRole, isGroup, privBag, + ""); + } + } + } catch (Exception e) { + console.printError("Error: " + e.getMessage()); + return 1; + } + + return 0; + } + + private int roleDDL(RoleDDLDesc roleDDLDesc) { + RoleDDLDesc.RoleOperation operation = roleDDLDesc.getOperation(); + try { + if (operation.equals(RoleDDLDesc.RoleOperation.CREATE_ROLE)) { + db.createRole(roleDDLDesc.getName()); + } else if (operation.equals(RoleDDLDesc.RoleOperation.DROP_ROLE)) { + db.dropRole(roleDDLDesc.getName()); + } else if (operation.equals(RoleDDLDesc.RoleOperation.SHOW_ROLE_GRANT)) { + List roles = db.showRoleGrant(roleDDLDesc.getName(), + roleDDLDesc.getRole(), roleDDLDesc.getGroup()); + if (roles != null && roles.size() > 0) { + Path resFile = new Path(roleDDLDesc.getResFile()); + FileSystem fs = resFile.getFileSystem(conf); + DataOutput outStream = fs.create(resFile); + for (Role role : roles) { + outStream.writeBytes("role name:" + role.getRoleName()); + outStream.write(terminator); + outStream.writeBytes("database:" + role.getDatabase().getName()); + outStream.write(terminator); + } + ((FSDataOutputStream) outStream).close(); + } + } else { + throw new HiveException("Unkown role operation " + + operation.getOperationName()); + } + } catch (HiveException e) { + e.printStackTrace(); + console.printError("Error in role operation " + + operation.getOperationName() + " on role name " + + roleDDLDesc.getName() + ", error message " + e.getMessage()); + return 1; + } catch (IOException e) { + LOG.info("role ddl exception: " + stringifyException(e)); + return 1; + } + + return 0; + } + private int dropIndex(Hive db, DropIndexDesc dropIdx) throws HiveException { db.dropIndex(db.getCurrentDatabase(), dropIdx.getTableName(), dropIdx.getIndexName(), true); @@ -403,7 +826,7 @@ Partition part = db .getPartition(tbl, addPartitionDesc.getPartSpec(), false); - work.getOutputs().add(new WriteEntity(part)); + work.getOutputs().add(new WriteEntity(part, true)); return 0; } @@ -434,7 +857,7 @@ throw new HiveException("Uable to update table"); } work.getInputs().add(new ReadEntity(tbl)); - work.getOutputs().add(new WriteEntity(tbl)); + work.getOutputs().add(new WriteEntity(tbl, true)); } else { Partition part = db.getPartition(tbl, touchDesc.getPartSpec(), false); if (part == null) { @@ -446,7 +869,7 @@ throw new HiveException(e); } work.getInputs().add(new ReadEntity(part)); - work.getOutputs().add(new WriteEntity(part)); + work.getOutputs().add(new WriteEntity(part, true)); } return 0; } @@ -1816,6 +2239,43 @@ return 0; } + + public static void writeGrantInfor(DataOutput outStream, boolean isGroup, + boolean isRole, String principalName, String dbName, String tableName, + String partName, String columnName, String privileges, int createTime, + String grantor) throws IOException { + + if (dbName != null) { + writeKeyValuePair(outStream, "database", dbName); + } + if (tableName != null) { + writeKeyValuePair(outStream, "table", tableName); + } + if (partName != null) { + writeKeyValuePair(outStream, "partition", partName); + } + if (columnName != null) { + writeKeyValuePair(outStream, "columnName", columnName); + } + + writeKeyValuePair(outStream, "userName", principalName); + writeKeyValuePair(outStream, "isRole", "" + isRole); + writeKeyValuePair(outStream, "isGroup", "" + isGroup); + writeKeyValuePair(outStream, "privileges", privileges); + writeKeyValuePair(outStream, "grantTime", "" + createTime); + if (grantor != null) { + writeKeyValuePair(outStream, "grantor", grantor); + } + } + + private static void writeKeyValuePair(DataOutput outStream, String key, + String value) throws IOException { + outStream.write(terminator); + outStream.writeBytes(key); + outStream.write(separator); + outStream.writeBytes(value); + outStream.write(separator); + } private void writeFileSystemStats(DataOutput outStream, List locations, Path tabLoc, boolean partSpecified, int indent) throws IOException { Index: ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java (revision 1037574) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java (working copy) @@ -174,7 +174,7 @@ .getTableName(), tbd.getReplace(), new Path(tbd.getTmpDir()), tbd.getHoldDDLTime()); if (work.getOutputs() != null) { - work.getOutputs().add(new WriteEntity(table)); + work.getOutputs().add(new WriteEntity(table, true)); } } else { LOG.info("Partition is: " + tbd.getPartitionSpec().toString()); @@ -210,7 +210,7 @@ for (LinkedHashMap partSpec: dp) { Partition partn = db.getPartition(table, partSpec, false); - WriteEntity enty = new WriteEntity(partn); + WriteEntity enty = new WriteEntity(partn, true); if (work.getOutputs() != null) { work.getOutputs().add(enty); } @@ -243,7 +243,7 @@ dc = new DataContainer(table.getTTable(), partn.getTPartition()); // add this partition to post-execution hook if (work.getOutputs() != null) { - work.getOutputs().add(new WriteEntity(partn)); + work.getOutputs().add(new WriteEntity(partn, true)); } } } Index: ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java (revision 1037574) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java (working copy) @@ -233,7 +233,7 @@ reportProgress(); numMapRowsRead++; - + // the big table has reached a new key group. try to let the small tables // catch up with the big table. if (nextKeyGroup) { Index: ql/src/java/org/apache/hadoop/hive/ql/metadata/AuthorizationException.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/metadata/AuthorizationException.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/AuthorizationException.java (revision 0) @@ -0,0 +1,55 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.metadata; + +public class AuthorizationException extends RuntimeException { + /** + */ + private static final long serialVersionUID = 1L; + + public AuthorizationException() { + super(); + } + + /** + * Constructs an {@link AuthorizationException} with the specified detail + * message. + * + * @param s + * the detail message. + */ + public AuthorizationException(String message) { + super(message); + } + + /** + * Constructs an {@link AuthorizationException} with the specified cause. + * + * @param cause + * the cause + */ + public AuthorizationException(Throwable cause) { + super(cause); + } + + + public AuthorizationException(String message, Throwable cause) { + super(message, cause); + } +} Index: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java (revision 1037574) +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java (working copy) @@ -58,13 +58,24 @@ import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Index; +import org.apache.hadoop.hive.metastore.api.InvalidObjectException; import org.apache.hadoop.hive.metastore.api.InvalidOperationException; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.hadoop.hive.metastore.api.Order; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.PrivilegeBag; +import org.apache.hadoop.hive.metastore.api.Role; +import org.apache.hadoop.hive.metastore.api.SecurityColumn; +import org.apache.hadoop.hive.metastore.api.SecurityDB; +import org.apache.hadoop.hive.metastore.api.SecurityTablePartition; +import org.apache.hadoop.hive.metastore.api.SecurityUser; import org.apache.hadoop.hive.metastore.api.SerDeInfo; +import org.apache.hadoop.hive.metastore.model.MSecurityUser; import org.apache.hadoop.hive.ql.exec.Utilities; import org.apache.hadoop.hive.ql.index.HiveIndexHandler; +import org.apache.hadoop.hive.ql.session.CreateTableAutomaticGrant; +import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.serde2.Deserializer; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; @@ -86,7 +97,7 @@ private HiveConf conf = null; private IMetaStoreClient metaStoreClient; private String currentDatabase; - + private static ThreadLocal hiveDB = new ThreadLocal() { @Override protected synchronized Object initialValue() { @@ -432,7 +443,28 @@ if (tbl.getParameters() != null) { tbl.getParameters().remove(Constants.DDL_TIME); } - getMSC().createTable(tbl.getTTable()); + org.apache.hadoop.hive.metastore.api.Table tTbl = tbl.getTTable(); + PrincipalPrivilegeSet principalPrivs = new PrincipalPrivilegeSet(); + SessionState ss = SessionState.get(); + CreateTableAutomaticGrant grants = ss.getCreateTableGrants(); + if (grants!= null) { + principalPrivs.setUserPrivileges(grants.getUserGrants()); + principalPrivs.setGroupPrivileges(grants.getGroupGrants()); + principalPrivs.setRolePrivileges(grants.getRoleGrants()); + String ownerGrant = grants.getOwnerGrants(); + if (ss.getAuthenticator() != null && ownerGrant != null) { + if (principalPrivs.getUserPrivileges() == null) { + Map userPrivs = new HashMap(); + userPrivs.put(ss.getAuthenticator().getUserName(), ownerGrant); + principalPrivs.setUserPrivileges(userPrivs); + } else { + principalPrivs.getUserPrivileges().put( + ss.getAuthenticator().getUserName(), ownerGrant); + } + } + tTbl.setPrivileges(principalPrivs); + } + getMSC().createTable(tTbl); } catch (AlreadyExistsException e) { if (!ifNotExists) { throw new HiveException(e); @@ -763,7 +795,7 @@ } catch (NoSuchObjectException e) { if (throwException) { LOG.error(StringUtils.stringifyException(e)); - throw new InvalidTableException("Table not found ", tableName); + throw new InvalidTableException("Table " + tableName + " not found ", tableName); } return null; } catch (Exception e) { @@ -903,6 +935,52 @@ } } + public boolean grantPrivileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges, String grantor) + throws HiveException { + try { + return getMSC().grant_privileges(userName, isRole, isGroup, privileges, + grantor); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param userName + * principal name + * @param isRole + * is the given principal name a role + * @param isGroup + * is the given principal name a group + * @param privileges + * a bag of privileges + * @return + * @throws HiveException + */ + public boolean revokePrivileges(String userName, boolean isRole, + boolean isGroup, PrivilegeBag privileges, String grantor) + throws HiveException { + try { + return getMSC().revoke_privileges(userName, isRole, isGroup, privileges); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param dbName + * @return + * @throws HiveException + */ + public Database getDatabase(String dbName) throws HiveException { + try { + return getMSC().getDatabase(dbName); + } catch (Exception e) { + throw new HiveException(e); + } + } + /** * Query metadata to see if a database with the given name already exists. * @@ -1174,7 +1252,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 @@ -1266,8 +1345,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); @@ -1319,8 +1398,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); } @@ -1390,6 +1469,218 @@ public void setCurrentDatabase(String currentDatabase) { this.currentDatabase = currentDatabase; } + + public void createRole(String roleName) throws HiveException { + try { + getMSC().create_role(roleName, "", this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public void dropRole(String roleName) throws HiveException { + try { + getMSC().drop_role(roleName, this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showRoleGrant(String principalName, boolean isRole, + boolean isGroup) throws HiveException { + try { + return getMSC().list_roles(principalName, isRole, isGroup, this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public boolean addRoleMember(String roleName, String userName, + boolean isRole, boolean isGroup) throws HiveException { + try { + return getMSC().add_role_member(roleName, userName, isRole, isGroup, + this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public boolean removeRoleMember(String roleName, String userName, + boolean isRole, boolean isGroup) throws HiveException { + try { + return getMSC().remove_role_member(roleName, userName, isRole, isGroup, + this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List listRoles(String userName, boolean isRole, boolean isGroup) + throws HiveException { + try { + return getMSC().list_roles(userName, isRole, isGroup, this.getCurrentDatabase()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showUserLevelGrant(String principalName, + boolean isRole, boolean isGroup) throws HiveException { + try { + return getMSC().list_security_user_grant(principalName, isRole, isGroup); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param user_name + * user name + * @param group_names + * group names + * @return + */ + public PrincipalPrivilegeSet get_user_privilege_set(String user_name, + List group_names) throws HiveException { + try { + return getMSC().get_user_privilege_set(user_name, group_names); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param db_name + * database name + * @param user_name + * user name + * @param group_names + * group names + * @return + */ + public PrincipalPrivilegeSet get_db_privilege_set(String db_name, + String user_name, List group_names) throws HiveException { + try { + return getMSC().get_db_privilege_set(db_name, user_name, group_names); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param db_name + * db name + * @param table_name + * table name + * @param user_name + * user name + * @param group_names + * group names + * @return + */ + public PrincipalPrivilegeSet get_table_privilege_set(String db_name, + String table_name, String user_name, List group_names) + throws HiveException{ + try { + return getMSC().get_table_privilege_set(db_name, table_name, user_name, + group_names); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param db_name + * db name + * @param table_name + * table name + * @param part_name + * partition name + * @param user_name + * user name + * @param group_names + * group names + * @return + */ + public PrincipalPrivilegeSet get_partition_privilege_set(String db_name, + String table_name, String part_name, String user_name, + List group_names) throws HiveException { + try { + return getMSC().get_partition_privilege_set(db_name, table_name, part_name, user_name, + group_names); + } catch (Exception e) { + throw new HiveException(e); + } + } + + /** + * @param db_name + * database name + * @param table_name + * table name + * @param part_name + * partition name + * @param column_name + * column name + * @param user_name + * user name + * @param group_names + * group names + * @return + */ + public PrincipalPrivilegeSet get_column_privilege_set(String db_name, + String table_name, String part_name, String column_name, + String user_name, List group_names) throws HiveException { + try { + return getMSC().get_column_privilege_set(db_name, table_name, part_name, + column_name, user_name, group_names); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showDBLevelGrant(String principalName, + boolean isGroup, boolean isRole, String dbName) throws HiveException { + try { + return getMSC().list_security_db_grant(principalName, isGroup, isRole, + dbName); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showTableLevelGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName) throws HiveException { + try { + return getMSC().list_security_table_grant(principalName, isGroup, + isRole, dbName, tableName); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showPartitionGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String partName) throws HiveException { + try { + return getMSC().list_security_partition_grant(principalName, isGroup, + isRole, dbName, tableName, partName); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List showColumnGrant(String principal_name, + boolean isGroup, boolean isRole, String dbName, String tableName, + String partName, String columnName) throws HiveException { + try { + return getMSC().list_security_column_grant(principal_name, isGroup, + isRole, dbName, tableName, partName, columnName); + } catch (Exception e) { + throw new HiveException(e); + } + } static private void checkPaths(FileSystem fs, FileStatus[] srcs, Path destf, boolean replace) throws HiveException { @@ -1630,6 +1921,22 @@ } return metaStoreClient; } + + private String getUserName() { + SessionState ss = SessionState.get(); + if (ss != null && ss.getAuthenticator() != null) { + return ss.getAuthenticator().getUserName(); + } + return null; + } + + private List getGroupNames() { + SessionState ss = SessionState.get(); + if (ss != null && ss.getAuthenticator() != null) { + return ss.getAuthenticator().getGroupNames(); + } + return null; + } public static List getFieldsFromDeserializer(String name, Deserializer serde) throws HiveException { Index: ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java (revision 1037574) +++ 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 1037574) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java (working copy) @@ -69,6 +69,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.DescFunctionDesc; import org.apache.hadoop.hive.ql.plan.DescTableDesc; @@ -80,6 +87,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 +97,8 @@ import org.apache.hadoop.hive.ql.plan.TableDesc; import org.apache.hadoop.hive.ql.plan.UnlockTableDesc; import org.apache.hadoop.hive.ql.plan.AlterTableDesc.AlterTableTypes; +import org.apache.hadoop.hive.ql.security.authorization.Privilege; +import org.apache.hadoop.hive.ql.security.authorization.PrivilegeRegistry; import org.apache.hadoop.hive.ql.plan.AlterIndexDesc.AlterIndexTypes; import org.apache.hadoop.hive.serde.Constants; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; @@ -250,11 +260,236 @@ analyzeDropDatabase(ast); } else if (ast.getToken().getType() == TOK_SWITCHDATABASE) { analyzeSwitchDatabase(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_CREATEROLE) { + analyzeCreateRole(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_DROPROLE) { + analyzeDropRole(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_SHOW_ROLE_GRANT) { + ctx.setResFile(new Path(ctx.getLocalTmpFileURI())); + analyzeShowRoleGrant(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_GRANT_ROLE) { + anaylzeGrantRevokeRole(true, ast); + } else if (ast.getToken().getType() == HiveParser.TOK_REVOKE_ROLE) { + anaylzeGrantRevokeRole(false, ast); + } else if (ast.getToken().getType() == HiveParser.TOK_GRANT) { + analyzeGrant(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_SHOW_GRANT) { + ctx.setResFile(new Path(ctx.getLocalTmpFileURI())); + analyzeShowGrant(ast); + } else if (ast.getToken().getType() == HiveParser.TOK_REVOKE) { + analyzeRevoke(ast); } else { throw new SemanticException("Unsupported command."); } } + private void anaylzeGrantRevokeRole(boolean grant, ASTNode ast) { + List principalDesc = analyzePrinciplaListDef( + (ASTNode) ast.getChild(0)); + List roles = new ArrayList(); + for (int i = 1; i < ast.getChildCount(); i++) { + roles.add(unescapeIdentifier(ast.getChild(i).getText())); + } + + GrantRevokeRoleDDL grantRevokeRoleDDL = new GrantRevokeRoleDDL(grant, roles, principalDesc); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + grantRevokeRoleDDL), conf)); + } + + private void analyzeShowGrant(ASTNode ast) throws SemanticException { + PrivilegeObjectDesc privHiveObj = null; + + ASTNode principal = (ASTNode) ast.getChild(0); + PrincipalDesc.PrincipalType type = null; + switch (principal.getType()) { + case HiveParser.TOK_USER: + type = PrincipalDesc.PrincipalType.USER; + break; + case HiveParser.TOK_GROUP: + type = PrincipalDesc.PrincipalType.GROUP; + break; + case HiveParser.TOK_ROLE: + type = PrincipalDesc.PrincipalType.ROLE; + break; + } + String principlaName = unescapeIdentifier(principal.getChild(0).getText()); + PrincipalDesc principalDesc = new PrincipalDesc(principlaName, type); + List cols = null; + if (ast.getChildCount() > 1) { + ASTNode child = (ASTNode) ast.getChild(1); + if (child.getToken().getType() == HiveParser.TOK_PRIV_OBJECT_COL) { + privHiveObj = new PrivilegeObjectDesc(); + privHiveObj.setObject(unescapeIdentifier(child.getChild(0).getText())); + if (child.getChildCount() > 1) { + for (int i = 1; i < child.getChildCount(); i++) { + ASTNode grandChild = (ASTNode) child.getChild(i); + if (grandChild.getToken().getType() == HiveParser.TOK_PARTSPEC) { + privHiveObj.setPartSpec(DDLSemanticAnalyzer.getPartSpec(grandChild)); + } else if (grandChild.getToken().getType() == HiveParser.TOK_TABCOLNAME) { + cols = getColumnNames((ASTNode) grandChild); + } else { + privHiveObj.setTable(child.getChild(i) != null); + } + } + } + } + } + + if (privHiveObj == null && cols != null) { + throw new SemanticException( + "For user-level privielges, column sets should be null. columns=" + + cols.toString()); + } + + ShowGrantDesc showGrant = new ShowGrantDesc(ctx.getResFile().toString(), + principalDesc, privHiveObj, cols); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + showGrant), conf)); + } + + private void analyzeGrant(ASTNode ast) throws SemanticException { + List privilegeDesc = analyzePrivilegeListDef( + (ASTNode) ast.getChild(0)); + List principalDesc = analyzePrinciplaListDef( + (ASTNode) ast.getChild(1)); + boolean grantOption = false; + PrivilegeObjectDesc subjectObj = null; + + if (ast.getChildCount() > 2) { + for (int i = 2; i < ast.getChildCount(); i++) { + ASTNode astChild = (ASTNode) ast.getChild(i); + if (astChild.getType() == HiveParser.TOK_GRANT_WITH_OPTION) { + grantOption = true; + } else if (astChild.getType() == HiveParser.TOK_PRIV_OBJECT) { + subjectObj = analyzePrivilegeObject(astChild); + } + } + } + + GrantDesc grantDesc = new GrantDesc(subjectObj, privilegeDesc, principalDesc, grantOption); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + grantDesc), conf)); + } + + private void analyzeRevoke(ASTNode ast) throws SemanticException { + List privilegeDesc = analyzePrivilegeListDef( + (ASTNode) ast.getChild(0)); + List principalDesc = analyzePrinciplaListDef( + (ASTNode) ast.getChild(1)); + PrivilegeObjectDesc hiveObj = null; + if (ast.getChildCount() > 2) { + ASTNode astChild = (ASTNode) ast.getChild(2); + hiveObj = analyzePrivilegeObject(astChild); + } + + RevokeDesc revokeDesc = new RevokeDesc(privilegeDesc, principalDesc, hiveObj); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + revokeDesc), conf)); + } + + + private PrivilegeObjectDesc analyzePrivilegeObject(ASTNode ast) + throws SemanticException { + PrivilegeObjectDesc subject = new PrivilegeObjectDesc(); + subject.setObject(unescapeIdentifier(ast.getChild(0).getText())); + if (ast.getChildCount() > 1) { + for (int i =0;i< ast.getChildCount();i++) { + ASTNode astChild = (ASTNode) ast.getChild(i); + if (astChild.getToken().getType() == HiveParser.TOK_PARTSPEC) { + subject.setPartSpec(DDLSemanticAnalyzer.getPartSpec(astChild)); + } else { + subject.setTable(ast.getChild(0) != null); + } + } + } + return subject; + } + + private List analyzePrinciplaListDef(ASTNode node) { + List principalList = new ArrayList(); + + for (int i = 0; i < node.getChildCount(); i++) { + ASTNode child = (ASTNode) node.getChild(i); + PrincipalDesc.PrincipalType type = null; + switch (child.getType()) { + case HiveParser.TOK_USER: + type = PrincipalDesc.PrincipalType.USER; + break; + case HiveParser.TOK_GROUP: + type = PrincipalDesc.PrincipalType.GROUP; + break; + case HiveParser.TOK_ROLE: + type = PrincipalDesc.PrincipalType.ROLE; + break; + } + String principlaName = unescapeIdentifier(child.getChild(0).getText()); + PrincipalDesc principalDesc = new PrincipalDesc(principlaName, type); + principalList.add(principalDesc); + } + + return principalList; + } + + private List analyzePrivilegeListDef(ASTNode node) + throws SemanticException { + List ret = new ArrayList(); + for (int i = 0; i < node.getChildCount(); i++) { + ASTNode privilegeDef = (ASTNode) node.getChild(i); + + String privilegeStr = unescapeIdentifier(privilegeDef.getChild(0) + .getText()); + Privilege privObj = PrivilegeRegistry.getPrivilege(privilegeStr); + if (privObj == null) { + throw new SemanticException("undefined privilege " + privilegeStr); + } + List cols = null; + if (privilegeDef.getChildCount() > 1) { + cols = getColumnNames((ASTNode) privilegeDef.getChild(1)); + } + PrivilegeDesc privilegeDesc = new PrivilegeDesc(privObj, cols); + ret.add(privilegeDesc); + } + return ret; + } + + private void analyzeCreateRole(ASTNode ast) { + String roleName = unescapeIdentifier(ast.getChild(0).getText()); + RoleDDLDesc createRoleDesc = new RoleDDLDesc(roleName, + RoleDDLDesc.RoleOperation.CREATE_ROLE); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + createRoleDesc), conf)); + } + + private void analyzeDropRole(ASTNode ast) { + String roleName = unescapeIdentifier(ast.getChild(0).getText()); + RoleDDLDesc createRoleDesc = new RoleDDLDesc(roleName, + RoleDDLDesc.RoleOperation.DROP_ROLE); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + createRoleDesc), conf)); + } + + private void analyzeShowRoleGrant(ASTNode ast) { + ASTNode child = (ASTNode) ast.getChild(0); + boolean isRole = false; + boolean isGroup = false; + switch (child.getType()) { + case HiveParser.TOK_USER: + break; + case HiveParser.TOK_GROUP: + isGroup = true; + break; + case HiveParser.TOK_ROLE: + isRole = true; + break; + } + String principalName = unescapeIdentifier(child.getChild(0).getText()); + RoleDDLDesc createRoleDesc = new RoleDDLDesc(principalName, isRole, isGroup, + RoleDDLDesc.RoleOperation.SHOW_ROLE_GRANT); + createRoleDesc.setResFile(ctx.getResFile().toString()); + rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), + createRoleDesc), conf)); + } + private void analyzeCreateDatabase(ASTNode ast) throws SemanticException { String dbName = unescapeIdentifier(ast.getChild(0).getText()); boolean ifNotExists = false; Index: ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g (revision 1037574) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g (working copy) @@ -189,6 +189,23 @@ TOK_LATERAL_VIEW; TOK_TABALIAS; TOK_ANALYZE; +TOK_CREATEROLE; +TOK_DROPROLE; +TOK_GRANT; +TOK_REVOKE; +TOK_SHOW_GRANT; +TOK_PRIVILEGE_LIST; +TOK_PRIVILEGE; +TOK_PRINCIPAL_NAME; +TOK_USER; +TOK_GROUP; +TOK_ROLE; +TOK_GRANT_WITH_OPTION; +TOK_PRIV_OBJECT; +TOK_PRIV_OBJECT_COL; +TOK_GRANT_ROLE; +TOK_REVOKE_ROLE; +TOK_SHOW_ROLE_GRANT; TOK_SHOWINDEXES; TOK_INDEXCOMMENT; } @@ -260,6 +277,14 @@ | analyzeStatement | lockStatement | unlockStatement + | createRoleStatement + | dropRoleStatement + | grantPrivileges + | revokePrivileges + | showGrants + | showRoleGrants + | grantRole + | revokeRole ; ifExists @@ -702,6 +727,114 @@ : KW_UNLOCK KW_TABLE Identifier partitionSpec? -> ^(TOK_UNLOCKTABLE Identifier partitionSpec?) ; +createRoleStatement +@init { msgs.push("create role"); } +@after { msgs.pop(); } + : KW_CREATE KW_ROLE roleName=Identifier + -> ^(TOK_CREATEROLE $roleName) + ; + +dropRoleStatement +@init {msgs.push("drop role");} +@after {msgs.pop();} + : KW_DROP KW_ROLE roleName=Identifier + -> ^(TOK_DROPROLE $roleName) + ; + +grantPrivileges +@init {msgs.push("grant privileges");} +@after {msgs.pop();} + : KW_GRANT privList=privilegeList + privilegeObject? + KW_TO principalSpecification + (KW_WITH withOption)? + -> ^(TOK_GRANT $privList principalSpecification privilegeObject? withOption?) + ; + +revokePrivileges +@init {msgs.push("revoke privileges");} +@afer {msgs.pop();} + : KW_REVOKE privilegeList privilegeObject? KW_FROM principalSpecification + -> ^(TOK_REVOKE privilegeList principalSpecification privilegeObject?) + ; + +grantRole +@init {msgs.push("grant role");} +@after {msgs.pop();} + : KW_GRANT KW_ROLE Identifier (COMMA Identifier)* KW_TO principalSpecification + -> ^(TOK_GRANT_ROLE principalSpecification Identifier+) + ; + +revokeRole +@init {msgs.push("grant role");} +@after {msgs.pop();} + : KW_REVOKE KW_ROLE Identifier (COMMA Identifier)* KW_FROM principalSpecification + -> ^(TOK_REVOKE_ROLE principalSpecification Identifier+) + ; + +showRoleGrants +@init {msgs.push("show grants");} +@after {msgs.pop();} + : KW_SHOW KW_ROLE KW_GRANT principalName + -> ^(TOK_SHOW_ROLE_GRANT principalName) + ; + +showGrants +@init {msgs.push("show grants");} +@after {msgs.pop();} + : KW_SHOW KW_GRANT principalName privilegeIncludeColObject? + -> ^(TOK_SHOW_GRANT principalName privilegeIncludeColObject?) + ; + +privilegeIncludeColObject +@init {msgs.push("privilege object including columns");} +@after {msgs.pop();} + : KW_ON (table=KW_TABLE|KW_DATABASE) Identifier (LPAREN cols=columnNameList RPAREN)? partitionSpec? + -> ^(TOK_PRIV_OBJECT_COL Identifier $table? $cols? partitionSpec?) + ; + +privilegeObject +@init {msgs.push("privilege subject");} +@after {msgs.pop();} + : KW_ON (table=KW_TABLE|KW_DATABASE) Identifier partitionSpec? + -> ^(TOK_PRIV_OBJECT Identifier $table? partitionSpec?) + ; + +privilegeList +@init {msgs.push("grant privilege list");} +@after {msgs.pop();} + : privlegeDef (COMMA privlegeDef)* + -> ^(TOK_PRIVILEGE_LIST privlegeDef+) + ; + +privlegeDef +@init {msgs.push("grant privilege");} +@after {msgs.pop();} + : Identifier (LPAREN cols=columnNameList RPAREN)? + -> ^(TOK_PRIVILEGE Identifier $cols?) + ; + +principalSpecification +@init { msgs.push("user/group/role name list"); } +@after { msgs.pop(); } + : principalName (COMMA principalName)* -> ^(TOK_PRINCIPAL_NAME principalName+) + ; + +principalName +@init {msgs.push("user|group|role name");} +@after {msgs.pop();} + : KW_USER Identifier -> ^(TOK_USER Identifier) + | KW_GROUP Identifier -> ^(TOK_GROUP Identifier) + | KW_ROLE Identifier -> ^(TOK_ROLE Identifier) + ; + +withOption +@init {msgs.push("grant with option");} +@after {msgs.pop();} + : KW_GRANT KW_OPTION + -> ^(TOK_GRANT_WITH_OPTION) + ; + metastoreCheck @init { msgs.push("metastore check statement"); } @after { msgs.pop(); } @@ -1945,6 +2078,10 @@ KW_COMPUTE: 'COMPUTE'; KW_STATISTICS: 'STATISTICS'; KW_USE: 'USE'; +KW_USER: 'USER'; +KW_ROLE: 'ROLE'; +KW_OPTION: 'OPTION'; + // Operators // NOTE: if you add a new function/operator, add it to sysFuncNames so that describe function _FUNC_ will work. Index: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (revision 1037574) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (working copy) @@ -18,8 +18,6 @@ package org.apache.hadoop.hive.ql.parse; -import static org.apache.hadoop.util.StringUtils.stringifyException; - import java.io.IOException; import java.io.Serializable; import java.util.ArrayList; @@ -125,6 +123,7 @@ import org.apache.hadoop.hive.ql.plan.FilterDesc; import org.apache.hadoop.hive.ql.plan.ForwardDesc; import org.apache.hadoop.hive.ql.plan.GroupByDesc; +import org.apache.hadoop.hive.ql.plan.HiveOperation; import org.apache.hadoop.hive.ql.plan.JoinCondDesc; import org.apache.hadoop.hive.ql.plan.JoinDesc; import org.apache.hadoop.hive.ql.plan.LateralViewForwardDesc; @@ -888,7 +887,7 @@ } catch (HiveException e) { // Has to use full name to make sure it does not conflict with // org.apache.commons.lang.StringUtils - LOG.error(stringifyException(e)); + LOG.error(org.apache.hadoop.util.StringUtils.stringifyException(e)); throw new SemanticException(e.getMessage(), e); } } @@ -924,7 +923,7 @@ // an old SQL construct which has been eliminated in a later Hive // version, so we need to provide full debugging info to help // with fixing the view definition. - LOG.error(stringifyException(e)); + LOG.error(org.apache.hadoop.util.StringUtils.stringifyException(e)); StringBuilder sb = new StringBuilder(); sb.append(e.getMessage()); ErrorMsg.renderOrigin(sb, viewOrigin); @@ -5867,7 +5866,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()) { @@ -5878,7 +5877,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)); } } } @@ -6135,7 +6134,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); } @@ -6491,6 +6490,9 @@ ASTNode child = ast; LOG.info("Starting Semantic Analysis"); + + //overwrite this if needed. + SessionState.get().setCommandType(HiveOperation.QUERY); // analyze create table command if (ast.getToken().getType() == HiveParser.TOK_CREATETABLE) { @@ -6503,12 +6505,13 @@ // analyze create view command if (ast.getToken().getType() == HiveParser.TOK_CREATEVIEW) { child = analyzeCreateView(ast, qb); + SessionState.get().setCommandType(HiveOperation.CREATEVIEW); if (child == null) { return; } viewSelect = child; } - + // continue analyzing from the child ASTNode. doPhase1(child, qb, initPhase1Ctx()); LOG.info("Completed phase 1 of Semantic Analysis"); @@ -7051,6 +7054,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; @@ -7058,6 +7064,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; @@ -7082,6 +7089,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 1037574) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java (working copy) @@ -21,6 +21,7 @@ import java.util.HashMap; import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.plan.HiveOperation; import org.apache.hadoop.hive.ql.session.SessionState; /** @@ -29,63 +30,74 @@ */ public final class SemanticAnalyzerFactory { - static HashMap commandType = new HashMap(); - static HashMap tablePartitionCommandType = new HashMap(); + static HashMap commandType = new HashMap(); + static HashMap tablePartitionCommandType = new HashMap(); static { - commandType.put(HiveParser.TOK_EXPLAIN, "EXPLAIN"); - commandType.put(HiveParser.TOK_LOAD, "LOAD"); - commandType.put(HiveParser.TOK_CREATEDATABASE, "CREATEDATABASE"); - commandType.put(HiveParser.TOK_DROPDATABASE, "DROPDATABASE"); - commandType.put(HiveParser.TOK_SWITCHDATABASE, "SWITCHDATABASE"); - commandType.put(HiveParser.TOK_CREATETABLE, "CREATETABLE"); - commandType.put(HiveParser.TOK_DROPTABLE, "DROPTABLE"); - commandType.put(HiveParser.TOK_DESCTABLE, "DESCTABLE"); - commandType.put(HiveParser.TOK_DESCFUNCTION, "DESCFUNCTION"); - commandType.put(HiveParser.TOK_MSCK, "MSCK"); - commandType.put(HiveParser.TOK_ALTERTABLE_ADDCOLS, "ALTERTABLE_ADDCOLS"); - commandType.put(HiveParser.TOK_ALTERTABLE_REPLACECOLS, "ALTERTABLE_REPLACECOLS"); - commandType.put(HiveParser.TOK_ALTERTABLE_RENAMECOL, "ALTERTABLE_RENAMECOL"); - commandType.put(HiveParser.TOK_ALTERTABLE_RENAME, "ALTERTABLE_RENAME"); - commandType.put(HiveParser.TOK_ALTERTABLE_DROPPARTS, "ALTERTABLE_DROPPARTS"); - commandType.put(HiveParser.TOK_ALTERTABLE_ADDPARTS, "ALTERTABLE_ADDPARTS"); - commandType.put(HiveParser.TOK_ALTERTABLE_TOUCH, "ALTERTABLE_TOUCH"); - commandType.put(HiveParser.TOK_ALTERTABLE_ARCHIVE, "ALTERTABLE_ARCHIVE"); - commandType.put(HiveParser.TOK_ALTERTABLE_UNARCHIVE, "ALTERTABLE_UNARCHIVE"); - commandType.put(HiveParser.TOK_ALTERTABLE_PROPERTIES, "ALTERTABLE_PROPERTIES"); - commandType.put(HiveParser.TOK_ALTERTABLE_SERIALIZER, "ALTERTABLE_SERIALIZER"); - commandType.put(HiveParser.TOK_ALTERTABLE_SERDEPROPERTIES, "ALTERTABLE_SERDEPROPERTIES"); - commandType.put(HiveParser.TOK_ALTERINDEX_REBUILD, "ALTERINDEX_REBUILD"); - commandType.put(HiveParser.TOK_ALTERINDEX_PROPERTIES, "ALTERINDEX_PROPS"); - commandType.put(HiveParser.TOK_SHOWDATABASES, "SHOWDATABASES"); - commandType.put(HiveParser.TOK_SHOWTABLES, "SHOWTABLES"); - commandType.put(HiveParser.TOK_SHOW_TABLESTATUS, "SHOW_TABLESTATUS"); - commandType.put(HiveParser.TOK_SHOWFUNCTIONS, "SHOWFUNCTIONS"); - commandType.put(HiveParser.TOK_SHOWPARTITIONS, "SHOWPARTITIONS"); - commandType.put(HiveParser.TOK_SHOWINDEXES, "SHOWINDEXES"); - commandType.put(HiveParser.TOK_SHOWLOCKS, "SHOWLOCKS"); - commandType.put(HiveParser.TOK_CREATEFUNCTION, "CREATEFUNCTION"); - commandType.put(HiveParser.TOK_DROPFUNCTION, "DROPFUNCTION"); - commandType.put(HiveParser.TOK_CREATEVIEW, "CREATEVIEW"); - commandType.put(HiveParser.TOK_DROPVIEW, "DROPVIEW"); - commandType.put(HiveParser.TOK_CREATEINDEX, "CREATEINDEX"); - commandType.put(HiveParser.TOK_DROPINDEX, "DROPINDEX"); - commandType.put(HiveParser.TOK_ALTERVIEW_PROPERTIES, "ALTERVIEW_PROPERTIES"); - commandType.put(HiveParser.TOK_QUERY, "QUERY"); - commandType.put(HiveParser.TOK_LOCKTABLE, "LOCKTABLE"); - commandType.put(HiveParser.TOK_UNLOCKTABLE, "UNLOCKTABLE"); + commandType.put(HiveParser.TOK_EXPLAIN, HiveOperation.EXPLAIN); + commandType.put(HiveParser.TOK_LOAD, HiveOperation.LOAD); + commandType.put(HiveParser.TOK_CREATEDATABASE, HiveOperation.CREATEDATABASE); + commandType.put(HiveParser.TOK_DROPDATABASE, HiveOperation.DROPDATABASE); + commandType.put(HiveParser.TOK_SWITCHDATABASE, HiveOperation.SWITCHDATABASE); + commandType.put(HiveParser.TOK_CREATETABLE, HiveOperation.CREATETABLE); + commandType.put(HiveParser.TOK_DROPTABLE, HiveOperation.DROPTABLE); + commandType.put(HiveParser.TOK_DESCTABLE, HiveOperation.DESCTABLE); + commandType.put(HiveParser.TOK_DESCFUNCTION, HiveOperation.DESCFUNCTION); + commandType.put(HiveParser.TOK_MSCK, HiveOperation.MSCK); + commandType.put(HiveParser.TOK_ALTERTABLE_ADDCOLS, HiveOperation.ALTERTABLE_ADDCOLS); + commandType.put(HiveParser.TOK_ALTERTABLE_REPLACECOLS, HiveOperation.ALTERTABLE_REPLACECOLS); + commandType.put(HiveParser.TOK_ALTERTABLE_RENAMECOL, HiveOperation.ALTERTABLE_RENAMECOL); + commandType.put(HiveParser.TOK_ALTERTABLE_RENAME, HiveOperation.ALTERTABLE_RENAME); + commandType.put(HiveParser.TOK_ALTERTABLE_DROPPARTS, HiveOperation.ALTERTABLE_DROPPARTS); + commandType.put(HiveParser.TOK_ALTERTABLE_ADDPARTS, HiveOperation.ALTERTABLE_ADDPARTS); + commandType.put(HiveParser.TOK_ALTERTABLE_TOUCH, HiveOperation.ALTERTABLE_TOUCH); + commandType.put(HiveParser.TOK_ALTERTABLE_ARCHIVE, HiveOperation.ALTERTABLE_ARCHIVE); + commandType.put(HiveParser.TOK_ALTERTABLE_UNARCHIVE, HiveOperation.ALTERTABLE_UNARCHIVE); + commandType.put(HiveParser.TOK_ALTERTABLE_PROPERTIES, HiveOperation.ALTERTABLE_PROPERTIES); + commandType.put(HiveParser.TOK_ALTERTABLE_SERIALIZER, HiveOperation.ALTERTABLE_SERIALIZER); + commandType.put(HiveParser.TOK_ALTERTABLE_SERDEPROPERTIES, HiveOperation.ALTERTABLE_SERDEPROPERTIES); + commandType.put(HiveParser.TOK_ALTERTABLE_CLUSTER_SORT, HiveOperation.ALTERTABLE_CLUSTER_SORT); + commandType.put(HiveParser.TOK_SHOWDATABASES, HiveOperation.SHOWDATABASES); + commandType.put(HiveParser.TOK_SHOWTABLES, HiveOperation.SHOWTABLES); + commandType.put(HiveParser.TOK_SHOW_TABLESTATUS, HiveOperation.SHOW_TABLESTATUS); + commandType.put(HiveParser.TOK_SHOWFUNCTIONS, HiveOperation.SHOWFUNCTIONS); + commandType.put(HiveParser.TOK_SHOWINDEXES, HiveOperation.SHOWINDEXES); + commandType.put(HiveParser.TOK_SHOWPARTITIONS, HiveOperation.SHOWPARTITIONS); + commandType.put(HiveParser.TOK_SHOWLOCKS, HiveOperation.SHOWLOCKS); + commandType.put(HiveParser.TOK_CREATEFUNCTION, HiveOperation.CREATEFUNCTION); + commandType.put(HiveParser.TOK_DROPFUNCTION, HiveOperation.DROPFUNCTION); + commandType.put(HiveParser.TOK_CREATEVIEW, HiveOperation.CREATEVIEW); + commandType.put(HiveParser.TOK_DROPVIEW, HiveOperation.DROPVIEW); + commandType.put(HiveParser.TOK_CREATEINDEX, HiveOperation.CREATEINDEX); + commandType.put(HiveParser.TOK_DROPINDEX, HiveOperation.DROPINDEX); + commandType.put(HiveParser.TOK_ALTERINDEX_REBUILD, HiveOperation.ALTERINDEX_REBUILD); + commandType.put(HiveParser.TOK_ALTERVIEW_PROPERTIES, HiveOperation.ALTERVIEW_PROPERTIES); + commandType.put(HiveParser.TOK_QUERY, HiveOperation.QUERY); + commandType.put(HiveParser.TOK_LOCKTABLE, HiveOperation.LOCKTABLE); + commandType.put(HiveParser.TOK_UNLOCKTABLE, HiveOperation.UNLOCKTABLE); + commandType.put(HiveParser.TOK_CREATEROLE, HiveOperation.CREATEROLE); + commandType.put(HiveParser.TOK_DROPROLE, HiveOperation.DROPROLE); + commandType.put(HiveParser.TOK_GRANT, HiveOperation.GRANT_PRIVILEGE); + commandType.put(HiveParser.TOK_REVOKE, HiveOperation.REVOKE_PRIVILEGE); + commandType.put(HiveParser.TOK_SHOW_GRANT, HiveOperation.SHOW_GRANT); + commandType.put(HiveParser.TOK_GRANT_ROLE, HiveOperation.GRANT_ROLE); + commandType.put(HiveParser.TOK_REVOKE_ROLE, HiveOperation.REVOKE_ROLE); + commandType.put(HiveParser.TOK_SHOW_ROLE_GRANT, HiveOperation.SHOW_ROLE_GRANT); } static { - tablePartitionCommandType.put(HiveParser.TOK_ALTERTABLE_ALTERPARTS_PROTECTMODE, - new String[] { "ALTERTABLE_PROTECTMODE", "ALTERPARTITION_PROTECTMODE" }); + tablePartitionCommandType.put( + HiveParser.TOK_ALTERTABLE_ALTERPARTS_PROTECTMODE, + new HiveOperation[] { HiveOperation.ALTERTABLE_PROTECTMODE, + HiveOperation.ALTERPARTITION_PROTECTMODE }); tablePartitionCommandType.put(HiveParser.TOK_ALTERTABLE_FILEFORMAT, - new String[] { "ALTERTABLE_FILEFORMAT", "ALTERPARTITION_FILEFORMAT" }); + new HiveOperation[] { HiveOperation.ALTERTABLE_FILEFORMAT, + HiveOperation.ALTERPARTITION_FILEFORMAT }); tablePartitionCommandType.put(HiveParser.TOK_ALTERTABLE_LOCATION, - new String[] { "ALTERTABLE_LOCATION", "ALTERPARTITION_LOCATION" }); + new HiveOperation[] { HiveOperation.ALTERTABLE_LOCATION, + HiveOperation.ALTERPARTITION_LOCATION }); } - public static BaseSemanticAnalyzer get(HiveConf conf, ASTNode tree) throws SemanticException { if (tree.getToken() == null) { @@ -133,9 +145,17 @@ case HiveParser.TOK_ALTERTABLE_UNARCHIVE: case HiveParser.TOK_LOCKTABLE: case HiveParser.TOK_UNLOCKTABLE: + case HiveParser.TOK_CREATEROLE: + case HiveParser.TOK_DROPROLE: + case HiveParser.TOK_GRANT: + case HiveParser.TOK_REVOKE: + case HiveParser.TOK_SHOW_GRANT: + case HiveParser.TOK_GRANT_ROLE: + case HiveParser.TOK_REVOKE_ROLE: + case HiveParser.TOK_SHOW_ROLE_GRANT: return new DDLSemanticAnalyzer(conf); case HiveParser.TOK_ALTERTABLE_PARTITION: - String commandType = null; + HiveOperation commandType = null; Integer type = ((ASTNode) tree.getChild(1)).getToken().getType(); if (tree.getChild(0).getChildCount() > 1) { commandType = tablePartitionCommandType.get(type)[1]; @@ -153,7 +173,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 1037574) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java (working copy) @@ -57,6 +57,12 @@ private ShowTableStatusDesc showTblStatusDesc; private ShowIndexesDesc showIndexesDesc; + private RoleDDLDesc roleDDLDesc; + private GrantDesc grantDesc; + private ShowGrantDesc showGrantDesc; + private RevokeDesc revokeDesc; + private GrantRevokeRoleDDL grantRevokeRoleDDL; + /** * ReadEntitites that are passed to the hooks. */ @@ -313,6 +319,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; @@ -725,4 +761,68 @@ this.dropIdxDesc = dropIdxDesc; } + /** + * @return role ddl desc + */ + public RoleDDLDesc getRoleDDLDesc() { + return roleDDLDesc; + } + + /** + * @param roleDDLDesc role ddl desc + */ + public void setRoleDDLDesc(RoleDDLDesc roleDDLDesc) { + this.roleDDLDesc = roleDDLDesc; + } + + /** + * @return grant desc + */ + public GrantDesc getGrantDesc() { + return grantDesc; + } + + /** + * @param grantDesc grant desc + */ + public void setGrantDesc(GrantDesc grantDesc) { + this.grantDesc = grantDesc; + } + + /** + * @return show grant desc + */ + public ShowGrantDesc getShowGrantDesc() { + return showGrantDesc; + } + + /** + * @param showGrantDesc + */ + public void setShowGrantDesc(ShowGrantDesc showGrantDesc) { + this.showGrantDesc = showGrantDesc; + } + + public RevokeDesc getRevokeDesc() { + return revokeDesc; + } + + public void setRevokeDesc(RevokeDesc revokeDesc) { + this.revokeDesc = revokeDesc; + } + + /** + * @return + */ + public GrantRevokeRoleDDL getGrantRevokeRoleDDL() { + return grantRevokeRoleDDL; + } + + /** + * @param grantRevokeRoleDDL + */ + public void setGrantRevokeRoleDDL(GrantRevokeRoleDDL grantRevokeRoleDDL) { + this.grantRevokeRoleDDL = grantRevokeRoleDDL; + } + } Index: ql/src/java/org/apache/hadoop/hive/ql/plan/GrantDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/GrantDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/GrantDesc.java (revision 0) @@ -0,0 +1,107 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; +import java.util.List; + +@Explain(displayName = "Grant") +public class GrantDesc extends DDLDesc implements Serializable, Cloneable { + + private static final long serialVersionUID = 1L; + + private List privileges; + + private List principals; + + private boolean grantOption; + + private PrivilegeObjectDesc privilegeSubjectDesc; + + public GrantDesc(PrivilegeObjectDesc privilegeSubject, + List privilegeDesc, List principalDesc, + boolean grantOption) { + super(); + this.privilegeSubjectDesc = privilegeSubject; + this.privileges = privilegeDesc; + this.principals = principalDesc; + this.grantOption = grantOption; + } + + /** + * @return privileges + */ + @Explain(displayName = "Privileges") + public List getPrivileges() { + return privileges; + } + + /** + * @param privileges + */ + public void setPrivileges(List privileges) { + this.privileges = privileges; + } + + /** + * @return principals + */ + @Explain(displayName = "Principals") + public List getPrincipals() { + return principals; + } + + /** + * @param principals + */ + public void setPrincipals(List principals) { + this.principals = principals; + } + + /** + * @return grant option + */ + @Explain(displayName = "grant option") + public boolean isGrantOption() { + return grantOption; + } + + /** + * @param grantOption + */ + public void setGrantOption(boolean grantOption) { + this.grantOption = grantOption; + } + + /** + * @return privilege subject + */ + @Explain(displayName="privilege subject") + public PrivilegeObjectDesc getPrivilegeSubjectDesc() { + return privilegeSubjectDesc; + } + + /** + * @param privilegeSubjectDesc + */ + public void setPrivilegeSubjectDesc(PrivilegeObjectDesc privilegeSubjectDesc) { + this.privilegeSubjectDesc = privilegeSubjectDesc; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/GrantRevokeRoleDDL.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/GrantRevokeRoleDDL.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/GrantRevokeRoleDDL.java (revision 0) @@ -0,0 +1,78 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.util.List; + +@Explain(displayName="grant or revoke roles") +public class GrantRevokeRoleDDL { + + private boolean grant; + + private List principalDesc; + + private List roles; + + public GrantRevokeRoleDDL() { + } + + public GrantRevokeRoleDDL(boolean grant, List roles, List principalDesc) { + super(); + this.grant = grant; + this.principalDesc = principalDesc; + this.roles = roles; + } + + /** + * @return grant or revoke privileges + */ + @Explain(displayName="grant (or revoke)") + public boolean getGrant() { + return grant; + } + + public void setGrant(boolean grant) { + this.grant = grant; + } + + /** + * @return a list of principals + */ + @Explain(displayName="principals") + public List getPrincipalDesc() { + return principalDesc; + } + + public void setPrincipalDesc(List principalDesc) { + this.principalDesc = principalDesc; + } + + /** + * @return a list of roles + */ + @Explain(displayName="roles") + public List getRoles() { + return roles; + } + + public void setRoles(List roles) { + this.roles = roles; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java (revision 0) @@ -0,0 +1,182 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import org.apache.hadoop.hive.ql.security.authorization.Privilege; + +public enum HiveOperation { + + EXPLAIN("EXPLAIN", null, null), + LOAD("LOAD", null, new Privilege[]{Privilege.ALTER_DATA}), + CREATEDATABASE("CREATEDATABASE", null, null), + DROPDATABASE("DROPDATABASE", null, null), + SWITCHDATABASE("SWITCHDATABASE", null, null), + DROPTABLE ("DROPTABLE", null, new Privilege[]{Privilege.DROP}), + DESCTABLE("DESCTABLE", null, null), + DESCFUNCTION("DESCFUNCTION", null, null), + MSCK("MSCK", null, null), + ALTERTABLE_ADDCOLS("ALTERTABLE_ADDCOLS", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_REPLACECOLS("ALTERTABLE_REPLACECOLS", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_RENAMECOL("ALTERTABLE_RENAMECOL", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_RENAME("ALTERTABLE_RENAME", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_DROPPARTS("ALTERTABLE_DROPPARTS", new Privilege[]{Privilege.DROP}, null), + ALTERTABLE_ADDPARTS("ALTERTABLE_ADDPARTS", new Privilege[]{Privilege.CREATE}, null), + ALTERTABLE_TOUCH("ALTERTABLE_TOUCH", null, null), + ALTERTABLE_ARCHIVE("ALTERTABLE_ARCHIVE", new Privilege[]{Privilege.ALTER_DATA}, null), + ALTERTABLE_UNARCHIVE("ALTERTABLE_UNARCHIVE", new Privilege[]{Privilege.ALTER_DATA}, null), + ALTERTABLE_PROPERTIES("ALTERTABLE_PROPERTIES", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_SERIALIZER("ALTERTABLE_SERIALIZER", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_SERDEPROPERTIES("ALTERTABLE_SERDEPROPERTIES", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_CLUSTER_SORT("ALTERTABLE_CLUSTER_SORT", new Privilege[]{Privilege.ALTER_METADATA}, null), + SHOWDATABASES("SHOWDATABASES", new Privilege[]{Privilege.SHOW_DATABASE}, null), + SHOWTABLES("SHOWTABLES", null, null), + SHOW_TABLESTATUS("SHOW_TABLESTATUS", null, null), + SHOWFUNCTIONS("SHOWFUNCTIONS", null, null), + SHOWINDEXES("SHOWINDEXES", null, null), + SHOWPARTITIONS("SHOWPARTITIONS", null, null), + SHOWLOCKS("SHOWLOCKS", null, null), + CREATEFUNCTION("CREATEFUNCTION", null, null), + DROPFUNCTION("DROPFUNCTION", null, null), + CREATEVIEW("CREATEVIEW", null, null), + DROPVIEW("DROPVIEW", null, null), + CREATEINDEX("CREATEINDEX", null, null), + DROPINDEX("DROPINDEX", null, null), + ALTERINDEX_REBUILD("ALTERINDEX_REBUILD", null, null), + ALTERVIEW_PROPERTIES("ALTERVIEW_PROPERTIES", null, null), + LOCKTABLE("LOCKTABLE", new Privilege[]{Privilege.LOCK}, null), + UNLOCKTABLE("UNLOCKTABLE", new Privilege[]{Privilege.LOCK}, null), + CREATEROLE("CREATEROLE", null, null), + DROPROLE("DROPROLE", null, null), + GRANT_PRIVILEGE("GRANT_PRIVILEGE", null, null), + REVOKE_PRIVILEGE("REVOKE_PRIVILEGE", null, null), + SHOW_GRANT("SHOW_GRANT", null, null), + GRANT_ROLE("GRANT_ROLE", null, null), + REVOKE_ROLE("REVOKE_ROLE", null, null), + SHOW_ROLE_GRANT("SHOW_ROLE_GRANT", null, null), + ALTERTABLE_PROTECTMODE("ALTERTABLE_PROTECTMODE", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERPARTITION_PROTECTMODE("ALTERPARTITION_PROTECTMODE", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_FILEFORMAT("ALTERTABLE_FILEFORMAT", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERPARTITION_FILEFORMAT("ALTERPARTITION_FILEFORMAT", new Privilege[]{Privilege.ALTER_METADATA}, null), + ALTERTABLE_LOCATION("ALTERTABLE_LOCATION", new Privilege[]{Privilege.ALTER_DATA}, null), + ALTERPARTITION_LOCATION("ALTERPARTITION_LOCATION", new Privilege[]{Privilege.ALTER_DATA}, null), + CREATETABLE("CREATETABLE", null, new Privilege[]{Privilege.CREATE}), + CREATETABLE_AS_SELECT("CREATETABLE_AS_SELECT", new Privilege[]{Privilege.SELECT}, new Privilege[]{Privilege.CREATE}), + QUERY("QUERY", new Privilege[]{Privilege.SELECT}, new Privilege[]{Privilege.ALTER_DATA, Privilege.CREATE}), + ; + + private String operationName; + + private Privilege[] inputRequiredPrivileges; + + private Privilege[] outputRequiredPrivileges; + + public Privilege[] getInputRequiredPrivileges() { + return inputRequiredPrivileges; + } + + public Privilege[] getOutputRequiredPrivileges() { + return outputRequiredPrivileges; + } + + public String getOperationName() { + return operationName; + } + + private HiveOperation(String operationName, + Privilege[] inputRequiredPrivileges, Privilege[] outputRequiredPrivileges) { + this.operationName = operationName; + this.inputRequiredPrivileges = inputRequiredPrivileges; + this.outputRequiredPrivileges = outputRequiredPrivileges; + } + + public static class PrivilegeAgreement { + + private Privilege[] inputUserLevelRequiredPriv; + private Privilege[] inputDBLevelRequiredPriv; + private Privilege[] inputTableLevelRequiredPriv; + private Privilege[] inputColumnLevelRequiredPriv; + private Privilege[] outputUserLevelRequiredPriv; + private Privilege[] outputDBLevelRequiredPriv; + private Privilege[] outputTableLevelRequiredPriv; + private Privilege[] outputColumnLevelRequiredPriv; + + public PrivilegeAgreement putUserLevelRequiredPriv( + Privilege[] inputUserLevelRequiredPriv, + Privilege[] outputUserLevelRequiredPriv) { + this.inputUserLevelRequiredPriv = inputUserLevelRequiredPriv; + this.outputUserLevelRequiredPriv = outputUserLevelRequiredPriv; + return this; + } + + public PrivilegeAgreement putDBLevelRequiredPriv( + Privilege[] inputDBLevelRequiredPriv, + Privilege[] outputDBLevelRequiredPriv) { + this.inputDBLevelRequiredPriv = inputDBLevelRequiredPriv; + this.outputDBLevelRequiredPriv = outputDBLevelRequiredPriv; + return this; + } + + public PrivilegeAgreement putTableLevelRequiredPriv( + Privilege[] inputTableLevelRequiredPriv, + Privilege[] outputTableLevelRequiredPriv) { + this.inputTableLevelRequiredPriv = inputTableLevelRequiredPriv; + this.outputTableLevelRequiredPriv = outputTableLevelRequiredPriv; + return this; + } + + public PrivilegeAgreement putColumnLevelRequiredPriv( + Privilege[] inputColumnLevelPriv, Privilege[] outputColumnLevelPriv) { + this.inputColumnLevelRequiredPriv = inputColumnLevelPriv; + this.outputColumnLevelRequiredPriv = outputColumnLevelPriv; + return this; + } + + public Privilege[] getInputUserLevelRequiredPriv() { + return inputUserLevelRequiredPriv; + } + + public Privilege[] getInputDBLevelRequiredPriv() { + return inputDBLevelRequiredPriv; + } + + public Privilege[] getInputTableLevelRequiredPriv() { + return inputTableLevelRequiredPriv; + } + + public Privilege[] getInputColumnLevelRequiredPriv() { + return inputColumnLevelRequiredPriv; + } + + public Privilege[] getOutputUserLevelRequiredPriv() { + return outputUserLevelRequiredPriv; + } + + public Privilege[] getOutputDBLevelRequiredPriv() { + return outputDBLevelRequiredPriv; + } + + public Privilege[] getOutputTableLevelRequiredPriv() { + return outputTableLevelRequiredPriv; + } + + public Privilege[] getOutputColumnLevelRequiredPriv() { + return outputColumnLevelRequiredPriv; + } + } +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/PrincipalDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/PrincipalDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/PrincipalDesc.java (revision 0) @@ -0,0 +1,64 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; + +@Explain(displayName = "Principal") +public class PrincipalDesc implements Serializable, Cloneable { + + private static final long serialVersionUID = 1L; + + public static enum PrincipalType { + USER, GROUP, ROLE; + } + + private String name; + + private PrincipalType type; + + public PrincipalDesc(String name, PrincipalType type) { + super(); + this.name = name; + this.type = type; + } + + public PrincipalDesc() { + super(); + } + + @Explain(displayName="name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Explain(displayName="type") + public PrincipalType getType() { + return type; + } + + public void setType(PrincipalType type) { + this.type = type; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeDesc.java (revision 0) @@ -0,0 +1,74 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; +import java.util.List; + +import org.apache.hadoop.hive.ql.security.authorization.Privilege; + +@Explain(displayName = "Privilege") +public class PrivilegeDesc implements Serializable, Cloneable { + private static final long serialVersionUID = 1L; + + private Privilege privilege; + + private List columns; + + public PrivilegeDesc(Privilege privilege, List columns) { + super(); + this.privilege = privilege; + this.columns = columns; + } + + public PrivilegeDesc() { + super(); + } + + /** + * @return privilege definition + */ + @Explain(displayName = "privilege") + public Privilege getPrivilege() { + return privilege; + } + + /** + * @param privilege + */ + public void setPrivilege(Privilege privilege) { + this.privilege = privilege; + } + + /** + * @return columns on which the given privilege take affect. + */ + @Explain(displayName = "columns") + public List getColumns() { + return columns; + } + + /** + * @param columns + */ + public void setColumns(List columns) { + this.columns = columns; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeObjectDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeObjectDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeObjectDesc.java (revision 0) @@ -0,0 +1,70 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.util.HashMap; + +@Explain(displayName="privilege subject") +public class PrivilegeObjectDesc { + + private boolean table; + + private String object; + + private HashMap partSpec; + + public PrivilegeObjectDesc(boolean isTable, String object, + HashMap partSpec) { + super(); + this.table = isTable; + this.object = object; + this.partSpec = partSpec; + } + + public PrivilegeObjectDesc() { + } + + @Explain(displayName="is table") + public boolean getTable() { + return table; + } + + public void setTable(boolean isTable) { + this.table = isTable; + } + + @Explain(displayName="object") + public String getObject() { + return object; + } + + public void setObject(String object) { + this.object = object; + } + + @Explain(displayName="partition spec") + public HashMap getPartSpec() { + return partSpec; + } + + public void setPartSpec(HashMap partSpec) { + this.partSpec = partSpec; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/RevokeDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/RevokeDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/RevokeDesc.java (revision 0) @@ -0,0 +1,70 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; +import java.util.List; + +@Explain(displayName="Revoke") +public class RevokeDesc extends DDLDesc implements Serializable, Cloneable { + + private static final long serialVersionUID = 1L; + + private List privileges; + + private List principals; + + private PrivilegeObjectDesc privilegeSubjectDesc; + + public RevokeDesc(){ + } + + public RevokeDesc(List privileges, + List principals, PrivilegeObjectDesc privilegeSubjectDesc) { + super(); + this.privileges = privileges; + this.principals = principals; + this.privilegeSubjectDesc = privilegeSubjectDesc; + } + + public List getPrivileges() { + return privileges; + } + + public void setPrivileges(List privileges) { + this.privileges = privileges; + } + + public List getPrincipals() { + return principals; + } + + public void setPrincipals(List principals) { + this.principals = principals; + } + + public PrivilegeObjectDesc getPrivilegeSubjectDesc() { + return privilegeSubjectDesc; + } + + public void setPrivilegeSubjectDesc(PrivilegeObjectDesc privilegeSubjectDesc) { + this.privilegeSubjectDesc = privilegeSubjectDesc; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/RoleDDLDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/RoleDDLDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/RoleDDLDesc.java (revision 0) @@ -0,0 +1,115 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.plan; + +import java.io.Serializable; + +@Explain(displayName = "Create Role") +public class RoleDDLDesc extends DDLDesc implements Serializable { + + private static final long serialVersionUID = 1L; + + private String name; + + private boolean role; + + private boolean group; + + private RoleOperation operation; + + private String resFile; + + public static enum RoleOperation { + DROP_ROLE("drop_role"), CREATE_ROLE("create_role"), SHOW_ROLE_GRANT("show_roles"); + private String operationName; + + private RoleOperation() { + } + + private RoleOperation(String operationName) { + this.operationName = operationName; + } + + public String getOperationName() { + return operationName; + } + + public String toString () { + return this.operationName; + } + } + + public RoleDDLDesc(){ + } + + public RoleDDLDesc(String roleName, RoleOperation operation) { + this(roleName, false, false, operation); + } + + public RoleDDLDesc(String principalName, boolean isRole, boolean isGroup, + RoleOperation operation) { + this.name = principalName; + this.role = isRole; + this.group = isGroup; + this.operation = operation; + } + + @Explain(displayName = "name") + public String getName() { + return name; + } + + public void setName(String roleName) { + this.name = roleName; + } + + @Explain(displayName = "role operation") + public RoleOperation getOperation() { + return operation; + } + + public void setOperation(RoleOperation operation) { + this.operation = operation; + } + + public boolean getRole() { + return role; + } + + public void setRole(boolean role) { + this.role = role; + } + + public boolean getGroup() { + return group; + } + + public void setGroup(boolean group) { + this.group = group; + } + + public String getResFile() { + return resFile; + } + + public void setResFile(String resFile) { + this.resFile = resFile; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/plan/ShowGrantDesc.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/ShowGrantDesc.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/ShowGrantDesc.java (revision 0) @@ -0,0 +1,78 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.plan; + +import java.util.List; + +@Explain(displayName="show grant desc") +public class ShowGrantDesc { + + private PrincipalDesc principalDesc; + + private PrivilegeObjectDesc hiveObj; + + private List columns; + + private String resFile; + + public ShowGrantDesc(){ + } + + public ShowGrantDesc(String resFile, PrincipalDesc principalDesc, + PrivilegeObjectDesc subjectObj, List columns) { + this.resFile = resFile; + this.principalDesc = principalDesc; + this.hiveObj = subjectObj; + this.columns = columns; + } + + @Explain(displayName="principal desc") + public PrincipalDesc getPrincipalDesc() { + return principalDesc; + } + + public void setPrincipalDesc(PrincipalDesc principalDesc) { + this.principalDesc = principalDesc; + } + + @Explain(displayName="object") + public PrivilegeObjectDesc getHiveObj() { + return hiveObj; + } + + public void setHiveObj(PrivilegeObjectDesc subjectObj) { + this.hiveObj = subjectObj; + } + + public String getResFile() { + return resFile; + } + + public void setResFile(String resFile) { + this.resFile = resFile; + } + + public List getColumns() { + return columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/Authenticator.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/Authenticator.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/Authenticator.java (revision 0) @@ -0,0 +1,35 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security; + +import java.util.List; + +import org.apache.hadoop.conf.Configuration; + +public interface Authenticator { + + public String getUserName(); + + public List getGroupNames(); + + public boolean detroy(); + + public void init(Configuration conf); + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/AuthenticatorFactory.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/AuthenticatorFactory.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/AuthenticatorFactory.java (revision 0) @@ -0,0 +1,53 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +public class AuthenticatorFactory { + + @SuppressWarnings("unchecked") + public static Authenticator getAuthenticator(Configuration conf) + throws HiveException { + + String clsStr = HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHENTICATOR_MANAGER); + + Authenticator ret = null; + try { + Class cls = null; + if (clsStr == null || clsStr.trim().equals("")) { + cls = HadoopDefaultAuthenticator.class; + } else { + cls = (Class) Class + .forName(clsStr); + } + if (cls != null) { + ret = cls.newInstance(); + ret.init(conf); + } + } catch (Exception e) { + throw new HiveException(e); + } + + return ret; + } +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/HadoopDefaultAuthenticator.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/HadoopDefaultAuthenticator.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/HadoopDefaultAuthenticator.java (revision 0) @@ -0,0 +1,71 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security; + +import java.util.Arrays; +import java.util.List; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.shims.ShimLoader; +import org.apache.hadoop.security.UserGroupInformation; + +public class HadoopDefaultAuthenticator implements Authenticator { + + private String userName; + private List groupNames; + + @Override + public List getGroupNames() { + return groupNames; + } + + @Override + public String getUserName() { + return userName; + } + + @Override + public void init(Configuration conf) { + UserGroupInformation ugi = null; + try { + ugi = ShimLoader.getHadoopShims().getUGIForConf(conf); + } catch (Exception e) { + throw new RuntimeException(e); + } + + if (ugi == null) { + throw new RuntimeException( + "Can not initialize HadoopDefaultAuthenticator."); + } + + this.userName = ugi.getUserName(); + if (ugi.getGroupNames() != null) { + this.groupNames = Arrays.asList(ugi.getGroupNames()); + } + + System.out.println("User Name is :" + this.getUserName()); + System.out.println("Group Names are :" + this.getGroupNames()); + } + + @Override + public boolean detroy() { + return true; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationManagerFactory.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationManagerFactory.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationManagerFactory.java (revision 0) @@ -0,0 +1,56 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.security.Authenticator; + +public class AuthorizationManagerFactory { + + @SuppressWarnings("unchecked") + public static AuthorizationProviderManager getAuthorizeProviderManager( + Configuration conf, Authenticator authenticator) throws HiveException { + + String clsStr = HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER); + + AuthorizationProviderManager ret = null; + try { + Class cls = null; + if (clsStr == null || clsStr.trim().equals("")) { + cls = DefaultAuthorizationProviderManager.class; + } else { + cls = (Class) Class + .forName(clsStr); + } + if (cls != null) { + ret = cls.newInstance(); + ret.init(conf); + } + } catch (Exception e) { + throw new HiveException(e); + } + + ret.setAuthenticator(authenticator); + return ret; + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProvider.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProvider.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProvider.java (revision 0) @@ -0,0 +1,41 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.Partition; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.metastore.api.Table; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +public interface AuthorizationProvider { + + public void init(Configuration conf) throws HiveException; + + public boolean access(Table table, PrincipalPrivilegeSet privs); + + public boolean access(Partition part, PrincipalPrivilegeSet privs); + + public boolean access(Table table, FieldSchema column, PrincipalPrivilegeSet privs); + + public boolean access(PrincipalPrivilegeSet privs); + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProviderManager.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProviderManager.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationProviderManager.java (revision 0) @@ -0,0 +1,144 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import java.util.List; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.metastore.api.Database; +import org.apache.hadoop.hive.ql.metadata.AuthorizationException; +import org.apache.hadoop.hive.ql.metadata.Hive; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.metadata.Partition; +import org.apache.hadoop.hive.ql.metadata.Table; +import org.apache.hadoop.hive.ql.security.Authenticator; + +/** + * Hive's authorization provider manager's interface. + */ +public abstract class AuthorizationProviderManager { + + protected Authenticator authenticator; + + protected Hive hive_db; + + public void init(Configuration conf) throws HiveException { + hive_db = Hive.get(new HiveConf(conf, AuthorizationProviderManager.class)); + } + + protected Authenticator getAuthenticator() { + return authenticator; + } + + protected void setAuthenticator(Authenticator authenticator) { + this.authenticator = authenticator; + } + + /** + * Authorization user level privileges. + * + * @param readRequiredPriv + * a list of privileges needed for inputs. + * @param writeRequiredPriv + * a list of privileges needed for outputs. + * @return + * @throws HiveException + * @throws AuthorizationException + */ + public abstract boolean authorize(Privilege[] readRequiredPriv, + Privilege[] writeRequiredPriv) throws HiveException, + AuthorizationException; + + /** + * Authorization privileges against a database object. + * + * @param db + * database + * @param readRequiredPriv + * a list of privileges needed for inputs. + * @param writeRequiredPriv + * a list of privileges needed for outputs. + * @return + * @throws HiveException + * @throws AuthorizationException + */ + public abstract boolean authorize(Database db, Privilege[] readRequiredPriv, + Privilege[] writeRequiredPriv) throws HiveException, + AuthorizationException; + + /** + * Authorization privileges against a hive table object. + * + * @param table + * table object + * @param readRequiredPriv + * a list of privileges needed for inputs. + * @param writeRequiredPriv + * a list of privileges needed for outputs. + * @return + * @throws HiveException + * @throws AuthorizationException + */ + public abstract boolean authorize(Table table, Privilege[] readRequiredPriv, + Privilege[] writeRequiredPriv) throws HiveException, + AuthorizationException; + + /** + * Authorization privileges against a hive partition object. + * + * @param part + * partition object + * @param readRequiredPriv + * a list of privileges needed for inputs. + * @param writeRequiredPriv + * a list of privileges needed for outputs. + * @return + * @throws HiveException + * @throws AuthorizationException + */ + public abstract boolean authorize(Partition part, + Privilege[] readRequiredPriv, Privilege[] writeRequiredPriv) + throws HiveException, AuthorizationException; + + /** + * Authorization privileges against a list of columns. If the partition object + * is not null, look at the column grants for the given partition. Otherwise + * look at the table column grants. + * + * @param table + * table object + * @param part + * partition object + * @param columns + * a list of columns + * @param readRequiredPriv + * a list of privileges needed for inputs. + * @param writeRequiredPriv + * a list of privileges needed for outputs. + * @return + * @throws HiveException + * @throws AuthorizationException + */ + public abstract boolean authorize(Table table, Partition part, + List columns, Privilege[] readRequiredPriv, + Privilege[] writeRequiredPriv) throws HiveException, + AuthorizationException; + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/DefaultAuthorizationProviderManager.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/DefaultAuthorizationProviderManager.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/DefaultAuthorizationProviderManager.java (revision 0) @@ -0,0 +1,433 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.apache.hadoop.hive.metastore.api.Database; +import org.apache.hadoop.hive.metastore.api.PrincipalPrivilegeSet; +import org.apache.hadoop.hive.ql.metadata.AuthorizationException; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.metadata.Partition; +import org.apache.hadoop.hive.ql.metadata.Table; +import org.apache.hadoop.util.StringUtils; + +public class DefaultAuthorizationProviderManager extends + AuthorizationProviderManager { + + static class BitSetChecker { + + boolean[] inputCheck = null; + boolean[] outputCheck = null; + + public static BitSetChecker getBitSetChecker(Privilege[] inputRequiredPriv, + Privilege[] outputRequiredPriv) { + BitSetChecker checker = new BitSetChecker(); + if (inputRequiredPriv != null) { + checker.inputCheck = new boolean[inputRequiredPriv.length]; + for (int i = 0; i < checker.inputCheck.length; i++) { + checker.inputCheck[i] = false; + } + } + if (outputRequiredPriv != null) { + checker.outputCheck = new boolean[outputRequiredPriv.length]; + for (int i = 0; i < checker.outputCheck.length; i++) { + checker.outputCheck[i] = false; + } + } + + return checker; + } + + } + + @Override + public boolean authorize(Privilege[] inputRequiredPriv, + Privilege[] outputRequiredPriv) throws HiveException, AuthorizationException { + + BitSetChecker checker = BitSetChecker.getBitSetChecker(inputRequiredPriv, + outputRequiredPriv); + boolean[] inputCheck = checker.inputCheck; + boolean[] outputCheck = checker.outputCheck; + + boolean pass = authorizeUserPriv(inputRequiredPriv, inputCheck, outputRequiredPriv, + outputCheck); + checkAndThrowAuthorizationException(inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck, null, null, null, null); + return pass; + } + + @Override + public boolean authorize(Database db, Privilege[] inputRequiredPriv, + Privilege[] outputRequiredPriv) throws HiveException, AuthorizationException { + + BitSetChecker checker = BitSetChecker.getBitSetChecker(inputRequiredPriv, + outputRequiredPriv); + boolean[] inputCheck = checker.inputCheck; + boolean[] outputCheck = checker.outputCheck; + + boolean pass = authorizeUserAndDBPriv(db, inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck); + + checkAndThrowAuthorizationException(inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck, db.getName(), null, null, null); + + return pass; + } + + @Override + public boolean authorize(Table table, Privilege[] inputRequiredPriv, + Privilege[] outputRequiredPriv) throws HiveException { + BitSetChecker checker = BitSetChecker.getBitSetChecker(inputRequiredPriv, + outputRequiredPriv); + boolean[] inputCheck = checker.inputCheck; + boolean[] outputCheck = checker.outputCheck; + + boolean pass = authorizeUserDBAndTable(table, inputRequiredPriv, + outputRequiredPriv, inputCheck, outputCheck); + checkAndThrowAuthorizationException(inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck, table.getDbName(), table.getTableName(), + null, null); + + return pass; + } + + @Override + public boolean authorize(Partition part, Privilege[] inputRequiredPriv, + Privilege[] outputRequiredPriv) throws HiveException { + BitSetChecker checker = BitSetChecker.getBitSetChecker(inputRequiredPriv, + outputRequiredPriv); + boolean[] inputCheck = checker.inputCheck; + boolean[] outputCheck = checker.outputCheck; + + if (authorizeUserDbAndPartition(part, inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck)){ + return true; + } + + checkAndThrowAuthorizationException(inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck, part.getTable().getDbName(), part + .getTable().getTableName(), part.getName(), null); + + return false; + } + + @Override + public boolean authorize(Table table, Partition part, List columns, + Privilege[] inputRequiredPriv, Privilege[] outputRequiredPriv) + throws HiveException { + BitSetChecker checker = BitSetChecker.getBitSetChecker(inputRequiredPriv, + outputRequiredPriv); + boolean[] inputCheck = checker.inputCheck; + boolean[] outputCheck = checker.outputCheck; + + String partName = null; + if (part != null) { + partName = part.getName(); + } + + if (partName == null) { + if (authorizeUserDBAndTable(table, inputRequiredPriv, outputRequiredPriv, + inputCheck, outputCheck)) { + return true; + } + } else { + if (authorizeUserDbAndPartition(part, inputRequiredPriv, + outputRequiredPriv, inputCheck, outputCheck)) { + return true; + } + } + + for (String col : columns) { + + BitSetChecker checker2 = BitSetChecker.getBitSetChecker( + inputRequiredPriv, outputRequiredPriv); + boolean[] inputCheck2 = checker2.inputCheck; + boolean[] outputCheck2 = checker2.outputCheck; + + PrincipalPrivilegeSet partColumnPrivileges = hive_db + .get_column_privilege_set(table.getDbName(), table.getTableName(), + partName, col, this.getAuthenticator().getUserName(), this + .getAuthenticator().getGroupNames()); + + authorizePrivileges(partColumnPrivileges, inputRequiredPriv, inputCheck2, + outputRequiredPriv, outputCheck2); + + if (inputCheck2 != null) { + booleanArrayOr(inputCheck2, inputCheck); + } + if (outputCheck2 != null) { + booleanArrayOr(inputCheck2, inputCheck); + } + + checkAndThrowAuthorizationException(inputRequiredPriv, + outputRequiredPriv, inputCheck2, outputCheck2, table.getDbName(), + table.getTableName(), partName, col); + } + + return true; + } + + protected boolean authorizeUserPriv(Privilege[] inputRequiredPriv, + boolean[] inputCheck, Privilege[] outputRequiredPriv, + boolean[] outputCheck) throws HiveException { + PrincipalPrivilegeSet privileges = hive_db.get_user_privilege_set(this + .getAuthenticator().getUserName(), this.getAuthenticator() + .getGroupNames()); + return authorizePrivileges(privileges, inputRequiredPriv, inputCheck, + outputRequiredPriv, outputCheck); + } + + private boolean authorizeUserAndDBPriv(Database db, + Privilege[] inputRequiredPriv, Privilege[] outputRequiredPriv, + boolean[] inputCheck, boolean[] outputCheck) throws HiveException { + if (authorizeUserPriv(inputRequiredPriv, inputCheck, outputRequiredPriv, + outputCheck)) { + return true; + } + + PrincipalPrivilegeSet dbPrivileges = hive_db.get_db_privilege_set(db + .getName(), this.getAuthenticator().getUserName(), this + .getAuthenticator().getGroupNames()); + + if (authorizePrivileges(dbPrivileges, inputRequiredPriv, inputCheck, + outputRequiredPriv, outputCheck)) { + return true; + } + + return false; + } + + private boolean authorizeUserDBAndTable(Table table, + Privilege[] inputRequiredPriv, Privilege[] outputRequiredPriv, + boolean[] inputCheck, boolean[] outputCheck) throws HiveException { + + if (authorizeUserAndDBPriv(hive_db.getDatabase(table.getDbName()), + inputRequiredPriv, outputRequiredPriv, inputCheck, outputCheck)) { + return true; + } + + PrincipalPrivilegeSet tablePrivileges = hive_db.get_table_privilege_set( + table.getDbName(), table.getTableName(), this.getAuthenticator() + .getUserName(), this.getAuthenticator().getGroupNames()); + + if (authorizePrivileges(tablePrivileges, inputRequiredPriv, inputCheck, + outputRequiredPriv, outputCheck)) { + return true; + } + + return false; + } + + private boolean authorizeUserDbAndPartition(Partition part, + Privilege[] inputRequiredPriv, Privilege[] outputRequiredPriv, + boolean[] inputCheck, boolean[] outputCheck) throws HiveException { + + if (authorizeUserAndDBPriv( + hive_db.getDatabase(part.getTable().getDbName()), inputRequiredPriv, + outputRequiredPriv, inputCheck, outputCheck)) { + return true; + } + + PrincipalPrivilegeSet partPrivileges = part.getTPartition().getPrivileges(); + if(partPrivileges == null) { + partPrivileges = hive_db + .get_partition_privilege_set(part.getTable().getDbName(), part + .getTable().getTableName(), part.getName(), this.getAuthenticator() + .getUserName(), this.getAuthenticator().getGroupNames()); + } + + if (authorizePrivileges(partPrivileges, inputRequiredPriv, inputCheck, + outputRequiredPriv, outputCheck)) { + return true; + } + + return false; + } + + protected boolean authorizePrivileges(PrincipalPrivilegeSet privileges, + Privilege[] inputPriv, boolean[] inputCheck, Privilege[] outputPriv, + boolean[] outputCheck) throws HiveException { + + boolean pass = true; + if (inputPriv != null) { + pass = pass && matchPrivs(inputPriv, privileges, inputCheck); + } + if (outputPriv != null) { + pass = pass && matchPrivs(outputPriv, privileges, outputCheck); + } + return pass; + } + + /** + * try to match an array of privileges from user/groups/roles grants. + * + * @param container + */ + private boolean matchPrivs(Privilege[] inputPriv, + PrincipalPrivilegeSet privileges, boolean[] check) { + + if (inputPriv == null) + return true; + + /* + * user grants + */ + Set privSet = new HashSet(); + if (privileges.getUserPrivileges() != null + && privileges.getUserPrivileges().size() > 0) { + Collection userPrivs = privileges.getUserPrivileges().values(); + if (userPrivs != null && userPrivs.size() > 0) { + for (String priv : userPrivs) { + if (priv == null || priv.trim().equals("")) + continue; + + String[] privs = priv.split(StringUtils.COMMA_STR); + for (String p : privs) { + if (p.equals(Privilege.ALL)) { + setBooleanArray(check, true); + return true; + } + privSet.add(p.toLowerCase()); + } + } + } + } + + /* + * group grants + */ + if (privileges.getGroupPrivileges() != null + && privileges.getGroupPrivileges().size() > 0) { + Collection groupPrivs = privileges.getGroupPrivileges().values(); + if (groupPrivs != null && groupPrivs.size() > 0) { + for (String priv : groupPrivs) { + if (priv == null || priv.trim().equals("")) + continue; + + String[] privs = priv.split(StringUtils.COMMA_STR); + for (String p : privs) { + if (p.equals(Privilege.ALL)) { + setBooleanArray(check, true); + return true; + } + privSet.add(p.toLowerCase()); + } + } + } + } + + /* + * roles grants + */ + if (privileges.getRolePrivileges() != null + && privileges.getRolePrivileges().size() > 0) { + Collection rolePrivs = privileges.getRolePrivileges().values(); + if (rolePrivs != null && rolePrivs.size() > 0) { + for (String priv : rolePrivs) { + if (priv == null || priv.trim().equals("")) + continue; + + String[] privs = priv.split(StringUtils.COMMA_STR); + for (String p : privs) { + if (p.equals(Privilege.ALL)) { + setBooleanArray(check, true); + return true; + } + privSet.add(p.toLowerCase()); + } + } + } + } + + for (int i = 0; i < inputPriv.length; i++) { + String toMatch = inputPriv[i].getPriv(); + if (!check[i]) { + check[i] = privSet.contains(toMatch.toLowerCase()); + } + } + + return firstFalseIndex(check) <0; + } + + private static void setBooleanArray(boolean[] check, boolean b) { + for (int i = 0; i < check.length; i++) { + check[i] = b; + } + } + + private static void booleanArrayOr(boolean[] output, boolean[] input) { + for (int i = 0; i < output.length && i < input.length; i++) { + output[i] = output[i] || input[i]; + } + } + + private void checkAndThrowAuthorizationException( + Privilege[] inputRequiredPriv, Privilege[] outputRequiredPriv, + boolean[] inputCheck, boolean[] outputCheck,String dbName, + String tableName, String partitionName, String columnName) { + + String hiveObject = "{ "; + if (dbName != null) { + hiveObject = hiveObject + "database:" + dbName; + } + if (tableName != null) { + hiveObject = hiveObject + ", table:" + tableName; + } + if (partitionName != null) { + hiveObject = hiveObject + ", partitionName:" + partitionName; + } + if (columnName != null) { + hiveObject = hiveObject + ", columnName:" + columnName; + } + hiveObject = hiveObject + "}"; + + if (inputCheck != null) { + int input = this.firstFalseIndex(inputCheck); + if (input >= 0) { + throw new AuthorizationException("No privilege '" + + inputRequiredPriv[input].getPriv() + "' found for inputs " + + hiveObject); + } + } + + if (outputCheck != null) { + int output = this.firstFalseIndex(outputCheck); + if (output >= 0) { + throw new AuthorizationException("No privilege '" + + outputRequiredPriv[output].getPriv() + "' found for outputs " + + hiveObject); + } + } + } + + private int firstFalseIndex(boolean[] inputCheck) { + if (inputCheck != null) { + for (int i = 0; i < inputCheck.length; i++) { + if (!inputCheck[i]) { + return i; + } + } + } + return -1; + } +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/Privilege.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/Privilege.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/Privilege.java (revision 0) @@ -0,0 +1,94 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import java.util.EnumSet; + +public class Privilege { + + private String priv; + + private EnumSet supportedScopeSet; + + private Privilege(String priv, EnumSet scopeSet) { + super(); + this.priv = priv; + this.supportedScopeSet = scopeSet; + } + + public Privilege(String priv) { + super(); + this.priv = priv; + + } + + public String getPriv() { + return priv; + } + + public void setPriv(String priv) { + this.priv = priv; + } + + public boolean supportColumnLevel() { + return supportedScopeSet != null + && supportedScopeSet.contains(PrivilegeScope.COLUMN_LEVEL_SCOPE); + } + + public boolean supportDBLevel() { + return supportedScopeSet != null + && supportedScopeSet.contains(PrivilegeScope.DB_LEVEL_SCOPE); + } + + public boolean supportTableLevel() { + return supportedScopeSet != null + && supportedScopeSet.contains(PrivilegeScope.TABLE_LEVEL_SCOPE); + } + + public Privilege() { + } + + public static Privilege ALL = new Privilege("All", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege ALTER_METADATA = new Privilege("Alter", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege ALTER_DATA = new Privilege("Update", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege CREATE = new Privilege("Create", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege DROP = new Privilege("Drop", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege INDEX = new Privilege("Index", + PrivilegeScope.ALLSCOPE); + + public static Privilege LOCK = new Privilege("Lock", + PrivilegeScope.ALLSCOPE_EXCEPT_COLUMN); + + public static Privilege SELECT = new Privilege("Select", + PrivilegeScope.ALLSCOPE); + + public static Privilege SHOW_DATABASE = new Privilege("Show_Database", + EnumSet.of(PrivilegeScope.USER_LEVEL_SCOPE)); + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeRegistry.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeRegistry.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeRegistry.java (revision 0) @@ -0,0 +1,47 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import java.util.HashMap; +import java.util.Map; + +public class PrivilegeRegistry { + + protected static Map Registry = new HashMap(); + + static { + Registry.put(Privilege.ALL.getPriv().toLowerCase(), Privilege.ALL); + Registry.put(Privilege.ALTER_DATA.getPriv().toLowerCase(), + Privilege.ALTER_DATA); + Registry.put(Privilege.ALTER_METADATA.getPriv().toLowerCase(), + Privilege.ALTER_METADATA); + Registry.put(Privilege.CREATE.getPriv().toLowerCase(), Privilege.CREATE); + Registry.put(Privilege.DROP.getPriv().toLowerCase(), Privilege.DROP); + Registry.put(Privilege.INDEX.getPriv().toLowerCase(), Privilege.INDEX); + Registry.put(Privilege.LOCK.getPriv().toLowerCase(), Privilege.LOCK); + Registry.put(Privilege.SELECT.getPriv().toLowerCase(), Privilege.SELECT); + Registry.put(Privilege.SHOW_DATABASE.getPriv().toLowerCase(), + Privilege.SHOW_DATABASE); + } + + public static Privilege getPrivilege(String privilegeName) { + return Registry.get(privilegeName.toLowerCase()); + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeScope.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeScope.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/PrivilegeScope.java (revision 0) @@ -0,0 +1,57 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.security.authorization; + +import java.util.EnumSet; + +/** + * PrivilegeScope describes a hive defined privilege's scope + * (global/database/table/column). For example some hive privileges are + * db-level only, some are global, and some are table only. + */ +public enum PrivilegeScope { + + USER_LEVEL_SCOPE((short) 0x01), + DB_LEVEL_SCOPE((short) 0x02), + TABLE_LEVEL_SCOPE((short) 0x04), + COLUMN_LEVEL_SCOPE((short) 0x08); + + private short mode; + + private PrivilegeScope(short mode) { + this.mode = mode; + } + + public short getMode() { + return mode; + } + + public void setMode(short mode) { + this.mode = mode; + } + + public static EnumSet ALLSCOPE = EnumSet.of( + PrivilegeScope.USER_LEVEL_SCOPE, PrivilegeScope.DB_LEVEL_SCOPE, + PrivilegeScope.TABLE_LEVEL_SCOPE, PrivilegeScope.COLUMN_LEVEL_SCOPE); + + public static EnumSet ALLSCOPE_EXCEPT_COLUMN = EnumSet.of( + PrivilegeScope.USER_LEVEL_SCOPE, PrivilegeScope.DB_LEVEL_SCOPE, + PrivilegeScope.TABLE_LEVEL_SCOPE); + +} Index: ql/src/java/org/apache/hadoop/hive/ql/session/CreateTableAutomaticGrant.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/session/CreateTableAutomaticGrant.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/session/CreateTableAutomaticGrant.java (revision 0) @@ -0,0 +1,107 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.session; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.security.authorization.Privilege; +import org.apache.hadoop.hive.ql.security.authorization.PrivilegeRegistry; + +public class CreateTableAutomaticGrant { + private String ownerGrants; + private Map userGrants; + private Map groupGrants; + private Map roleGrants; + + public static CreateTableAutomaticGrant create(HiveConf conf) + throws HiveException { + CreateTableAutomaticGrant grants = new CreateTableAutomaticGrant(); + String ownerGrantsInConfig = HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_TABLE_OWNER_GRANTS); + + if (ownerGrantsInConfig != null && !ownerGrantsInConfig.trim().equals("")) { + checkPrivilege(ownerGrantsInConfig); + grants.ownerGrants = ownerGrantsInConfig; + } + grants.userGrants = getGrantMap(HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_TABLE_USER_GRANTS)); + grants.groupGrants = getGrantMap(HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_TABLE_GROUP_GRANTS)); + grants.roleGrants = getGrantMap(HiveConf.getVar(conf, + HiveConf.ConfVars.HIVE_AUTHORIZATION_TABLE_ROLE_GRANTS)); + return grants; + } + + private static Map getGrantMap(String grantMapStr) + throws HiveException { + if (grantMapStr != null && !grantMapStr.trim().equals("")) { + String[] grantArrayStr = grantMapStr.split(";"); + Map grantsMap = new HashMap(); + for (String grantStr : grantArrayStr) { + String[] principalListAndPrivList = grantStr.split(":"); + if (principalListAndPrivList.length != 2 + || principalListAndPrivList[0] == null + || principalListAndPrivList[0].trim().equals("")) { + throw new HiveException( + "Can not understand the config privilege definition " + grantStr); + } + String userList = principalListAndPrivList[0]; + String privList = principalListAndPrivList[1]; + checkPrivilege(privList); + String[] users = userList.split(","); + for (String user : users) { + grantsMap.put(user, privList); + } + } + return grantsMap; + } + return null; + } + + private static void checkPrivilege(String ownerGrantsInConfig) + throws HiveException { + String[] ownerGrantArray = ownerGrantsInConfig.split(","); + // verify the config + for (String ownerGrant : ownerGrantArray) { + Privilege prive = PrivilegeRegistry.getPrivilege(ownerGrant); + if (prive == null) { + throw new HiveException("Privilege " + ownerGrant + " is not found."); + } + } + } + + public String getOwnerGrants() { + return ownerGrants; + } + + public Map getUserGrants() { + return userGrants; + } + + public Map getGroupGrants() { + return groupGrants; + } + + public Map getRoleGrants() { + return roleGrants; + } +} \ No newline at end of file Index: ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (revision 1037574) +++ ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java (working copy) @@ -40,6 +40,12 @@ import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.exec.Utilities; import org.apache.hadoop.hive.ql.history.HiveHistory; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.plan.HiveOperation; +import org.apache.hadoop.hive.ql.security.Authenticator; +import org.apache.hadoop.hive.ql.security.AuthenticatorFactory; +import org.apache.hadoop.hive.ql.security.authorization.AuthorizationManagerFactory; +import org.apache.hadoop.hive.ql.security.authorization.AuthorizationProviderManager; import org.apache.hadoop.hive.ql.util.DosToUnix; import org.apache.log4j.LogManager; import org.apache.log4j.PropertyConfigurator; @@ -77,8 +83,14 @@ /** * type of the command. */ - private String commandType; - + private HiveOperation commandType; + + private AuthorizationProviderManager authorizer; + + private Authenticator authenticator; + + private CreateTableAutomaticGrant createTableGrants; + /** * Lineage state. */ @@ -150,11 +162,16 @@ /** * start a new session and set it to current session. + * @throws HiveException */ - public static SessionState start(HiveConf conf) { + public static SessionState start(HiveConf conf) throws HiveException { SessionState ss = new SessionState(conf); ss.getConf().setVar(HiveConf.ConfVars.HIVESESSIONID, makeSessionId()); ss.hiveHist = new HiveHistory(ss); + ss.authenticator = AuthenticatorFactory.getAuthenticator(conf); + ss.authorizer = AuthorizationManagerFactory.getAuthorizeProviderManager( + conf, ss.authenticator); + ss.createTableGrants = CreateTableAutomaticGrant.create(conf); tss.set(ss); return (ss); } @@ -163,6 +180,7 @@ * set current session to existing session object if a thread is running * multiple sessions - it must call this method with the new session object * when switching from one session to another. + * @throws HiveException */ public static SessionState start(SessionState startSs) { @@ -176,6 +194,18 @@ if (startSs.hiveHist == null) { startSs.hiveHist = new HiveHistory(startSs); } + + try { + startSs.authenticator = AuthenticatorFactory.getAuthenticator(startSs + .getConf()); + startSs.authorizer = AuthorizationManagerFactory + .getAuthorizeProviderManager(startSs.getConf(), startSs.authenticator); + startSs.createTableGrants = CreateTableAutomaticGrant.create(startSs + .getConf()); + } catch (HiveException e) { + throw new RuntimeException(e); + } + return startSs; } @@ -539,10 +569,38 @@ } public String getCommandType() { + return commandType.getOperationName(); + } + + public HiveOperation getHiveOperation() { return commandType; } - public void setCommandType(String commandType) { + public void setCommandType(HiveOperation commandType) { this.commandType = commandType; } + + public AuthorizationProviderManager getAuthorizer() { + return authorizer; + } + + public void setAuthorizer(AuthorizationProviderManager authorizer) { + this.authorizer = authorizer; + } + + public Authenticator getAuthenticator() { + return authenticator; + } + + public void setAuthenticator(Authenticator authenticator) { + this.authenticator = authenticator; + } + + public CreateTableAutomaticGrant getCreateTableGrants() { + return createTableGrants; + } + + public void setCreateTableGrants(CreateTableAutomaticGrant createTableGrants) { + this.createTableGrants = createTableGrants; + } } Index: ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java (revision 1037574) +++ ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java (working copy) @@ -24,10 +24,12 @@ import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.PrintStream; import java.io.Serializable; +import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Arrays; import java.util.Deque; @@ -389,6 +391,9 @@ } public void createSources() throws Exception { + + startSessionState(); + // Create a bunch of tables with columns key and value LinkedList cols = new LinkedList(); cols.add("key"); @@ -490,7 +495,8 @@ testWarehouse = conf.getVar(HiveConf.ConfVars.METASTOREWAREHOUSE); // conf.logVars(System.out); // System.out.flush(); - + + SessionState.start(conf); db = Hive.get(conf); fs = FileSystem.get(conf); drv = new Driver(conf); @@ -541,6 +547,8 @@ createSources(); } + HiveConf.setVar(conf, HiveConf.ConfVars.HIVE_AUTHENTICATOR_MANAGER, + "org.apache.hadoop.hive.ql.security.DummpyAuthenticator"); CliSessionState ss = new CliSessionState(conf); assert ss != null; ss.in = System.in; @@ -554,7 +562,7 @@ ss.err = ss.out; ss.setIsSilent(true); SessionState oldSs = SessionState.get(); - if (oldSs != null) { + if (oldSs != null && oldSs.out != null && oldSs.out != System.out) { oldSs.out.close(); } SessionState.start(ss); @@ -566,6 +574,19 @@ cliDriver.processInitFiles(ss); } + private CliSessionState startSessionState() + throws FileNotFoundException, UnsupportedEncodingException { + + HiveConf.setVar(conf, HiveConf.ConfVars.HIVE_AUTHENTICATOR_MANAGER, + "org.apache.hadoop.hive.ql.security.DummpyAuthenticator"); + + CliSessionState ss = new CliSessionState(conf); + assert ss != null; + + SessionState.start(ss); + return ss; + } + public int executeOne(String tname) { String q = qMap.get(tname); @@ -898,6 +919,7 @@ "-I", "at junit", "-I", "Caused by:", "-I", "QUERYID_LOCK:", + "-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 1037574) +++ ql/src/test/org/apache/hadoop/hive/ql/metadata/TestSemanticAnalyzerHookLoading.java (working copy) @@ -27,6 +27,7 @@ import org.apache.hadoop.hive.metastore.MetaStoreUtils; import org.apache.hadoop.hive.ql.Driver; import org.apache.hadoop.hive.ql.processors.CommandProcessorResponse; +import org.apache.hadoop.hive.ql.session.SessionState; public class TestSemanticAnalyzerHookLoading extends TestCase { @@ -35,6 +36,7 @@ HiveConf conf = new HiveConf(this.getClass()); conf.set(ConfVars.SEMANTIC_ANALYZER_HOOK.varname, DummySemanticAnalyzerHook.class.getName()); conf.set(ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false"); + SessionState.start(conf); Driver driver = new Driver(conf); driver.run("drop table testDL"); Index: ql/src/test/org/apache/hadoop/hive/ql/security/DummpyAuthenticator.java =================================================================== --- ql/src/test/org/apache/hadoop/hive/ql/security/DummpyAuthenticator.java (revision 0) +++ ql/src/test/org/apache/hadoop/hive/ql/security/DummpyAuthenticator.java (revision 0) @@ -0,0 +1,39 @@ +package org.apache.hadoop.hive.ql.security; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.hadoop.conf.Configuration; + +public class DummpyAuthenticator implements Authenticator { + + private List groupNames; + private String userName; + + public DummpyAuthenticator() { + this.groupNames = new ArrayList(); + groupNames.add("hive_test_group1"); + groupNames.add("hive_test_group2"); + userName = "hive_test_user"; + } + + @Override + public boolean detroy() { + return true; + } + + @Override + public List getGroupNames() { + return groupNames; + } + + @Override + public String getUserName() { + return userName; + } + + @Override + public void init(Configuration conf) { + } + +} Index: ql/src/test/queries/clientnegative/authorization_part.q =================================================================== --- ql/src/test/queries/clientnegative/authorization_part.q (revision 0) +++ ql/src/test/queries/clientnegative/authorization_part.q (revision 0) @@ -0,0 +1,32 @@ +create table authorization_part_fail (key int, value string) partitioned by (ds string); +set hive.security.authorization.enabled=true; + +grant `Create` on table authorization_part_fail to user hive_test_user; +grant `Update` on table authorization_part_fail to user hive_test_user; +grant `Drop` on table authorization_part_fail to user hive_test_user; +grant `select` on table src to user hive_test_user; + +-- column grant to group + +grant `select`(key) on table authorization_part_fail to group hive_test_group1; +grant `select` on table authorization_part_fail to group hive_test_group1; + +show grant group hive_test_group1 on table authorization_part_fail; + +insert overwrite table authorization_part_fail partition (ds='2010') select key, value from src; +show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2010'); +show grant group hive_test_group1 on table authorization_part_fail partition (ds='2010'); +select key, value from authorization_part_fail where ds='2010' order by key limit 20; + +insert overwrite table authorization_part_fail partition (ds='2011') select key, value from src; +show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2011'); +show grant group hive_test_group1 on table authorization_part_fail partition (ds='2011'); +select key, value from authorization_part_fail where ds='2011' order by key limit 20; + +select key,value, ds from authorization_part_fail where ds>='2010' order by key, ds limit 20; + +revoke `select` on table authorization_part_fail partition (ds='2010') from group hive_test_group1; + +select key,value, ds from authorization_part_fail where ds>='2010' order by key, ds limit 20; + +drop table authorization_part_fail; \ No newline at end of file Index: ql/src/test/queries/clientpositive/authorization_1.q =================================================================== --- ql/src/test/queries/clientpositive/authorization_1.q (revision 0) +++ ql/src/test/queries/clientpositive/authorization_1.q (revision 0) @@ -0,0 +1,87 @@ +create table src_autho_test as select * from src; +set hive.security.authorization.enabled=true; +grant `drop` on table src_autho_test to user hive_test_user; + +--table grant to user + +grant `select` on table src_autho_test to user hive_test_user; + +show grant user hive_test_user on table src_autho_test; +show grant user hive_test_user on table src_autho_test(key); + +select key from src_autho_test order by key limit 20; + +revoke `select` on table src_autho_test from user hive_test_user; +show grant user hive_test_user on table src_autho_test; +show grant user hive_test_user on table src_autho_test(key); + +--column grant to user + +grant `select`(key) on table src_autho_test to user hive_test_user; + +show grant user hive_test_user on table src_autho_test; +show grant user hive_test_user on table src_autho_test(key); + +select key from src_autho_test order by key limit 20; + +revoke `select`(key) on table src_autho_test from user hive_test_user; +show grant user hive_test_user on table src_autho_test; +show grant user hive_test_user on table src_autho_test(key); + +--table grant to group + +grant `select` on table src_autho_test to group hive_test_group1; + +show grant group hive_test_group1 on table src_autho_test; +show grant group hive_test_group1 on table src_autho_test(key); + +select key from src_autho_test order by key limit 20; + +revoke `select` on table src_autho_test from group hive_test_group1; +show grant group hive_test_group1 on table src_autho_test; +show grant group hive_test_group1 on table src_autho_test(key); + +--column grant to group + +grant `select`(key) on table src_autho_test to group hive_test_group1; + +show grant group hive_test_group1 on table src_autho_test; +show grant group hive_test_group1 on table src_autho_test(key); + +select key from src_autho_test order by key limit 20; + +revoke `select`(key) on table src_autho_test from group hive_test_group1; +show grant group hive_test_group1 on table src_autho_test; +show grant group hive_test_group1 on table src_autho_test(key); + +--role +create role src_role; +grant role src_role to user hive_test_user; +show role grant user hive_test_user; + +--column grant to role + +grant `select`(key) on table src_autho_test to role src_role; + +show grant role src_role on table src_autho_test; +show grant role src_role on table src_autho_test(key); + +select key from src_autho_test order by key limit 20; + +revoke `select`(key) on table src_autho_test from role src_role; + +--table grant to role + +grant `select` on table src_autho_test to role src_role; + +select key from src_autho_test order by key limit 20; + +show grant role src_role on table src_autho_test; +show grant role src_role on table src_autho_test(key); +revoke `select` on table src_autho_test from role src_role; + +-- drop role +drop role src_role; + +set hive.security.authorization.enabled=false; +drop table src_autho_test; \ No newline at end of file Index: ql/src/test/queries/clientpositive/authorization_2.q =================================================================== --- ql/src/test/queries/clientpositive/authorization_2.q (revision 0) +++ ql/src/test/queries/clientpositive/authorization_2.q (revision 0) @@ -0,0 +1,107 @@ +create table authorization_part (key int, value string) partitioned by (ds string); +set hive.security.authorization.enabled=true; + +-- column grant to user +grant `Create` on table authorization_part to user hive_test_user; +grant `Update` on table authorization_part to user hive_test_user; +grant `Drop` on table authorization_part to user hive_test_user; +grant `select` on table src to user hive_test_user; + +show grant user hive_test_user on table authorization_part; + +alter table authorization_part add partition (ds='2010'); +show grant user hive_test_user on table authorization_part partition (ds='2010'); + +grant `select`(key) on table authorization_part to user hive_test_user; +alter table authorization_part drop partition (ds='2010'); +insert overwrite table authorization_part partition (ds='2010') select key, value from src; +show grant user hive_test_user on table authorization_part(key) partition (ds='2010'); +show grant user hive_test_user on table authorization_part(key); +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select`(key) on table authorization_part from user hive_test_user; +show grant user hive_test_user on table authorization_part(key); +show grant user hive_test_user on table authorization_part(key) partition (ds='2010'); + +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select`(key) on table authorization_part partition (ds='2010') from user hive_test_user; +show grant user hive_test_user on table authorization_part(key) partition (ds='2010'); + +alter table authorization_part drop partition (ds='2010'); + +-- table grant to user +show grant user hive_test_user on table authorization_part; + +alter table authorization_part add partition (ds='2010'); +show grant user hive_test_user on table authorization_part partition (ds='2010'); + +grant `select` on table authorization_part to user hive_test_user; +alter table authorization_part drop partition (ds='2010'); +insert overwrite table authorization_part partition (ds='2010') select key, value from src; +show grant user hive_test_user on table authorization_part partition (ds='2010'); +show grant user hive_test_user on table authorization_part; +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select` on table authorization_part from user hive_test_user; +show grant user hive_test_user on table authorization_part; +show grant user hive_test_user on table authorization_part partition (ds='2010'); + +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select` on table authorization_part partition (ds='2010') from user hive_test_user; +show grant user hive_test_user on table authorization_part partition (ds='2010'); + +alter table authorization_part drop partition (ds='2010'); + +-- column grant to group + +show grant group hive_test_group1 on table authorization_part; + +alter table authorization_part add partition (ds='2010'); +show grant group hive_test_group1 on table authorization_part partition (ds='2010'); + +grant `select`(key) on table authorization_part to group hive_test_group1; +alter table authorization_part drop partition (ds='2010'); +insert overwrite table authorization_part partition (ds='2010') select key, value from src; +show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010'); +show grant group hive_test_group1 on table authorization_part(key); +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select`(key) on table authorization_part from group hive_test_group1; +show grant group hive_test_group1 on table authorization_part(key); +show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010'); + +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select`(key) on table authorization_part partition (ds='2010') from group hive_test_group1; +show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010'); + +alter table authorization_part drop partition (ds='2010'); + +-- table grant to group +show grant group hive_test_group1 on table authorization_part; + +alter table authorization_part add partition (ds='2010'); +show grant group hive_test_group1 on table authorization_part partition (ds='2010'); + +grant `select` on table authorization_part to group hive_test_group1; +alter table authorization_part drop partition (ds='2010'); +insert overwrite table authorization_part partition (ds='2010') select key, value from src; +show grant group hive_test_group1 on table authorization_part partition (ds='2010'); +show grant group hive_test_group1 on table authorization_part; +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select` on table authorization_part from group hive_test_group1; +show grant group hive_test_group1 on table authorization_part; +show grant group hive_test_group1 on table authorization_part partition (ds='2010'); + +select key from authorization_part where ds='2010' order by key limit 20; + +revoke `select` on table authorization_part partition (ds='2010') from group hive_test_group1; +show grant group hive_test_group1 on table authorization_part partition (ds='2010'); + + +revoke `select` on table src from user hive_test_user; +set hive.security.authorization.enabled=false; +drop table authorization_part; \ No newline at end of file Index: ql/src/test/queries/clientpositive/input19.q =================================================================== --- ql/src/test/queries/clientpositive/input19.q (revision 1037574) +++ ql/src/test/queries/clientpositive/input19.q (working copy) @@ -1,5 +1,5 @@ -create table apachelog(ipaddress STRING,identd STRING,user STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE; +create table apachelog(ipaddress STRING,identd STRING,user_name STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE; LOAD DATA LOCAL INPATH '../data/files/apache.access.log' INTO TABLE apachelog; SELECT a.* FROM apachelog a; Index: ql/src/test/queries/clientpositive/show_indexes_edge_cases.q =================================================================== --- ql/src/test/queries/clientpositive/show_indexes_edge_cases.q (revision 1037574) +++ ql/src/test/queries/clientpositive/show_indexes_edge_cases.q (working copy) @@ -21,5 +21,10 @@ EXPLAIN SHOW INDEXES ON show_idx_empty; SHOW INDEXES ON show_idx_empty; +DROP INDEX idx_comment on show_idx_empty; +DROP INDEX idx_compound on show_idx_empty; DROP TABLE show_idx_empty; + +DROP INDEX idx_1 on show_idx_full; +DROP INDEX idx_2 on show_idx_full; DROP TABLE show_idx_full; \ No newline at end of file Index: ql/src/test/results/clientnegative/authorization_part.q.out =================================================================== --- ql/src/test/results/clientnegative/authorization_part.q.out (revision 0) +++ ql/src/test/results/clientnegative/authorization_part.q.out (revision 0) @@ -0,0 +1,221 @@ +PREHOOK: query: create table authorization_part_fail (key int, value string) partitioned by (ds string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table authorization_part_fail (key int, value string) partitioned by (ds string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@authorization_part_fail +PREHOOK: query: grant `Create` on table authorization_part_fail to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Create` on table authorization_part_fail to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `Update` on table authorization_part_fail to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Update` on table authorization_part_fail to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `Drop` on table authorization_part_fail to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Drop` on table authorization_part_fail to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `select` on table src to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table src to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: -- column grant to group + +grant `select`(key) on table authorization_part_fail to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: -- column grant to group + +grant `select`(key) on table authorization_part_fail to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `select` on table authorization_part_fail to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table authorization_part_fail to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant group hive_test_group1 on table authorization_part_fail +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part_fail +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_part_fail +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479194 +grantor +PREHOOK: query: insert overwrite table authorization_part_fail partition (ds='2010') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part_fail@ds=2010 +POSTHOOK: query: insert overwrite table authorization_part_fail partition (ds='2010') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part_fail@ds=2010 +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part_fail partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part_fail partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part_fail +partition ds=2010 +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479202 +grantor +PREHOOK: query: select key, value from authorization_part_fail where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part_fail@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-26-42_759_1779156117369051908/-mr-10000 +POSTHOOK: query: select key, value from authorization_part_fail where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part_fail@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-26-42_759_1779156117369051908/-mr-10000 +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 val_0 +0 val_0 +0 val_0 +2 val_2 +4 val_4 +5 val_5 +5 val_5 +5 val_5 +8 val_8 +9 val_9 +10 val_10 +11 val_11 +12 val_12 +12 val_12 +15 val_15 +15 val_15 +17 val_17 +18 val_18 +18 val_18 +19 val_19 +PREHOOK: query: insert overwrite table authorization_part_fail partition (ds='2011') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part_fail@ds=2011 +POSTHOOK: query: insert overwrite table authorization_part_fail partition (ds='2011') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part_fail@ds=2011 +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2011') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part_fail(key) partition (ds='2011') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part_fail partition (ds='2011') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part_fail partition (ds='2011') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part_fail +partition ds=2011 +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479216 +grantor +PREHOOK: query: select key, value from authorization_part_fail where ds='2011' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part_fail@ds=2011 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-26-56_557_7936329148326763248/-mr-10000 +POSTHOOK: query: select key, value from authorization_part_fail where ds='2011' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part_fail@ds=2011 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-26-56_557_7936329148326763248/-mr-10000 +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 val_0 +0 val_0 +0 val_0 +2 val_2 +4 val_4 +5 val_5 +5 val_5 +5 val_5 +8 val_8 +9 val_9 +10 val_10 +11 val_11 +12 val_12 +12 val_12 +15 val_15 +15 val_15 +17 val_17 +18 val_18 +18 val_18 +19 val_19 +PREHOOK: query: select key,value, ds from authorization_part_fail where ds>='2010' order by key, ds limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part_fail@ds=2010 +PREHOOK: Input: default@authorization_part_fail@ds=2011 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-27-02_075_8407359943032574085/-mr-10000 +POSTHOOK: query: select key,value, ds from authorization_part_fail where ds>='2010' order by key, ds limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part_fail@ds=2010 +POSTHOOK: Input: default@authorization_part_fail@ds=2011 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-27-02_075_8407359943032574085/-mr-10000 +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 val_0 2010 +0 val_0 2010 +0 val_0 2010 +0 val_0 2011 +0 val_0 2011 +0 val_0 2011 +2 val_2 2010 +2 val_2 2011 +4 val_4 2010 +4 val_4 2011 +5 val_5 2010 +5 val_5 2010 +5 val_5 2010 +5 val_5 2011 +5 val_5 2011 +5 val_5 2011 +8 val_8 2010 +8 val_8 2011 +9 val_9 2010 +9 val_9 2011 +PREHOOK: query: revoke `select` on table authorization_part_fail partition (ds='2010') from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table authorization_part_fail partition (ds='2010') from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part_fail PARTITION(ds=2011).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +Authrization failed:No privilege 'Select' found for inputs { database:default, table:authorization_part_fail, partitionName:ds=2010, columnName:value}. Use show grant to get more details. Index: ql/src/test/results/clientpositive/alter4.q.out =================================================================== --- ql/src/test/results/clientpositive/alter4.q.out (revision 1037574) +++ ql/src/test/results/clientpositive/alter4.q.out (working copy) @@ -10,13 +10,13 @@ key int value string -Detailed Table Information Table(tableName:set_bucketing_test, dbName:default, owner:thiruvel, createTime:1286800231, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:10, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1286800231}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:set_bucketing_test, dbName:default, owner:heyongqiang, createTime:1290068480, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:10, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1290068480}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: ALTER TABLE set_bucketing_test NOT CLUSTERED -PREHOOK: type: null +PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: default@set_bucketing_test PREHOOK: Output: default@set_bucketing_test POSTHOOK: query: ALTER TABLE set_bucketing_test NOT CLUSTERED -POSTHOOK: type: null +POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: default@set_bucketing_test POSTHOOK: Output: default@set_bucketing_test PREHOOK: query: DESCRIBE EXTENDED set_bucketing_test @@ -26,7 +26,7 @@ key int value string -Detailed Table Information Table(tableName:set_bucketing_test, dbName:default, owner:thiruvel, createTime:1286800231, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{last_modified_by=thiruvel, last_modified_time=1286800231, transient_lastDdlTime=1286800231}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:set_bucketing_test, dbName:default, owner:heyongqiang, createTime:1290068480, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{last_modified_by=heyongqiang, last_modified_time=1290068480, transient_lastDdlTime=1290068480}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: -- Cleanup DROP TABLE set_bucketing_test PREHOOK: type: DROPTABLE @@ -77,13 +77,13 @@ key int value string -Detailed Table Information Table(tableName:set_bucketing_test, dbName:alter4_db, owner:thiruvel, createTime:1286800232, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/alter4_db.db/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:10, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1286800232}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:set_bucketing_test, dbName:alter4_db, owner:heyongqiang, createTime:1290068481, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/alter4_db.db/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:10, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[key], sortCols:[], parameters:{}), partitionKeys:[], parameters:{transient_lastDdlTime=1290068481}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: ALTER TABLE set_bucketing_test NOT CLUSTERED -PREHOOK: type: null +PREHOOK: type: ALTERTABLE_CLUSTER_SORT PREHOOK: Input: alter4_db@set_bucketing_test PREHOOK: Output: alter4_db@set_bucketing_test POSTHOOK: query: ALTER TABLE set_bucketing_test NOT CLUSTERED -POSTHOOK: type: null +POSTHOOK: type: ALTERTABLE_CLUSTER_SORT POSTHOOK: Input: alter4_db@set_bucketing_test POSTHOOK: Output: alter4_db@set_bucketing_test PREHOOK: query: DESCRIBE EXTENDED set_bucketing_test @@ -93,7 +93,7 @@ key int value string -Detailed Table Information Table(tableName:set_bucketing_test, dbName:alter4_db, owner:thiruvel, createTime:1286800232, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/home/thiruvel/projects/hive/hive.unsecure/build/ql/test/data/warehouse/alter4_db.db/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{last_modified_by=thiruvel, last_modified_time=1286800232, transient_lastDdlTime=1286800232}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) +Detailed Table Information Table(tableName:set_bucketing_test, dbName:alter4_db, owner:heyongqiang, createTime:1290068481, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:int, comment:null), FieldSchema(name:value, type:string, comment:null)], location:pfile:/Users/heyongqiang/Documents/workspace/Hive-2/build/ql/test/data/warehouse/alter4_db.db/set_bucketing_test, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}), partitionKeys:[], parameters:{last_modified_by=heyongqiang, last_modified_time=1290068481, transient_lastDdlTime=1290068481}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) PREHOOK: query: DROP TABLE set_bucketing_test PREHOOK: type: DROPTABLE PREHOOK: Input: alter4_db@set_bucketing_test Index: ql/src/test/results/clientpositive/authorization_1.q.out =================================================================== --- ql/src/test/results/clientpositive/authorization_1.q.out (revision 0) +++ ql/src/test/results/clientpositive/authorization_1.q.out (revision 0) @@ -0,0 +1,435 @@ +PREHOOK: query: create table src_autho_test as select * from src +PREHOOK: type: CREATETABLE_AS_SELECT +PREHOOK: Input: default@src +POSTHOOK: query: create table src_autho_test as select * from src +POSTHOOK: type: CREATETABLE_AS_SELECT +POSTHOOK: Input: default@src +POSTHOOK: Output: default@src_autho_test +PREHOOK: query: grant `drop` on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `drop` on table src_autho_test to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: --table grant to user + +grant `select` on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --table grant to user + +grant `select` on table src_autho_test to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant user hive_test_user on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290054119 +grantor + +database default +table src_autho_test +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290054119 +grantor +PREHOOK: query: show grant user hive_test_user on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-21-59_301_6646767296108941712/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-21-59_301_6646767296108941712/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: revoke `select` on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: show grant user hive_test_user on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290054119 +grantor +PREHOOK: query: show grant user hive_test_user on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: --column grant to user + +grant `select`(key) on table src_autho_test to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --column grant to user + +grant `select`(key) on table src_autho_test to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant user hive_test_user on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290054119 +grantor +PREHOOK: query: show grant user hive_test_user on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +columnName key +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290054125 +grantor +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-05_277_8944836447004950426/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-05_277_8944836447004950426/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: revoke `select`(key) on table src_autho_test from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table src_autho_test from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: show grant user hive_test_user on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290054119 +grantor +PREHOOK: query: show grant user hive_test_user on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: --table grant to group + +grant `select` on table src_autho_test to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --table grant to group + +grant `select` on table src_autho_test to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290054131 +grantor +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-11_230_4053213311608085494/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-11_230_4053213311608085494/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: revoke `select` on table src_autho_test from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table src_autho_test from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: --column grant to group + +grant `select`(key) on table src_autho_test to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --column grant to group + +grant `select`(key) on table src_autho_test to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-17_512_4648862264183836693/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-17_512_4648862264183836693/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: revoke `select`(key) on table src_autho_test from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table src_autho_test from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: --role +create role src_role +PREHOOK: type: CREATEROLE +POSTHOOK: query: --role +create role src_role +POSTHOOK: type: CREATEROLE +PREHOOK: query: grant role src_role to user hive_test_user +PREHOOK: type: GRANT_ROLE +POSTHOOK: query: grant role src_role to user hive_test_user +POSTHOOK: type: GRANT_ROLE +PREHOOK: query: show role grant user hive_test_user +PREHOOK: type: SHOW_ROLE_GRANT +POSTHOOK: query: show role grant user hive_test_user +POSTHOOK: type: SHOW_ROLE_GRANT +role name:src_role +database:default +database:default +PREHOOK: query: --column grant to role + +grant `select`(key) on table src_autho_test to role src_role +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --column grant to role + +grant `select`(key) on table src_autho_test to role src_role +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant role src_role on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant role src_role on table src_autho_test +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: show grant role src_role on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant role src_role on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-23_448_4304254819185136892/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-23_448_4304254819185136892/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: revoke `select`(key) on table src_autho_test from role src_role +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table src_autho_test from role src_role +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: --table grant to role + +grant `select` on table src_autho_test to role src_role +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: --table grant to role + +grant `select` on table src_autho_test to role src_role +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: select key from src_autho_test order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-28_949_4896291117896236466/-mr-10000 +POSTHOOK: query: select key from src_autho_test order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-17_20-22-28_949_4896291117896236466/-mr-10000 +0 +0 +0 +10 +100 +100 +103 +103 +104 +104 +105 +11 +111 +113 +113 +114 +116 +118 +118 +119 +PREHOOK: query: show grant role src_role on table src_autho_test +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant role src_role on table src_autho_test +POSTHOOK: type: SHOW_GRANT + +database default +table src_autho_test +userName src_role +isRole true +isGroup false +privileges Select +grantTime 1290054148 +grantor +PREHOOK: query: show grant role src_role on table src_autho_test(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant role src_role on table src_autho_test(key) +POSTHOOK: type: SHOW_GRANT +PREHOOK: query: revoke `select` on table src_autho_test from role src_role +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table src_autho_test from role src_role +POSTHOOK: type: REVOKE_PRIVILEGE +PREHOOK: query: -- drop role +drop role src_role +PREHOOK: type: DROPROLE +POSTHOOK: query: -- drop role +drop role src_role +POSTHOOK: type: DROPROLE +PREHOOK: query: drop table src_autho_test +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@src_autho_test +PREHOOK: Output: default@src_autho_test +POSTHOOK: query: drop table src_autho_test +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@src_autho_test +POSTHOOK: Output: default@src_autho_test Index: ql/src/test/results/clientpositive/authorization_2.q.out =================================================================== --- ql/src/test/results/clientpositive/authorization_2.q.out (revision 0) +++ ql/src/test/results/clientpositive/authorization_2.q.out (revision 0) @@ -0,0 +1,1179 @@ +PREHOOK: query: create table authorization_part (key int, value string) partitioned by (ds string) +PREHOOK: type: CREATETABLE +POSTHOOK: query: create table authorization_part (key int, value string) partitioned by (ds string) +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: default@authorization_part +PREHOOK: query: -- column grant to user +grant `Create` on table authorization_part to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: -- column grant to user +grant `Create` on table authorization_part to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `Update` on table authorization_part to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Update` on table authorization_part to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `Drop` on table authorization_part to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `Drop` on table authorization_part to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: grant `select` on table src to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table src to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: show grant user hive_test_user on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290478979 +grantor +PREHOOK: query: alter table authorization_part add partition (ds='2010') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Input: default@authorization_part +POSTHOOK: query: alter table authorization_part add partition (ds='2010') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +PREHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290478980 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290478980 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290478980 +grantor +PREHOOK: query: grant `select`(key) on table authorization_part to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select`(key) on table authorization_part to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +PREHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +columnName key +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290478988 +grantor +PREHOOK: query: show grant user hive_test_user on table authorization_part(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part(key) +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +columnName key +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290478980 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-09_416_6111547627532551311/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-09_416_6111547627532551311/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select`(key) on table authorization_part from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table authorization_part from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part(key) +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +columnName key +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290478988 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-15_106_6459176743162425468/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-15_106_6459176743162425468/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select`(key) on table authorization_part partition (ds='2010') from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table authorization_part partition (ds='2010') from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: -- table grant to user +show grant user hive_test_user on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: -- table grant to user +show grant user hive_test_user on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290478979 +grantor +PREHOOK: query: alter table authorization_part add partition (ds='2010') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Input: default@authorization_part +POSTHOOK: query: alter table authorization_part add partition (ds='2010') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290479002 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290479002 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290479002 +grantor +PREHOOK: query: grant `select` on table authorization_part to user hive_test_user +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table authorization_part to user hive_test_user +POSTHOOK: type: GRANT_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290479010 +grantor +PREHOOK: query: show grant user hive_test_user on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290479002 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-31_355_5632846337047371530/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-31_355_5632846337047371530/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select` on table authorization_part from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table authorization_part from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290478979 +grantor + +database default +table authorization_part +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290478979 +grantor +PREHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Select +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290479010 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-36_378_2102590248400137570/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-36_378_2102590248400137570/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select` on table authorization_part partition (ds='2010') from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table authorization_part partition (ds='2010') from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant user hive_test_user on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Create +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Drop +grantTime 1290479010 +grantor + +database default +table authorization_part +partition ds=2010 +userName hive_test_user +isRole false +isGroup false +privileges Update +grantTime 1290479010 +grantor +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: -- column grant to group + +show grant group hive_test_group1 on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: -- column grant to group + +show grant group hive_test_group1 on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part add partition (ds='2010') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Input: default@authorization_part +POSTHOOK: query: alter table authorization_part add partition (ds='2010') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: grant `select`(key) on table authorization_part to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select`(key) on table authorization_part to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part(key) +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-51_947_8806736878127153124/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-51_947_8806736878127153124/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select`(key) on table authorization_part from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table authorization_part from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part(key) +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part(key) +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-58_540_2340950450233118013/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-23-58_540_2340950450233118013/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select`(key) on table authorization_part partition (ds='2010') from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select`(key) on table authorization_part partition (ds='2010') from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part(key) partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: -- table grant to group +show grant group hive_test_group1 on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: -- table grant to group +show grant group hive_test_group1 on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part add partition (ds='2010') +PREHOOK: type: ALTERTABLE_ADDPARTS +PREHOOK: Input: default@authorization_part +POSTHOOK: query: alter table authorization_part add partition (ds='2010') +POSTHOOK: type: ALTERTABLE_ADDPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: grant `select` on table authorization_part to group hive_test_group1 +PREHOOK: type: GRANT_PRIVILEGE +POSTHOOK: query: grant `select` on table authorization_part to group hive_test_group1 +POSTHOOK: type: GRANT_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: alter table authorization_part drop partition (ds='2010') +PREHOOK: type: ALTERTABLE_DROPPARTS +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: alter table authorization_part drop partition (ds='2010') +POSTHOOK: type: ALTERTABLE_DROPPARTS +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +PREHOOK: type: QUERY +PREHOOK: Input: default@src +PREHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: query: insert overwrite table authorization_part partition (ds='2010') select key, value from src +POSTHOOK: type: QUERY +POSTHOOK: Input: default@src +POSTHOOK: Output: default@authorization_part@ds=2010 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479051 +grantor +PREHOOK: query: show grant group hive_test_group1 on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479044 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-24-11_840_4929451702228517202/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-24-11_840_4929451702228517202/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select` on table authorization_part from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table authorization_part from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] + +database default +table authorization_part +partition ds=2010 +userName hive_test_group1 +isRole false +isGroup true +privileges Select +grantTime 1290479051 +grantor +PREHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +PREHOOK: type: QUERY +PREHOOK: Input: default@authorization_part@ds=2010 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-24-16_319_9180718715012263989/-mr-10000 +POSTHOOK: query: select key from authorization_part where ds='2010' order by key limit 20 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@authorization_part@ds=2010 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-22_18-24-16_319_9180718715012263989/-mr-10000 +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +0 +0 +0 +2 +4 +5 +5 +5 +8 +9 +10 +11 +12 +12 +15 +15 +17 +18 +18 +19 +PREHOOK: query: revoke `select` on table authorization_part partition (ds='2010') from group hive_test_group1 +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table authorization_part partition (ds='2010') from group hive_test_group1 +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +PREHOOK: type: SHOW_GRANT +POSTHOOK: query: show grant group hive_test_group1 on table authorization_part partition (ds='2010') +POSTHOOK: type: SHOW_GRANT +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: revoke `select` on table src from user hive_test_user +PREHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: query: revoke `select` on table src from user hive_test_user +POSTHOOK: type: REVOKE_PRIVILEGE +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +PREHOOK: query: drop table authorization_part +PREHOOK: type: DROPTABLE +PREHOOK: Input: default@authorization_part +PREHOOK: Output: default@authorization_part +POSTHOOK: query: drop table authorization_part +POSTHOOK: type: DROPTABLE +POSTHOOK: Input: default@authorization_part +POSTHOOK: Output: default@authorization_part +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ] +POSTHOOK: Lineage: authorization_part PARTITION(ds=2010).value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ] Index: ql/src/test/results/clientpositive/bucket_groupby.q.out =================================================================== --- ql/src/test/results/clientpositive/bucket_groupby.q.out (revision 1037574) +++ 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 1037574) +++ 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 1037574) +++ 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 1037574) +++ ql/src/test/results/clientpositive/input19.q.out (working copy) @@ -1,6 +1,6 @@ -PREHOOK: query: create table apachelog(ipaddress STRING,identd STRING,user STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE +PREHOOK: query: create table apachelog(ipaddress STRING,identd STRING,user_name STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE PREHOOK: type: CREATETABLE -POSTHOOK: query: create table apachelog(ipaddress STRING,identd STRING,user STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE +POSTHOOK: query: create table apachelog(ipaddress STRING,identd STRING,user_name STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES ( 'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol', 'quote.delim'= '("|\\[|\\])', 'field.delim'=' ', 'serialization.null.format'='-' ) STORED AS TEXTFILE POSTHOOK: type: CREATETABLE POSTHOOK: Output: default@apachelog PREHOOK: query: LOAD DATA LOCAL INPATH '../data/files/apache.access.log' INTO TABLE apachelog @@ -11,9 +11,9 @@ PREHOOK: query: SELECT a.* FROM apachelog a PREHOOK: type: QUERY PREHOOK: Input: default@apachelog -PREHOOK: Output: file:/tmp/jssarma/hive_2010-07-21_11-26-57_493_8424717254986801325/10000 +PREHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_13-03-09_967_1761875918055572728/-mr-10000 POSTHOOK: query: SELECT a.* FROM apachelog a POSTHOOK: type: QUERY POSTHOOK: Input: default@apachelog -POSTHOOK: Output: file:/tmp/jssarma/hive_2010-07-21_11-26-57_493_8424717254986801325/10000 +POSTHOOK: Output: file:/var/folders/6g/6grtCwPMEf4sqHUPpy6xQG9ByHg/-Tmp-/heyongqiang/hive_2010-11-18_13-03-09_967_1761875918055572728/-mr-10000 127.0.0.1 NULL frank 10/Oct/2000:13:55:36 -0700 GET /apache_pb.gif HTTP/1.0 200 2326 Index: ql/src/test/results/clientpositive/merge3.q.out =================================================================== --- ql/src/test/results/clientpositive/merge3.q.out (revision 1037574) +++ 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 1037574) +++ 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 1037574) +++ 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 1037574) +++ 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 1037574) +++ ql/src/test/results/clientpositive/show_indexes_edge_cases.q.out (working copy) @@ -201,6 +201,40 @@ POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +PREHOOK: query: DROP INDEX idx_comment on show_idx_empty +PREHOOK: type: DROPINDEX +POSTHOOK: query: DROP INDEX idx_comment on show_idx_empty +POSTHOOK: type: DROPINDEX +POSTHOOK: Lineage: default__show_idx_full_idx_1__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__.value2 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value2, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +PREHOOK: query: DROP INDEX idx_compound on show_idx_empty +PREHOOK: type: DROPINDEX +POSTHOOK: query: DROP INDEX idx_compound on show_idx_empty +POSTHOOK: type: DROPINDEX +POSTHOOK: Lineage: default__show_idx_full_idx_1__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__.value2 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value2, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] PREHOOK: query: DROP TABLE show_idx_empty PREHOOK: type: DROPTABLE PREHOOK: Input: default@show_idx_empty @@ -222,6 +256,40 @@ POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +PREHOOK: query: DROP INDEX idx_1 on show_idx_full +PREHOOK: type: DROPINDEX +POSTHOOK: query: DROP INDEX idx_1 on show_idx_full +POSTHOOK: type: DROPINDEX +POSTHOOK: Lineage: default__show_idx_full_idx_1__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__.value2 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value2, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +PREHOOK: query: DROP INDEX idx_2 on show_idx_full +PREHOOK: type: DROPINDEX +POSTHOOK: query: DROP INDEX idx_2 on show_idx_full +POSTHOOK: type: DROPINDEX +POSTHOOK: Lineage: default__show_idx_full_idx_1__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_1__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_2__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_comment__.value2 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value2, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._bucketname SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:INPUT__FILE__NAME, type:string, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__._offsets EXPRESSION [(show_idx_full)show_idx_full.FieldSchema(name:BLOCK__OFFSET__INSIDE__FILE, type:bigint, comment:), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.key SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:key, type:string, comment:null), ] +POSTHOOK: Lineage: default__show_idx_full_idx_compound__.value1 SIMPLE [(show_idx_full)show_idx_full.FieldSchema(name:value1, type:string, comment:null), ] PREHOOK: query: DROP TABLE show_idx_full PREHOOK: type: DROPTABLE PREHOOK: Input: default@show_idx_full Index: ql/src/test/results/clientpositive/stats10.q.out =================================================================== --- ql/src/test/results/clientpositive/stats10.q.out (revision 1037574) +++ 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 1037574) +++ 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 1037574) +++ 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 1037574) +++ 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 1037574) +++ 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 1037574) +++ 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 1037574) +++ 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 1037574) +++ 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 1037574) +++ 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 1037574) +++ 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