Index: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java =================================================================== --- common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (revision 1030336) +++ common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (working copy) @@ -306,6 +306,8 @@ HIVEFETCHOUTPUTSERDE("hive.fetch.output.serde", "org.apache.hadoop.hive.serde2.DelimitedJSONSerDe"), SEMANTIC_ANALYZER_HOOK("hive.semantic.analyzer.hook",null), + + HIVE_AUTHORIZATION_MANAGER("hive.security.authorization.manager", null), ; Index: metastore/if/hive_metastore.thrift =================================================================== --- metastore/if/hive_metastore.thrift (revision 1030336) +++ metastore/if/hive_metastore.thrift (working copy) @@ -29,11 +29,24 @@ 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 +} + +struct Role { + 1: string roleName, + 2: i32 createTime, + 3: string ownerName, +} + // namespace for tables struct Database { 1: string name, 2: string description, 3: string locationUri, + 4: optional PrincipalPrivilegeSet privileges } // This object holds the information needed by SerDes @@ -76,7 +89,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 +100,8 @@ 4: i32 createTime, 5: i32 lastAccessTime, 6: StorageDescriptor sd, - 7: map parameters + 7: map parameters, + 8: optional PrincipalPrivilegeSet privileges } struct Index { @@ -109,6 +124,60 @@ 2: map properties } +struct ColumnPrivilegeBag { + 1: string dbName, + 2: string tableName, + 3: map columnPrivileges +} + +struct PrivilegeBag { + 1: string userPrivileges, //user privileges + 2: map dbPrivileges, //database privileges + 3: map tablePrivileges, //table privileges + 4: map partitionPrivileges, //table 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: string column, +} exception MetaException { 1: string message @@ -265,6 +334,42 @@ 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) throws(1:MetaException o1) + + bool drop_role(1: string role_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) throws(1:MetaException o1) + + bool remove_role_member (1: string role_name, 2: string user_name, 3: bool is_role, 4: bool is_group) 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 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) } // For storing info about archived partitions in parameters Index: metastore/src/gen-cpp/ThriftHiveMetastore.cpp =================================================================== --- metastore/src/gen-cpp/ThriftHiveMetastore.cpp (revision 1030336) +++ 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(); } @@ -5496,14 +5496,14 @@ 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) + uint32_t _size254; + apache::thrift::protocol::TType _etype257; + iprot->readListBegin(_etype257, _size254); + this->success.resize(_size254); + uint32_t _i258; + for (_i258 = 0; _i258 < _size254; ++_i258) { - xfer += this->success[_i196].read(iprot); + xfer += this->success[_i258].read(iprot); } iprot->readListEnd(); } @@ -5550,10 +5550,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 _iter197; - for (_iter197 = this->success.begin(); _iter197 != this->success.end(); ++_iter197) + std::vector ::const_iterator _iter259; + for (_iter259 = this->success.begin(); _iter259 != this->success.end(); ++_iter259) { - xfer += (*_iter197).write(oprot); + xfer += (*_iter259).write(oprot); } xfer += oprot->writeListEnd(); } @@ -5596,14 +5596,14 @@ 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) + uint32_t _size260; + apache::thrift::protocol::TType _etype263; + iprot->readListBegin(_etype263, _size260); + (*(this->success)).resize(_size260); + uint32_t _i264; + for (_i264 = 0; _i264 < _size260; ++_i264) { - xfer += (*(this->success))[_i202].read(iprot); + xfer += (*(this->success))[_i264].read(iprot); } iprot->readListEnd(); } @@ -5754,14 +5754,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 _size265; + apache::thrift::protocol::TType _etype268; + iprot->readListBegin(_etype268, _size265); + this->success.resize(_size265); + uint32_t _i269; + for (_i269 = 0; _i269 < _size265; ++_i269) { - xfer += iprot->readString(this->success[_i207]); + xfer += iprot->readString(this->success[_i269]); } iprot->readListEnd(); } @@ -5800,10 +5800,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 _iter208; - for (_iter208 = this->success.begin(); _iter208 != this->success.end(); ++_iter208) + std::vector ::const_iterator _iter270; + for (_iter270 = this->success.begin(); _iter270 != this->success.end(); ++_iter270) { - xfer += oprot->writeString((*_iter208)); + xfer += oprot->writeString((*_iter270)); } xfer += oprot->writeListEnd(); } @@ -5842,14 +5842,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 _size271; + apache::thrift::protocol::TType _etype274; + iprot->readListBegin(_etype274, _size271); + (*(this->success)).resize(_size271); + uint32_t _i275; + for (_i275 = 0; _i275 < _size271; ++_i275) { - xfer += iprot->readString((*(this->success))[_i213]); + xfer += iprot->readString((*(this->success))[_i275]); } iprot->readListEnd(); } @@ -5918,14 +5918,14 @@ 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) + uint32_t _size276; + apache::thrift::protocol::TType _etype279; + iprot->readListBegin(_etype279, _size276); + this->part_vals.resize(_size276); + uint32_t _i280; + for (_i280 = 0; _i280 < _size276; ++_i280) { - xfer += iprot->readString(this->part_vals[_i218]); + xfer += iprot->readString(this->part_vals[_i280]); } iprot->readListEnd(); } @@ -5966,10 +5966,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 _iter219; - for (_iter219 = this->part_vals.begin(); _iter219 != this->part_vals.end(); ++_iter219) + std::vector ::const_iterator _iter281; + for (_iter281 = this->part_vals.begin(); _iter281 != this->part_vals.end(); ++_iter281) { - xfer += oprot->writeString((*_iter219)); + xfer += oprot->writeString((*_iter281)); } xfer += oprot->writeListEnd(); } @@ -5994,10 +5994,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 _iter220; - for (_iter220 = (*(this->part_vals)).begin(); _iter220 != (*(this->part_vals)).end(); ++_iter220) + std::vector ::const_iterator _iter282; + for (_iter282 = (*(this->part_vals)).begin(); _iter282 != (*(this->part_vals)).end(); ++_iter282) { - xfer += oprot->writeString((*_iter220)); + xfer += oprot->writeString((*_iter282)); } xfer += oprot->writeListEnd(); } @@ -6034,14 +6034,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 _size283; + apache::thrift::protocol::TType _etype286; + iprot->readListBegin(_etype286, _size283); + this->success.resize(_size283); + uint32_t _i287; + for (_i287 = 0; _i287 < _size283; ++_i287) { - xfer += this->success[_i225].read(iprot); + xfer += this->success[_i287].read(iprot); } iprot->readListEnd(); } @@ -6080,10 +6080,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 _iter226; - for (_iter226 = this->success.begin(); _iter226 != this->success.end(); ++_iter226) + std::vector ::const_iterator _iter288; + for (_iter288 = this->success.begin(); _iter288 != this->success.end(); ++_iter288) { - xfer += (*_iter226).write(oprot); + xfer += (*_iter288).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6122,14 +6122,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 _size289; + apache::thrift::protocol::TType _etype292; + iprot->readListBegin(_etype292, _size289); + (*(this->success)).resize(_size289); + uint32_t _i293; + for (_i293 = 0; _i293 < _size289; ++_i293) { - xfer += (*(this->success))[_i231].read(iprot); + xfer += (*(this->success))[_i293].read(iprot); } iprot->readListEnd(); } @@ -6198,14 +6198,14 @@ 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) + uint32_t _size294; + apache::thrift::protocol::TType _etype297; + iprot->readListBegin(_etype297, _size294); + this->part_vals.resize(_size294); + uint32_t _i298; + for (_i298 = 0; _i298 < _size294; ++_i298) { - xfer += iprot->readString(this->part_vals[_i236]); + xfer += iprot->readString(this->part_vals[_i298]); } iprot->readListEnd(); } @@ -6246,10 +6246,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 _iter237; - for (_iter237 = this->part_vals.begin(); _iter237 != this->part_vals.end(); ++_iter237) + std::vector ::const_iterator _iter299; + for (_iter299 = this->part_vals.begin(); _iter299 != this->part_vals.end(); ++_iter299) { - xfer += oprot->writeString((*_iter237)); + xfer += oprot->writeString((*_iter299)); } xfer += oprot->writeListEnd(); } @@ -6274,10 +6274,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 _iter238; - for (_iter238 = (*(this->part_vals)).begin(); _iter238 != (*(this->part_vals)).end(); ++_iter238) + std::vector ::const_iterator _iter300; + for (_iter300 = (*(this->part_vals)).begin(); _iter300 != (*(this->part_vals)).end(); ++_iter300) { - xfer += oprot->writeString((*_iter238)); + xfer += oprot->writeString((*_iter300)); } xfer += oprot->writeListEnd(); } @@ -6314,14 +6314,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 _size301; + apache::thrift::protocol::TType _etype304; + iprot->readListBegin(_etype304, _size301); + this->success.resize(_size301); + uint32_t _i305; + for (_i305 = 0; _i305 < _size301; ++_i305) { - xfer += iprot->readString(this->success[_i243]); + xfer += iprot->readString(this->success[_i305]); } iprot->readListEnd(); } @@ -6360,10 +6360,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 _iter244; - for (_iter244 = this->success.begin(); _iter244 != this->success.end(); ++_iter244) + std::vector ::const_iterator _iter306; + for (_iter306 = this->success.begin(); _iter306 != this->success.end(); ++_iter306) { - xfer += oprot->writeString((*_iter244)); + xfer += oprot->writeString((*_iter306)); } xfer += oprot->writeListEnd(); } @@ -6402,14 +6402,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 _size307; + apache::thrift::protocol::TType _etype310; + iprot->readListBegin(_etype310, _size307); + (*(this->success)).resize(_size307); + uint32_t _i311; + for (_i311 = 0; _i311 < _size307; ++_i311) { - xfer += iprot->readString((*(this->success))[_i249]); + xfer += iprot->readString((*(this->success))[_i311]); } iprot->readListEnd(); } @@ -6566,14 +6566,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 _size312; + apache::thrift::protocol::TType _etype315; + iprot->readListBegin(_etype315, _size312); + this->success.resize(_size312); + uint32_t _i316; + for (_i316 = 0; _i316 < _size312; ++_i316) { - xfer += this->success[_i254].read(iprot); + xfer += this->success[_i316].read(iprot); } iprot->readListEnd(); } @@ -6620,10 +6620,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 _iter255; - for (_iter255 = this->success.begin(); _iter255 != this->success.end(); ++_iter255) + std::vector ::const_iterator _iter317; + for (_iter317 = this->success.begin(); _iter317 != this->success.end(); ++_iter317) { - xfer += (*_iter255).write(oprot); + xfer += (*_iter317).write(oprot); } xfer += oprot->writeListEnd(); } @@ -6666,14 +6666,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 _size318; + apache::thrift::protocol::TType _etype321; + iprot->readListBegin(_etype321, _size318); + (*(this->success)).resize(_size318); + uint32_t _i322; + for (_i322 = 0; _i322 < _size318; ++_i322) { - xfer += (*(this->success))[_i260].read(iprot); + xfer += (*(this->success))[_i322].read(iprot); } iprot->readListEnd(); } @@ -7194,14 +7194,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 _size323; + apache::thrift::protocol::TType _etype326; + iprot->readListBegin(_etype326, _size323); + this->success.resize(_size323); + uint32_t _i327; + for (_i327 = 0; _i327 < _size323; ++_i327) { - xfer += iprot->readString(this->success[_i265]); + xfer += iprot->readString(this->success[_i327]); } iprot->readListEnd(); } @@ -7240,10 +7240,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 _iter266; - for (_iter266 = this->success.begin(); _iter266 != this->success.end(); ++_iter266) + std::vector ::const_iterator _iter328; + for (_iter328 = this->success.begin(); _iter328 != this->success.end(); ++_iter328) { - xfer += oprot->writeString((*_iter266)); + xfer += oprot->writeString((*_iter328)); } xfer += oprot->writeListEnd(); } @@ -7282,14 +7282,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 _size329; + apache::thrift::protocol::TType _etype332; + iprot->readListBegin(_etype332, _size329); + (*(this->success)).resize(_size329); + uint32_t _i333; + for (_i333 = 0; _i333 < _size329; ++_i333) { - xfer += iprot->readString((*(this->success))[_i271]); + xfer += iprot->readString((*(this->success))[_i333]); } iprot->readListEnd(); } @@ -7404,17 +7404,17 @@ 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) + uint32_t _size334; + apache::thrift::protocol::TType _ktype335; + apache::thrift::protocol::TType _vtype336; + iprot->readMapBegin(_ktype335, _vtype336, _size334); + uint32_t _i338; + for (_i338 = 0; _i338 < _size334; ++_i338) { - std::string _key277; - xfer += iprot->readString(_key277); - std::string& _val278 = this->success[_key277]; - xfer += iprot->readString(_val278); + std::string _key339; + xfer += iprot->readString(_key339); + std::string& _val340 = this->success[_key339]; + xfer += iprot->readString(_val340); } iprot->readMapEnd(); } @@ -7453,11 +7453,11 @@ 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) + std::map ::const_iterator _iter341; + for (_iter341 = this->success.begin(); _iter341 != this->success.end(); ++_iter341) { - xfer += oprot->writeString(_iter279->first); - xfer += oprot->writeString(_iter279->second); + xfer += oprot->writeString(_iter341->first); + xfer += oprot->writeString(_iter341->second); } xfer += oprot->writeMapEnd(); } @@ -7496,17 +7496,17 @@ 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) + uint32_t _size342; + apache::thrift::protocol::TType _ktype343; + apache::thrift::protocol::TType _vtype344; + iprot->readMapBegin(_ktype343, _vtype344, _size342); + uint32_t _i346; + for (_i346 = 0; _i346 < _size342; ++_i346) { - std::string _key285; - xfer += iprot->readString(_key285); - std::string& _val286 = (*(this->success))[_key285]; - xfer += iprot->readString(_val286); + std::string _key347; + xfer += iprot->readString(_key347); + std::string& _val348 = (*(this->success))[_key347]; + xfer += iprot->readString(_val348); } iprot->readMapEnd(); } @@ -8347,14 +8347,14 @@ 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) + uint32_t _size349; + apache::thrift::protocol::TType _etype352; + iprot->readListBegin(_etype352, _size349); + this->success.resize(_size349); + uint32_t _i353; + for (_i353 = 0; _i353 < _size349; ++_i353) { - xfer += this->success[_i291].read(iprot); + xfer += this->success[_i353].read(iprot); } iprot->readListEnd(); } @@ -8401,10 +8401,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 _iter292; - for (_iter292 = this->success.begin(); _iter292 != this->success.end(); ++_iter292) + std::vector ::const_iterator _iter354; + for (_iter354 = this->success.begin(); _iter354 != this->success.end(); ++_iter354) { - xfer += (*_iter292).write(oprot); + xfer += (*_iter354).write(oprot); } xfer += oprot->writeListEnd(); } @@ -8447,14 +8447,14 @@ 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) + uint32_t _size355; + apache::thrift::protocol::TType _etype358; + iprot->readListBegin(_etype358, _size355); + (*(this->success)).resize(_size355); + uint32_t _i359; + for (_i359 = 0; _i359 < _size355; ++_i359) { - xfer += (*(this->success))[_i297].read(iprot); + xfer += (*(this->success))[_i359].read(iprot); } iprot->readListEnd(); } @@ -8605,14 +8605,14 @@ 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) + uint32_t _size360; + apache::thrift::protocol::TType _etype363; + iprot->readListBegin(_etype363, _size360); + this->success.resize(_size360); + uint32_t _i364; + for (_i364 = 0; _i364 < _size360; ++_i364) { - xfer += iprot->readString(this->success[_i302]); + xfer += iprot->readString(this->success[_i364]); } iprot->readListEnd(); } @@ -8651,10 +8651,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 _iter303; - for (_iter303 = this->success.begin(); _iter303 != this->success.end(); ++_iter303) + std::vector ::const_iterator _iter365; + for (_iter365 = this->success.begin(); _iter365 != this->success.end(); ++_iter365) { - xfer += oprot->writeString((*_iter303)); + xfer += oprot->writeString((*_iter365)); } xfer += oprot->writeListEnd(); } @@ -8693,14 +8693,14 @@ 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) + uint32_t _size366; + apache::thrift::protocol::TType _etype369; + iprot->readListBegin(_etype369, _size366); + (*(this->success)).resize(_size366); + uint32_t _i370; + for (_i370 = 0; _i370 < _size366; ++_i370) { - xfer += iprot->readString((*(this->success))[_i308]); + xfer += iprot->readString((*(this->success))[_i370]); } iprot->readListEnd(); } @@ -8729,163 +8729,5871 @@ 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_user_privilege_set_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->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 _size371; + apache::thrift::protocol::TType _etype374; + iprot->readListBegin(_etype374, _size371); + this->group_names.resize(_size371); + uint32_t _i375; + for (_i375 = 0; _i375 < _size371; ++_i375) + { + xfer += iprot->readString(this->group_names[_i375]); + } + iprot->readListEnd(); + } + this->__isset.group_names = 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; + 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 _iter376; + for (_iter376 = this->group_names.begin(); _iter376 != this->group_names.end(); ++_iter376) + { + xfer += oprot->writeString((*_iter376)); + } + xfer += oprot->writeListEnd(); } - return; + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void ThriftHiveMetastoreClient::get_database(Database& _return, const std::string& name) -{ - send_get_database(name); - recv_get_database(_return); +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 _iter377; + for (_iter377 = (*(this->group_names)).begin(); _iter377 != (*(this->group_names)).end(); ++_iter377) + { + xfer += oprot->writeString((*_iter377)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; } -void ThriftHiveMetastoreClient::send_get_database(const std::string& name) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("get_database", apache::thrift::protocol::T_CALL, cseqid); +uint32_t ThriftHiveMetastore_get_user_privilege_set_result::read(apache::thrift::protocol::TProtocol* iprot) { - ThriftHiveMetastore_get_database_pargs args; - args.name = &name; - 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_get_database(Database& _return) -{ + 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("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); + 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(); } - 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"); -} + xfer += iprot->readStructEnd(); -void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData) -{ - send_drop_database(name, deleteData); - recv_drop_database(); + return xfer; } -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); +uint32_t ThriftHiveMetastore_get_user_privilege_set_result::write(apache::thrift::protocol::TProtocol* oprot) const { - ThriftHiveMetastore_drop_database_pargs args; - args.name = &name; - args.deleteData = &deleteData; - args.write(oprot_); + uint32_t xfer = 0; - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + 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; } -void ThriftHiveMetastoreClient::recv_drop_database() -{ +uint32_t ThriftHiveMetastore_get_user_privilege_set_presult::read(apache::thrift::protocol::TProtocol* iprot) { - int32_t rseqid = 0; + uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + 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 _size378; + apache::thrift::protocol::TType _etype381; + iprot->readListBegin(_etype381, _size378); + this->group_names.resize(_size378); + uint32_t _i382; + for (_i382 = 0; _i382 < _size378; ++_i382) + { + xfer += iprot->readString(this->group_names[_i382]); + } + 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 _iter383; + for (_iter383 = this->group_names.begin(); _iter383 != this->group_names.end(); ++_iter383) + { + xfer += oprot->writeString((*_iter383)); + } + 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 _iter384; + for (_iter384 = (*(this->group_names)).begin(); _iter384 != (*(this->group_names)).end(); ++_iter384) + { + xfer += oprot->writeString((*_iter384)); + } + 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 _size385; + apache::thrift::protocol::TType _etype388; + iprot->readListBegin(_etype388, _size385); + this->group_names.resize(_size385); + uint32_t _i389; + for (_i389 = 0; _i389 < _size385; ++_i389) + { + xfer += iprot->readString(this->group_names[_i389]); + } + 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 _iter390; + for (_iter390 = this->group_names.begin(); _iter390 != this->group_names.end(); ++_iter390) + { + xfer += oprot->writeString((*_iter390)); + } + 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 _iter391; + for (_iter391 = (*(this->group_names)).begin(); _iter391 != (*(this->group_names)).end(); ++_iter391) + { + xfer += oprot->writeString((*_iter391)); + } + 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 _size392; + apache::thrift::protocol::TType _etype395; + iprot->readListBegin(_etype395, _size392); + this->group_names.resize(_size392); + uint32_t _i396; + for (_i396 = 0; _i396 < _size392; ++_i396) + { + xfer += iprot->readString(this->group_names[_i396]); + } + 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 _iter397; + for (_iter397 = this->group_names.begin(); _iter397 != this->group_names.end(); ++_iter397) + { + xfer += oprot->writeString((*_iter397)); + } + 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 _iter398; + for (_iter398 = (*(this->group_names)).begin(); _iter398 != (*(this->group_names)).end(); ++_iter398) + { + xfer += oprot->writeString((*_iter398)); + } + 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 _size399; + apache::thrift::protocol::TType _etype402; + iprot->readListBegin(_etype402, _size399); + this->group_names.resize(_size399); + uint32_t _i403; + for (_i403 = 0; _i403 < _size399; ++_i403) + { + xfer += iprot->readString(this->group_names[_i403]); + } + 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 _iter404; + for (_iter404 = this->group_names.begin(); _iter404 != this->group_names.end(); ++_iter404) + { + xfer += oprot->writeString((*_iter404)); + } + 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 _iter405; + for (_iter405 = (*(this->group_names)).begin(); _iter405 != (*(this->group_names)).end(); ++_iter405) + { + xfer += oprot->writeString((*_iter405)); + } + 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; + 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->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->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_create_role_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_args::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->role_name); + this->__isset.role_name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_args::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_args"); + xfer += oprot->writeFieldBegin("role_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->role_name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_pargs"); + xfer += oprot->writeFieldBegin("role_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString((*(this->role_name))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_result::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_result::write(apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_role_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.o1) { + xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += this->o1.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHiveMetastore_drop_role_presult::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHiveMetastore_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; + 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->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->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; + 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->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->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_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 _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; + 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 _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(); + } + 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 _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; + 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 _size417; + apache::thrift::protocol::TType _etype420; + iprot->readListBegin(_etype420, _size417); + this->success.resize(_size417); + uint32_t _i421; + for (_i421 = 0; _i421 < _size417; ++_i421) + { + xfer += this->success[_i421].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 _iter422; + for (_iter422 = this->success.begin(); _iter422 != this->success.end(); ++_iter422) + { + xfer += (*_iter422).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 _size423; + apache::thrift::protocol::TType _etype426; + iprot->readListBegin(_etype426, _size423); + (*(this->success)).resize(_size423); + uint32_t _i427; + for (_i427 = 0; _i427 < _size423; ++_i427) + { + xfer += (*(this->success))[_i427].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 _size428; + apache::thrift::protocol::TType _etype431; + iprot->readListBegin(_etype431, _size428); + this->success.resize(_size428); + uint32_t _i432; + for (_i432 = 0; _i432 < _size428; ++_i432) + { + xfer += this->success[_i432].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == apache::thrift::protocol::T_STRUCT) { + xfer += this->o1.read(iprot); + this->__isset.o1 = true; + } else { + xfer += iprot->skip(ftype); + } + break; + 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 _iter433; + for (_iter433 = this->success.begin(); _iter433 != this->success.end(); ++_iter433) + { + xfer += (*_iter433).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 _size434; + apache::thrift::protocol::TType _etype437; + iprot->readListBegin(_etype437, _size434); + (*(this->success)).resize(_size434); + uint32_t _i438; + for (_i438 = 0; _i438 < _size434; ++_i438) + { + xfer += (*(this->success))[_i438].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 _size439; + apache::thrift::protocol::TType _etype442; + iprot->readListBegin(_etype442, _size439); + this->success.resize(_size439); + uint32_t _i443; + for (_i443 = 0; _i443 < _size439; ++_i443) + { + xfer += this->success[_i443].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 _iter444; + for (_iter444 = this->success.begin(); _iter444 != this->success.end(); ++_iter444) + { + xfer += (*_iter444).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 _size445; + apache::thrift::protocol::TType _etype448; + iprot->readListBegin(_etype448, _size445); + (*(this->success)).resize(_size445); + uint32_t _i449; + for (_i449 = 0; _i449 < _size445; ++_i449) + { + xfer += (*(this->success))[_i449].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->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("column_name", apache::thrift::protocol::T_STRING, 6); + 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("column_name", apache::thrift::protocol::T_STRING, 6); + 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 _size450; + apache::thrift::protocol::TType _etype453; + iprot->readListBegin(_etype453, _size450); + this->success.resize(_size450); + uint32_t _i454; + for (_i454 = 0; _i454 < _size450; ++_i454) + { + xfer += this->success[_i454].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 _iter455; + for (_iter455 = this->success.begin(); _iter455 != this->success.end(); ++_iter455) + { + xfer += (*_iter455).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 _size456; + apache::thrift::protocol::TType _etype459; + iprot->readListBegin(_etype459, _size456); + (*(this->success)).resize(_size456); + uint32_t _i460; + for (_i460 = 0; _i460 < _size456; ++_i460) + { + xfer += (*(this->success))[_i460].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 _size461; + apache::thrift::protocol::TType _etype464; + iprot->readListBegin(_etype464, _size461); + this->dbs.resize(_size461); + uint32_t _i465; + for (_i465 = 0; _i465 < _size461; ++_i465) + { + xfer += this->dbs[_i465].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 _size466; + apache::thrift::protocol::TType _etype469; + iprot->readListBegin(_etype469, _size466); + this->tables.resize(_size466); + uint32_t _i470; + for (_i470 = 0; _i470 < _size466; ++_i470) + { + xfer += this->tables[_i470].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 _size471; + apache::thrift::protocol::TType _etype474; + iprot->readListBegin(_etype474, _size471); + this->parts.resize(_size471); + uint32_t _i475; + for (_i475 = 0; _i475 < _size471; ++_i475) + { + xfer += this->parts[_i475].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 _size476; + apache::thrift::protocol::TType _ktype477; + apache::thrift::protocol::TType _vtype478; + iprot->readMapBegin(_ktype477, _vtype478, _size476); + uint32_t _i480; + for (_i480 = 0; _i480 < _size476; ++_i480) + { + Table _key481; + xfer += _key481.read(iprot); + std::vector & _val482 = this->columns[_key481]; + { + _val482.clear(); + uint32_t _size483; + apache::thrift::protocol::TType _etype486; + iprot->readListBegin(_etype486, _size483); + _val482.resize(_size483); + uint32_t _i487; + for (_i487 = 0; _i487 < _size483; ++_i487) + { + xfer += iprot->readString(_val482[_i487]); + } + 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 _iter488; + for (_iter488 = this->dbs.begin(); _iter488 != this->dbs.end(); ++_iter488) + { + xfer += (*_iter488).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 _iter489; + for (_iter489 = this->tables.begin(); _iter489 != this->tables.end(); ++_iter489) + { + xfer += (*_iter489).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 _iter490; + for (_iter490 = this->parts.begin(); _iter490 != this->parts.end(); ++_iter490) + { + xfer += (*_iter490).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 _iter491; + for (_iter491 = this->columns.begin(); _iter491 != this->columns.end(); ++_iter491) + { + xfer += _iter491->first.write(oprot); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, _iter491->second.size()); + std::vector ::const_iterator _iter492; + for (_iter492 = _iter491->second.begin(); _iter492 != _iter491->second.end(); ++_iter492) + { + xfer += oprot->writeString((*_iter492)); + } + 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 _iter493; + for (_iter493 = (*(this->dbs)).begin(); _iter493 != (*(this->dbs)).end(); ++_iter493) + { + xfer += (*_iter493).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 _iter494; + for (_iter494 = (*(this->tables)).begin(); _iter494 != (*(this->tables)).end(); ++_iter494) + { + xfer += (*_iter494).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 _iter495; + for (_iter495 = (*(this->parts)).begin(); _iter495 != (*(this->parts)).end(); ++_iter495) + { + xfer += (*_iter495).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 _iter496; + for (_iter496 = (*(this->columns)).begin(); _iter496 != (*(this->columns)).end(); ++_iter496) + { + xfer += _iter496->first.write(oprot); + { + xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, _iter496->second.size()); + std::vector ::const_iterator _iter497; + for (_iter497 = _iter496->second.begin(); _iter497 != _iter496->second.end(); ++_iter497) + { + xfer += oprot->writeString((*_iter497)); + } + 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); +} + +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_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) { @@ -8901,42 +14609,46 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_database") != 0) { + if (fname.compare("get_partitions") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_drop_database_presult result; + ThriftHiveMetastore_get_partitions_presult result; + result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); + if (result.__isset.success) { + // _return pointer has now been filled + return; + } if (result.__isset.o1) { throw result.o1; } if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - return; + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); } -void ThriftHiveMetastoreClient::get_databases(std::vector & _return, const std::string& pattern) +void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { - send_get_databases(pattern); - recv_get_databases(_return); + send_get_partition_names(db_name, tbl_name, max_parts); + recv_get_partition_names(_return); } -void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) +void ThriftHiveMetastoreClient::send_get_partition_names(const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_databases", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_databases_pargs args; - args.pattern = &pattern; + 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(); @@ -8944,7 +14656,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) { int32_t rseqid = 0; @@ -8965,13 +14677,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_databases") != 0) { + if (fname.compare("get_partition_names") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_databases_presult result; + ThriftHiveMetastore_get_partition_names_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -8981,24 +14693,28 @@ // _return pointer has now been filled return; } - if (result.__isset.o1) { - throw result.o1; + if (result.__isset.o2) { + throw result.o2; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_names failed: unknown result"); } -void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::get_partitions_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { - send_get_all_databases(); - recv_get_all_databases(_return); + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts); + recv_get_partitions_ps(_return); } -void ThriftHiveMetastoreClient::send_get_all_databases() +void ThriftHiveMetastoreClient::send_get_partitions_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_all_databases_pargs args; + ThriftHiveMetastore_get_partitions_ps_pargs args; + args.db_name = &db_name; + args.tbl_name = &tbl_name; + args.part_vals = &part_vals; + args.max_parts = &max_parts; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9006,7 +14722,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector & _return) +void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) { int32_t rseqid = 0; @@ -9027,13 +14743,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") != 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_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9046,22 +14762,25 @@ if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps 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(); @@ -9069,7 +14788,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; @@ -9090,13 +14809,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(); @@ -9109,25 +14828,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(); @@ -9135,7 +14854,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_create_type() +void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) { int32_t rseqid = 0; @@ -9156,21 +14875,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; @@ -9178,25 +14897,24 @@ if (result.__isset.o2) { throw result.o2; } - if (result.__isset.o3) { - throw result.o3; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_by_filter failed: unknown result"); } -bool ThriftHiveMetastoreClient::drop_type(const std::string& type) +void ThriftHiveMetastoreClient::alter_partition(const std::string& db_name, const std::string& tbl_name, const Partition& new_part) { - send_drop_type(type); - return recv_drop_type(); + send_alter_partition(db_name, tbl_name, new_part); + recv_alter_partition(); } -void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) +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("drop_type", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_partition", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_drop_type_pargs args; - args.type = &type; + 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(); @@ -9204,7 +14922,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_type() +void ThriftHiveMetastoreClient::recv_alter_partition() { int32_t rseqid = 0; @@ -9225,44 +14943,40 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("drop_type") != 0) { + if (fname.compare("alter_partition") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - bool _return; - ThriftHiveMetastore_drop_type_presult result; - result.success = &_return; + ThriftHiveMetastore_alter_partition_presult result; 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"); + return; } -void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) +void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) { - send_get_type_all(name); - recv_get_type_all(_return); + send_get_config_value(name, defaultValue); + recv_get_config_value(_return); } -void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) +void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type_all", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_config_value", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_type_all_pargs args; + ThriftHiveMetastore_get_config_value_pargs args; args.name = &name; + args.defaultValue = &defaultValue; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9270,7 +14984,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_type_all(std::map & _return) +void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) { int32_t rseqid = 0; @@ -9291,13 +15005,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_type_all") != 0) { + if (fname.compare("get_config_value") != 0) { iprot_->skip(apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); } - ThriftHiveMetastore_get_type_all_presult result; + ThriftHiveMetastore_get_config_value_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9307,26 +15021,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, "get_config_value 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_vals(std::vector & _return, const std::string& part_name) { - send_get_fields(db_name, table_name); - recv_get_fields(_return); + send_partition_name_to_vals(part_name); + recv_partition_name_to_vals(_return); } -void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) +void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_fields", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_vals", 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_vals_pargs args; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9334,7 +15047,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _return) +void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) { int32_t rseqid = 0; @@ -9355,13 +15068,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_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_fields_presult result; + ThriftHiveMetastore_partition_name_to_vals_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9374,29 +15087,22 @@ 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_vals failed: unknown result"); } -void ThriftHiveMetastoreClient::get_schema(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_schema(db_name, table_name); - recv_get_schema(_return); + send_partition_name_to_spec(part_name); + recv_partition_name_to_spec(_return); } -void ThriftHiveMetastoreClient::send_get_schema(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_schema", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_spec", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_schema_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(); @@ -9404,7 +15110,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _return) +void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) { int32_t rseqid = 0; @@ -9425,13 +15131,13 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_schema") != 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_schema_presult result; + ThriftHiveMetastore_partition_name_to_spec_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -9444,28 +15150,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_schema failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); } -void ThriftHiveMetastoreClient::create_table(const Table& tbl) +void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) { - send_create_table(tbl); - recv_create_table(); + send_add_index(new_index, index_table); + recv_add_index(_return); } -void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) +void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_index", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_create_table_pargs args; - args.tbl = &tbl; + ThriftHiveMetastore_add_index_pargs args; + args.new_index = &new_index; + args.index_table = &index_table; args.write(oprot_); oprot_->writeMessageEnd(); @@ -9473,7 +15174,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_create_table() +void ThriftHiveMetastoreClient::recv_add_index(Index& _return) { int32_t rseqid = 0; @@ -9494,17 +15195,22 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("create_table") != 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_create_table_presult result; + ThriftHiveMetastore_add_index_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; } @@ -9514,26 +15220,24 @@ if (result.__isset.o3) { throw result.o3; } - if (result.__isset.o4) { - throw result.o4; - } - return; + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); } -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_); @@ -9542,7 +15246,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_drop_table() +bool ThriftHiveMetastoreClient::recv_drop_index_by_name() { int32_t rseqid = 0; @@ -9563,40 +15267,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(); @@ -9604,7 +15314,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; @@ -9625,13 +15335,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(); @@ -9644,22 +15354,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(); @@ -9667,7 +15382,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; @@ -9688,13 +15403,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(); @@ -9707,23 +15422,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(); @@ -9731,7 +15450,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_table(Table& _return) +void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & _return) { int32_t rseqid = 0; @@ -9752,13 +15471,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(); @@ -9768,30 +15487,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) +void ThriftHiveMetastoreClient::get_user_privilege_set(PrincipalPrivilegeSet& _return, const std::string& user_name, const std::vector & group_names) { - send_alter_table(dbname, tbl_name, new_tbl); - recv_alter_table(); + 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(); @@ -9799,7 +15514,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_table() +void ThriftHiveMetastoreClient::recv_get_user_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -9820,39 +15535,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(); @@ -9860,7 +15579,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_db_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -9881,13 +15600,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(); @@ -9900,30 +15619,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(); @@ -9931,7 +15645,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) +void ThriftHiveMetastoreClient::recv_get_table_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -9952,13 +15666,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(); @@ -9971,30 +15685,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(); @@ -10002,7 +15712,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; @@ -10023,13 +15733,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(); @@ -10042,31 +15752,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(); @@ -10074,7 +15780,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_partition() +void ThriftHiveMetastoreClient::recv_get_column_privilege_set(PrincipalPrivilegeSet& _return) { int32_t rseqid = 0; @@ -10095,47 +15801,42 @@ 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) { - 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); + 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) { 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; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; - args.deleteData = &deleteData; + ThriftHiveMetastore_create_role_pargs args; + args.role_name = &role_name; + args.owner_name = &owner_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10143,7 +15844,7 @@ oprot_->getTransport()->writeEnd(); } -bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() +bool ThriftHiveMetastoreClient::recv_create_role() { int32_t rseqid = 0; @@ -10164,14 +15865,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(); @@ -10183,27 +15884,22 @@ if (result.__isset.o1) { throw result.o1; } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_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) { - send_get_partition(db_name, tbl_name, part_vals); - recv_get_partition(_return); + send_drop_role(role_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) { 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; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_vals = &part_vals; + ThriftHiveMetastore_drop_role_pargs args; + args.role_name = &role_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10211,7 +15907,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) +bool ThriftHiveMetastoreClient::recv_drop_role() { int32_t rseqid = 0; @@ -10232,46 +15928,44 @@ 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; + 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, "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) { - 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); + 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) { 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; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.part_name = &part_name; + 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.write(oprot_); oprot_->writeMessageEnd(); @@ -10279,7 +15973,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) +bool ThriftHiveMetastoreClient::recv_add_role_member() { int32_t rseqid = 0; @@ -10300,46 +15994,44 @@ 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) { - 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); + 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) { 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; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - args.max_parts = &max_parts; + 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.write(oprot_); oprot_->writeMessageEnd(); @@ -10347,7 +16039,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_remove_role_member() { int32_t rseqid = 0; @@ -10368,46 +16060,43 @@ 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_security_user_grant(std::vector & _return, const std::string& principla_name, const bool is_role, const bool is_group) { - send_get_partition_names(db_name, tbl_name, max_parts); - recv_get_partition_names(_return); + send_list_security_user_grant(principla_name, is_role, is_group); + recv_list_security_user_grant(_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_security_user_grant(const std::string& principla_name, const bool is_role, const bool is_group) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_user_grant", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_pargs args; - args.db_name = &db_name; - args.tbl_name = &tbl_name; - 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(); @@ -10415,7 +16104,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_names(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_security_user_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10436,13 +16125,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_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_partition_names_presult result; + ThriftHiveMetastore_list_security_user_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10452,28 +16141,28 @@ // _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_security_user_grant 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_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_partitions_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partitions_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_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_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_partitions_ps", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_db_grant", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_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(); @@ -10481,7 +16170,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_security_db_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10502,13 +16191,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_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_partitions_ps_presult result; + ThriftHiveMetastore_list_security_db_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10521,25 +16210,26 @@ 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_db_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_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_partition_names_ps(db_name, tbl_name, part_vals, max_parts); - recv_get_partition_names_ps(_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_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_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_partition_names_ps", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_table_grant", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partition_names_ps_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.part_vals = &part_vals; - args.max_parts = &max_parts; + args.table_name = &table_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10547,7 +16237,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_security_table_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10568,13 +16258,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_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_partition_names_ps_presult result; + ThriftHiveMetastore_list_security_table_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10587,25 +16277,27 @@ 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_table_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_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_get_partitions_by_filter(db_name, tbl_name, filter, max_parts); - recv_get_partitions_by_filter(_return); + 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_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_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("get_partitions_by_filter", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_partition_grant", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_partitions_by_filter_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.filter = &filter; - args.max_parts = &max_parts; + args.table_name = &table_name; + args.part_name = &part_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10613,7 +16305,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vector & _return) +void ThriftHiveMetastoreClient::recv_list_security_partition_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10634,13 +16326,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_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_get_partitions_by_filter_presult result; + ThriftHiveMetastore_list_security_partition_grant_presult result; result.success = &_return; result.read(iprot_); iprot_->readMessageEnd(); @@ -10653,27 +16345,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_partition_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_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& column_name) { - send_alter_partition(db_name, tbl_name, new_part); - recv_alter_partition(); + send_list_security_column_grant(principal_name, is_group, is_role, db_name, table_name, column_name); + recv_list_security_column_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_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& column_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_partition", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("list_security_column_grant", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_alter_partition_pargs args; + 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.tbl_name = &tbl_name; - args.new_part = &new_part; + args.table_name = &table_name; + args.column_name = &column_name; args.write(oprot_); oprot_->writeMessageEnd(); @@ -10681,7 +16373,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_alter_partition() +void ThriftHiveMetastoreClient::recv_list_security_column_grant(std::vector & _return) { int32_t rseqid = 0; @@ -10702,40 +16394,45 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("alter_partition") != 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_alter_partition_presult result; + ThriftHiveMetastore_list_security_column_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_column_grant failed: unknown result"); } -void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std::string& name, const std::string& defaultValue) +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_get_config_value(name, defaultValue); - recv_get_config_value(_return); + send_grant_privileges(user_name, is_role, is_group, privileges, grantor); + return recv_grant_privileges(); } -void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) +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("get_config_value", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("grant_privileges", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_get_config_value_pargs args; - args.name = &name; - args.defaultValue = &defaultValue; + 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(); @@ -10743,7 +16440,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) +bool ThriftHiveMetastoreClient::recv_grant_privileges() { int32_t rseqid = 0; @@ -10764,41 +16461,44 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("get_config_value") != 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_get_config_value_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, "get_config_value failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "grant_privileges failed: unknown result"); } -void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _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_vals(part_name); - recv_partition_name_to_vals(_return); + send_revoke_privileges(user_name, is_role, is_group, privileges); + return recv_revoke_privileges(); } -void ThriftHiveMetastoreClient::send_partition_name_to_vals(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_vals", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("revoke_privileges", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_vals_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(); @@ -10806,7 +16506,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return) +bool ThriftHiveMetastoreClient::recv_revoke_privileges() { int32_t rseqid = 0; @@ -10827,41 +16527,48 @@ iprot_->getTransport()->readEnd(); throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } - if (fname.compare("partition_name_to_vals") != 0) { + if (fname.compare("revoke_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_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_vals failed: unknown result"); + throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "revoke_privileges failed: unknown result"); } -void ThriftHiveMetastoreClient::partition_name_to_spec(std::map & _return, const std::string& part_name) +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_partition_name_to_spec(part_name); - recv_partition_name_to_spec(_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_partition_name_to_spec(const std::string& part_name) +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("partition_name_to_spec", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("revoke_all_privileges", apache::thrift::protocol::T_CALL, cseqid); - ThriftHiveMetastore_partition_name_to_spec_pargs args; - args.part_name = &part_name; + 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(); @@ -10869,7 +16576,7 @@ oprot_->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::map & _return) +bool ThriftHiveMetastoreClient::recv_revoke_all_privileges() { int32_t rseqid = 0; @@ -10890,418 +16597,658 @@ 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_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_partition_name_to_spec_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 + if (result.__isset.success) { + return _return; + } + if (result.__isset.o1) { + throw result.o1; + } + 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; + } + + return process_fn(iprot, oprot, fname, seqid); +} + +bool ThriftHiveMetastoreProcessor::process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) { + std::map::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + return facebook::fb303::FacebookServiceProcessor::process_fn(iprot, oprot, fname, seqid); + } + (this->*(pfn->second))(seqid, iprot, oprot); + return true; +} + +void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_create_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_create_database_result result; + try { + iface_->create_database(args.database); + } catch (AlreadyExistsException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (InvalidObjectException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_database", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("create_database", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_get_database_result result; + try { + iface_->get_database(result.success, args.name); + result.__isset.success = true; + } catch (NoSuchObjectException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_database", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); return; } - if (result.__isset.o1) { - throw result.o1; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "partition_name_to_spec failed: unknown result"); -} -void ThriftHiveMetastoreClient::add_index(Index& _return, const Index& new_index, const Table& index_table) -{ - send_add_index(new_index, index_table); - recv_add_index(_return); + oprot->writeMessageBegin("get_database", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::send_add_index(const Index& new_index, const Table& index_table) +void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - int32_t cseqid = 0; - oprot_->writeMessageBegin("add_index", apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_drop_database_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - ThriftHiveMetastore_add_index_pargs args; - args.new_index = &new_index; - args.index_table = &index_table; - args.write(oprot_); + 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_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("drop_database", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreClient::recv_add_index(Index& _return) +void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("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_add_index_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ThriftHiveMetastore_get_databases_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + 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; } - if (result.__isset.o1) { - throw result.o1; - } - if (result.__isset.o2) { - throw result.o2; - } - if (result.__isset.o3) { - throw result.o3; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); + + oprot->writeMessageBegin("get_databases", 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_get_all_databases(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_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_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(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_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_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(); } -bool ThriftHiveMetastoreClient::recv_drop_index_by_name() +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("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_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; } - 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("create_type", 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_drop_type(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_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_get_index_by_name(const std::string& db_name, const std::string& tbl_name, const std::string& index_name) +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("get_index_by_name", apache::thrift::protocol::T_CALL, cseqid); + ThriftHiveMetastore_get_type_all_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_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(); } -void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) +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; - - 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_get_fields_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + 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; } - 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("get_fields", 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_schema(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_schema_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_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_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("get_schema", 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_create_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_indexes") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHiveMetastore_get_indexes_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); + ThriftHiveMetastore_create_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + 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; } - 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("create_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_drop_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_drop_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_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; + } - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); + oprot->writeMessageBegin("drop_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_get_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; - - 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_get_tables_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); - if (result.__isset.success) { - // _return pointer has now been filled + 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; } - if (result.__isset.o2) { - throw result.o2; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); + + oprot->writeMessageBegin("get_tables", 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_get_all_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_get_all_tables_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_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; + } - iprot->readMessageBegin(fname, mtype, seqid); + oprot->writeMessageBegin("get_all_tables", 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_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 true; + return; } - return process_fn(iprot, oprot, fname, seqid); + oprot->writeMessageBegin("get_table", 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_alter_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHiveMetastore_alter_table_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHiveMetastore_alter_table_result result; + try { + iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); + } catch (InvalidOperationException &o1) { + result.o1 = o1; + result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; + } catch (const std::exception& e) { + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_table", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; } - (this->*(pfn->second))(seqid, iprot, oprot); - return true; + + oprot->writeMessageBegin("alter_table", 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_add_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_create_database_args args; + ThriftHiveMetastore_add_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_database_result result; + ThriftHiveMetastore_add_partition_result result; try { - iface_->create_database(args.database); - } catch (AlreadyExistsException &o1) { + iface_->add_partition(result.success, args.new_part); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (MetaException &o3) { @@ -11309,7 +17256,7 @@ 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("add_partition", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11317,33 +17264,36 @@ return; } - oprot->writeMessageBegin("create_database", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_partition", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_database_args args; + ThriftHiveMetastore_append_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_database_result result; + ThriftHiveMetastore_append_partition_result result; try { - iface_->get_database(result.success, args.name); + iface_->append_partition(result.success, args.db_name, args.tbl_name, args.part_vals); result.__isset.success = true; - } catch (NoSuchObjectException &o1) { + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_database", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("append_partition", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11351,27 +17301,28 @@ return; } - oprot->writeMessageBegin("get_database", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_drop_database_args args; + ThriftHiveMetastore_append_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_database_result result; + ThriftHiveMetastore_append_partition_by_name_result result; try { - iface_->drop_database(args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { + 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 (InvalidOperationException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; } catch (MetaException &o3) { @@ -11379,7 +17330,7 @@ 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("append_partition_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11387,30 +17338,33 @@ return; } - oprot->writeMessageBegin("drop_database", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition_by_name", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_databases_args args; + ThriftHiveMetastore_drop_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_databases_result result; + ThriftHiveMetastore_drop_partition_result result; try { - iface_->get_databases(result.success, args.pattern); + result.success = iface_->drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (MetaException &o2) { + result.o2 = o2; + result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_databases", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("drop_partition", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11418,30 +17372,33 @@ return; } - oprot->writeMessageBegin("get_databases", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_all_databases_args args; + ThriftHiveMetastore_drop_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_all_databases_result result; + ThriftHiveMetastore_drop_partition_by_name_result result; try { - iface_->get_all_databases(result.success); + result.success = iface_->drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (NoSuchObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; + } catch (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("drop_partition_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11449,23 +17406,23 @@ return; } - oprot->writeMessageBegin("get_all_databases", 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_type(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_type_args args; + ThriftHiveMetastore_get_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_type_result result; + ThriftHiveMetastore_get_partition_result result; try { - iface_->get_type(result.success, args.name); + iface_->get_partition(result.success, args.db_name, args.tbl_name, args.part_vals); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; @@ -11475,7 +17432,7 @@ 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_partition", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11483,36 +17440,33 @@ return; } - oprot->writeMessageBegin("get_type", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_create_type(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_create_type_args args; + ThriftHiveMetastore_get_partition_by_name_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_type_result result; + ThriftHiveMetastore_get_partition_by_name_result result; try { - result.success = iface_->create_type(args.type); + iface_->get_partition_by_name(result.success, args.db_name, args.tbl_name, args.part_name); result.__isset.success = true; - } catch (AlreadyExistsException &o1) { + } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (InvalidObjectException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_type", 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(); @@ -11520,33 +17474,33 @@ return; } - oprot->writeMessageBegin("create_type", 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_drop_type(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_drop_type_args args; + ThriftHiveMetastore_get_partitions_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_type_result result; + ThriftHiveMetastore_get_partitions_result result; try { - result.success = iface_->drop_type(args.type); + 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 (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("drop_type", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11554,30 +17508,30 @@ return; } - oprot->writeMessageBegin("drop_type", 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_all(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_type_all_args args; + ThriftHiveMetastore_get_partition_names_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_type_all_result result; + ThriftHiveMetastore_get_partition_names_result result; try { - iface_->get_type_all(result.success, args.name); + iface_->get_partition_names(result.success, args.db_name, args.tbl_name, args.max_parts); 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); + oprot->writeMessageBegin("get_partition_names", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11585,36 +17539,30 @@ return; } - oprot->writeMessageBegin("get_type_all", 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_get_fields(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_get_fields_args args; + ThriftHiveMetastore_get_partitions_ps_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_fields_result result; + ThriftHiveMetastore_get_partitions_ps_result result; try { - iface_->get_fields(result.success, args.db_name, args.table_name); + 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 (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_partitions_ps", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11622,36 +17570,30 @@ return; } - oprot->writeMessageBegin("get_fields", 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_schema(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_schema_args args; + ThriftHiveMetastore_get_partition_names_ps_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_schema_result result; + ThriftHiveMetastore_get_partition_names_ps_result result; try { - iface_->get_schema(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_schema", 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(); @@ -11659,38 +17601,33 @@ return; } - oprot->writeMessageBegin("get_schema", 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_create_table(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_create_table_args args; + ThriftHiveMetastore_get_partitions_by_filter_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_create_table_result result; + ThriftHiveMetastore_get_partitions_by_filter_result result; try { - iface_->create_table(args.tbl); - } catch (AlreadyExistsException &o1) { + 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 (InvalidObjectException &o2) { + } catch (NoSuchObjectException &o2) { result.o2 = o2; result.__isset.o2 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = true; - } catch (NoSuchObjectException &o4) { - result.o4 = o4; - result.__isset.o4 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_table", apache::thrift::protocol::T_EXCEPTION, seqid); + oprot->writeMessageBegin("get_partitions_by_filter", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11698,32 +17635,32 @@ return; } - oprot->writeMessageBegin("create_table", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_by_filter", apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_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_drop_table_args args; + ThriftHiveMetastore_alter_partition_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_drop_table_result result; + ThriftHiveMetastore_alter_partition_result result; try { - iface_->drop_table(args.dbname, args.name, args.deleteData); - } catch (NoSuchObjectException &o1) { + iface_->alter_partition(args.db_name, args.tbl_name, args.new_part); + } catch (InvalidOperationException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o3) { - result.o3 = o3; - result.__isset.o3 = 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_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(); @@ -11731,30 +17668,30 @@ return; } - oprot->writeMessageBegin("drop_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_get_tables(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_get_tables_args args; + ThriftHiveMetastore_get_config_value_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_tables_result result; + ThriftHiveMetastore_get_config_value_result result; try { - iface_->get_tables(result.success, args.db_name, args.pattern); + iface_->get_config_value(result.success, args.name, args.defaultValue); result.__isset.success = true; - } catch (MetaException &o1) { + } catch (ConfigValSecurityException &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("get_config_value", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11762,30 +17699,30 @@ return; } - oprot->writeMessageBegin("get_tables", 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_all_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_all_tables_args args; + ThriftHiveMetastore_partition_name_to_vals_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_all_tables_result result; + ThriftHiveMetastore_partition_name_to_vals_result result; try { - iface_->get_all_tables(result.success, args.db_name); + 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_all_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(); @@ -11793,33 +17730,30 @@ return; } - oprot->writeMessageBegin("get_all_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_table(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_table_args args; + ThriftHiveMetastore_partition_name_to_spec_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_table_result result; + ThriftHiveMetastore_partition_name_to_spec_result result; try { - iface_->get_table(result.success, args.dbname, args.tbl_name); + iface_->partition_name_to_spec(result.success, args.part_name); result.__isset.success = true; } catch (MetaException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (NoSuchObjectException &o2) { - result.o2 = o2; - result.__isset.o2 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table", 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(); @@ -11827,32 +17761,36 @@ return; } - oprot->writeMessageBegin("get_table", 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_alter_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_alter_table_args args; + ThriftHiveMetastore_add_index_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_alter_table_result result; + ThriftHiveMetastore_add_index_result result; try { - iface_->alter_table(args.dbname, args.tbl_name, args.new_tbl); - } catch (InvalidOperationException &o1) { + iface_->add_index(result.success, args.new_index, args.index_table); + result.__isset.success = true; + } catch (InvalidObjectException &o1) { result.o1 = o1; result.__isset.o1 = true; - } catch (MetaException &o2) { + } catch (AlreadyExistsException &o2) { result.o2 = o2; result.__isset.o2 = true; + } catch (MetaException &o3) { + result.o3 = o3; + result.__isset.o3 = true; } catch (const std::exception& e) { apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_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(); @@ -11860,36 +17798,33 @@ return; } - oprot->writeMessageBegin("alter_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_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(); @@ -11897,36 +17832,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(); @@ -11934,36 +17866,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(); @@ -11971,33 +17900,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(); @@ -12005,33 +17931,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(); @@ -12039,33 +17962,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(); @@ -12073,33 +17993,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(); @@ -12107,33 +18024,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(); @@ -12141,30 +18055,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(); @@ -12172,30 +18086,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); 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(); @@ -12203,30 +18117,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); 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(); @@ -12234,33 +18148,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); 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(); @@ -12268,32 +18179,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); + 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(); @@ -12301,30 +18210,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_security_user_grant(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) { - ThriftHiveMetastore_get_config_value_args args; + ThriftHiveMetastore_list_security_user_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_get_config_value_result result; + ThriftHiveMetastore_list_security_user_grant_result result; try { - iface_->get_config_value(result.success, args.name, args.defaultValue); + iface_->list_security_user_grant(result.success, args.principla_name, args.is_role, args.is_group); 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_security_user_grant", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12332,30 +18241,30 @@ return; } - oprot->writeMessageBegin("get_config_value", 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_vals(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_vals_args args; + ThriftHiveMetastore_list_security_db_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_partition_name_to_vals_result result; + ThriftHiveMetastore_list_security_db_grant_result result; try { - iface_->partition_name_to_vals(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_vals", 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(); @@ -12363,30 +18272,30 @@ return; } - oprot->writeMessageBegin("partition_name_to_vals", 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_partition_name_to_spec(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_partition_name_to_spec_args args; + ThriftHiveMetastore_list_security_table_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_partition_name_to_spec_result result; + ThriftHiveMetastore_list_security_table_grant_result result; try { - iface_->partition_name_to_spec(result.success, args.part_name); + 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 (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_table_grant", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12394,36 +18303,30 @@ return; } - oprot->writeMessageBegin("partition_name_to_spec", 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_add_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_add_index_args args; + ThriftHiveMetastore_list_security_partition_grant_args args; args.read(iprot); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - ThriftHiveMetastore_add_index_result result; + ThriftHiveMetastore_list_security_partition_grant_result result; try { - iface_->add_index(result.success, args.new_index, args.index_table); + 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 (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_partition_grant", apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12431,33 +18334,30 @@ return; } - oprot->writeMessageBegin("add_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.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(); @@ -12465,33 +18365,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(); @@ -12499,33 +18396,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(); @@ -12533,30 +18427,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(); @@ -12564,7 +18458,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 1030336) +++ metastore/src/gen-cpp/ThriftHiveMetastore.h (working copy) @@ -53,6 +53,23 @@ 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) = 0; + virtual bool drop_role(const std::string& role_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) = 0; + virtual bool remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group) = 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& 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 { @@ -177,6 +194,64 @@ 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 */) { + bool _return = false; + return _return; + } + bool drop_role(const std::string& /* role_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 */) { + 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 */) { + bool _return = false; + return _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& /* 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 { @@ -4363,178 +4438,2204 @@ }; -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); - 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 ThriftHiveMetastoreProcessor : virtual public apache::thrift::TProcessor, public facebook::fb303::FacebookServiceProcessor { - protected: - boost::shared_ptr iface_; - virtual bool process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid); - private: - std::map processMap_; - void process_create_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_drop_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_all_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_create_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_drop_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_type_all(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_fields(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_schema(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_create_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_drop_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_all_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_alter_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_add_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_append_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_append_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - 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_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_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_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); - void process_get_config_value(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_partition_name_to_vals(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_partition_name_to_spec(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_add_index(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_drop_index_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - 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); +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("") { + } + + virtual ~ThriftHiveMetastore_create_role_args() throw() {} + + std::string role_name; + std::string owner_name; + + struct __isset { + __isset() : role_name(false), owner_name(false) {} + bool role_name; + bool owner_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; + 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; + + 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("") { + } + + virtual ~ThriftHiveMetastore_drop_role_args() throw() {} + + std::string role_name; + + struct __isset { + __isset() : role_name(false) {} + bool role_name; + } __isset; + + bool operator == (const ThriftHiveMetastore_drop_role_args & rhs) const + { + if (!(role_name == rhs.role_name)) + return false; + return true; + } + bool operator != (const ThriftHiveMetastore_drop_role_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHiveMetastore_drop_role_args & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +class ThriftHiveMetastore_drop_role_pargs { + public: + + + virtual ~ThriftHiveMetastore_drop_role_pargs() throw() {} + + const std::string* role_name; + + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + +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) { + } + + virtual ~ThriftHiveMetastore_add_role_member_args() throw() {} + + std::string role_name; + std::string user_name; + bool is_role; + bool is_group; + + struct __isset { + __isset() : role_name(false), user_name(false), is_role(false), is_group(false) {} + bool role_name; + bool user_name; + bool is_role; + bool is_group; + } __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; + 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; + + 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) { + } + + virtual ~ThriftHiveMetastore_remove_role_member_args() throw() {} + + std::string role_name; + std::string user_name; + bool is_role; + bool is_group; + + struct __isset { + __isset() : role_name(false), user_name(false), is_role(false), is_group(false) {} + bool role_name; + bool user_name; + bool is_role; + bool is_group; + } __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; + 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; + + 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_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(""), 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 column_name; + + struct __isset { + __isset() : principal_name(false), is_group(false), is_role(false), db_name(false), table_name(false), column_name(false) {} + bool principal_name; + bool is_group; + bool is_role; + bool db_name; + bool table_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 (!(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* 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_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); + 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); + void send_create_role(const std::string& role_name, const std::string& owner_name); + bool recv_create_role(); + bool drop_role(const std::string& role_name); + void send_drop_role(const std::string& role_name); + bool recv_drop_role(); + bool add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group); + void send_add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group); + 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); + void send_remove_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group); + bool recv_remove_role_member(); + 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& 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& 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_; + virtual bool process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid); + private: + std::map processMap_; + void process_create_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_drop_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_all_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_create_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_drop_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_type_all(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_fields(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_schema(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_create_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_drop_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_all_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_get_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_alter_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_add_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_append_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_append_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + 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_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_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_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); + void process_get_config_value(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_partition_name_to_vals(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_partition_name_to_spec(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_add_index(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + void process_drop_index_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + 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_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), @@ -4577,6 +6678,23 @@ 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_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); @@ -5021,6 +7139,203 @@ } } + 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) { + 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); + } else { + ifaces_[i]->create_role(role_name, owner_name); + } + } + } + + bool drop_role(const std::string& role_name) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->drop_role(role_name); + } else { + ifaces_[i]->drop_role(role_name); + } + } + } + + bool add_role_member(const std::string& role_name, const std::string& user_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) { + return ifaces_[i]->add_role_member(role_name, user_name, is_role, is_group); + } else { + ifaces_[i]->add_role_member(role_name, user_name, is_role, is_group); + } + } + } + + bool remove_role_member(const std::string& role_name, const std::string& user_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) { + return ifaces_[i]->remove_role_member(role_name, user_name, is_role, is_group); + } else { + ifaces_[i]->remove_role_member(role_name, user_name, is_role, is_group); + } + } + } + + 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& 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, column_name); + return; + } else { + ifaces_[i]->list_security_column_grant(_return, principal_name, is_group, is_role, db_name, table_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 1030336) +++ metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp (working copy) @@ -212,6 +212,91 @@ 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) { + // Your implementation goes here + printf("create_role\n"); + } + + bool drop_role(const std::string& role_name) { + // Your implementation goes here + printf("drop_role\n"); + } + + bool add_role_member(const std::string& role_name, const std::string& user_name, const bool is_role, const bool is_group) { + // 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) { + // Your implementation goes here + printf("remove_role_member\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& 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 1030336) +++ metastore/src/gen-cpp/hive_metastore_types.cpp (working copy) @@ -261,8 +261,232 @@ 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* Role::ascii_fingerprint = "70563A0628F75DF9555F4D24690B1E26"; +const uint8_t Role::binary_fingerprint[16] = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; + +uint32_t Role::read(apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->roleName); + this->__isset.roleName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->createTime); + this->__isset.createTime = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->ownerName); + this->__isset.ownerName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Role::write(apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Role"); + xfer += oprot->writeFieldBegin("roleName", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->roleName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("createTime", apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->createTime); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ownerName", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->ownerName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Database::ascii_fingerprint = "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 +532,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 +564,11 @@ 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; @@ -380,17 +617,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 +660,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 +766,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 +834,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 +854,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 +874,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 +911,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 +940,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 +951,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 +962,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 +976,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 +1059,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 +1079,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 +1122,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 +1169,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 +1180,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 +1198,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 +1235,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 +1295,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 +1314,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 +1340,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 +1366,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 +1476,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 +1545,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 +1589,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 +1609,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 +1646,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 +1657,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 +1671,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 = "B1021C32A35A2AEFCD2F57A5424159A7"; +const uint8_t ColumnPrivilegeBag::binary_fingerprint[16] = {0xB1,0x02,0x1C,0x32,0xA3,0x5A,0x2A,0xEF,0xCD,0x2F,0x57,0xA5,0x42,0x41,0x59,0xA7}; -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 +1696,39 @@ { 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_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 +1745,36 @@ 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("columnPrivileges", apache::thrift::protocol::T_MAP, 3); + { + 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 = "5B865CFB5BA86BE2EC7F1011BA080B4B"; +const uint8_t PrivilegeBag::binary_fingerprint[16] = {0x5B,0x86,0x5C,0xFB,0x5B,0xA8,0x6B,0xE2,0xEC,0x7F,0x10,0x11,0xBA,0x08,0x0B,0x4B}; -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,14 +1796,749 @@ { 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; - default: - xfer += iprot->skip(ftype); + 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 = "B0C9970A9085D638DB56EBFF4947E517"; +const uint8_t SecurityColumn::binary_fingerprint[16] = {0xB0,0xC9,0x97,0x0A,0x90,0x85,0xD6,0x38,0xDB,0x56,0xEB,0xFF,0x49,0x47,0xE5,0x17}; + +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_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("column", apache::thrift::protocol::T_STRING, 8); + 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); + } + break; + default: + xfer += iprot->skip(ftype); break; } xfer += iprot->readFieldEnd(); Index: metastore/src/gen-cpp/hive_metastore_types.h =================================================================== --- metastore/src/gen-cpp/hive_metastore_types.h (revision 1030336) +++ metastore/src/gen-cpp/hive_metastore_types.h (working copy) @@ -150,11 +150,97 @@ }; +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 Role { + public: + + static const char* ascii_fingerprint; // = "70563A0628F75DF9555F4D24690B1E26"; + static const uint8_t binary_fingerprint[16]; // = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; + + Role() : roleName(""), createTime(0), ownerName("") { + } + + virtual ~Role() throw() {} + + std::string roleName; + int32_t createTime; + std::string ownerName; + + struct __isset { + __isset() : roleName(false), createTime(false), ownerName(false) {} + bool roleName; + bool createTime; + bool ownerName; + } __isset; + + bool operator == (const Role & rhs) const + { + if (!(roleName == rhs.roleName)) + return false; + if (!(createTime == rhs.createTime)) + return false; + if (!(ownerName == rhs.ownerName)) + return false; + return true; + } + bool operator != (const Role &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Role & ) const; + + uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + +}; + 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 +250,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 +268,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 { @@ -349,8 +441,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 +461,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 +477,7 @@ bool viewOriginalText; bool viewExpandedText; bool tableType; + bool privileges; } __isset; bool operator == (const Table & rhs) const @@ -412,6 +506,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 +526,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 +541,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 +552,7 @@ bool lastAccessTime; bool sd; bool parameters; + bool privileges; } __isset; bool operator == (const Partition & rhs) const @@ -471,6 +571,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 +698,340 @@ }; +class ColumnPrivilegeBag { + public: + + static const char* ascii_fingerprint; // = "B1021C32A35A2AEFCD2F57A5424159A7"; + static const uint8_t binary_fingerprint[16]; // = {0xB1,0x02,0x1C,0x32,0xA3,0x5A,0x2A,0xEF,0xCD,0x2F,0x57,0xA5,0x42,0x41,0x59,0xA7}; + + ColumnPrivilegeBag() : dbName(""), tableName("") { + } + + virtual ~ColumnPrivilegeBag() throw() {} + + std::string dbName; + std::string tableName; + std::map columnPrivileges; + + struct __isset { + __isset() : dbName(false), tableName(false), columnPrivileges(false) {} + bool dbName; + bool tableName; + bool columnPrivileges; + } __isset; + + bool operator == (const ColumnPrivilegeBag & rhs) const + { + if (!(dbName == rhs.dbName)) + return false; + if (!(tableName == rhs.tableName)) + 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; // = "5B865CFB5BA86BE2EC7F1011BA080B4B"; + static const uint8_t binary_fingerprint[16]; // = {0x5B,0x86,0x5C,0xFB,0x5B,0xA8,0x6B,0xE2,0xEC,0x7F,0x10,0x11,0xBA,0x08,0x0B,0x4B}; + + 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; // = "B0C9970A9085D638DB56EBFF4947E517"; + static const uint8_t binary_fingerprint[16]; // = {0xB0,0xC9,0x97,0x0A,0x90,0x85,0xD6,0x38,0xDB,0x56,0xEB,0xFF,0x49,0x47,0xE5,0x17}; + + 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; + std::string column; + + struct __isset { + __isset() : principalName(false), isRole(false), isGroup(false), privileges(false), createTime(false), grantor(false), table(false), column(false) {} + bool principalName; + bool isRole; + bool isGroup; + bool privileges; + bool createTime; + bool grantor; + bool table; + 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 (!(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,393 @@ +/** + * 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 COLUMN_PRIVILEGES_FIELD_DESC = new TField("columnPrivileges", TType.MAP, (short)3); + + private String dbName; + public static final int DBNAME = 1; + private String tableName; + public static final int TABLENAME = 2; + private Map columnPrivileges; + public static final int COLUMNPRIVILEGES = 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(TABLENAME, new FieldMetaData("tableName", 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, + Map columnPrivileges) + { + this(); + this.dbName = dbName; + this.tableName = tableName; + 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.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 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 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 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 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_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 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.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("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 1030336) +++ 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 1030336) +++ 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 1030336) +++ 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/PrivilegeSet.java =================================================================== --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeSet.java (revision 0) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/PrivilegeSet.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 PrivilegeSet implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("PrivilegeSet"); + private static final TField USER_PRIVILEGES_FIELD_DESC = new TField("user_privileges", TType.MAP, (short)1); + private static final TField GROUP_PRIVILEGES_FIELD_DESC = new TField("group_privileges", TType.MAP, (short)2); + private static final TField ROLE_PRIVILEGES_FIELD_DESC = new TField("role_privileges", TType.MAP, (short)3); + + private Map user_privileges; + public static final int USER_PRIVILEGES = 1; + private Map group_privileges; + public static final int GROUP_PRIVILEGES = 2; + private Map role_privileges; + public static final int ROLE_PRIVILEGES = 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(USER_PRIVILEGES, new FieldMetaData("user_privileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + put(GROUP_PRIVILEGES, new FieldMetaData("group_privileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + put(ROLE_PRIVILEGES, new FieldMetaData("role_privileges", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + }}); + + static { + FieldMetaData.addStructMetaDataMap(PrivilegeSet.class, metaDataMap); + } + + public PrivilegeSet() { + } + + public PrivilegeSet( + Map user_privileges, + Map group_privileges, + Map role_privileges) + { + this(); + this.user_privileges = user_privileges; + this.group_privileges = group_privileges; + this.role_privileges = role_privileges; + } + + /** + * Performs a deep copy on other. + */ + public PrivilegeSet(PrivilegeSet other) { + if (other.isSetUser_privileges()) { + Map __this__user_privileges = new HashMap(); + for (Map.Entry other_element : other.user_privileges.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__user_privileges_copy_key = other_element_key; + + String __this__user_privileges_copy_value = other_element_value; + + __this__user_privileges.put(__this__user_privileges_copy_key, __this__user_privileges_copy_value); + } + this.user_privileges = __this__user_privileges; + } + if (other.isSetGroup_privileges()) { + Map __this__group_privileges = new HashMap(); + for (Map.Entry other_element : other.group_privileges.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__group_privileges_copy_key = other_element_key; + + String __this__group_privileges_copy_value = other_element_value; + + __this__group_privileges.put(__this__group_privileges_copy_key, __this__group_privileges_copy_value); + } + this.group_privileges = __this__group_privileges; + } + if (other.isSetRole_privileges()) { + Map __this__role_privileges = new HashMap(); + for (Map.Entry other_element : other.role_privileges.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__role_privileges_copy_key = other_element_key; + + String __this__role_privileges_copy_value = other_element_value; + + __this__role_privileges.put(__this__role_privileges_copy_key, __this__role_privileges_copy_value); + } + this.role_privileges = __this__role_privileges; + } + } + + @Override + public PrivilegeSet clone() { + return new PrivilegeSet(this); + } + + public int getUser_privilegesSize() { + return (this.user_privileges == null) ? 0 : this.user_privileges.size(); + } + + public void putToUser_privileges(String key, String val) { + if (this.user_privileges == null) { + this.user_privileges = new HashMap(); + } + this.user_privileges.put(key, val); + } + + public Map getUser_privileges() { + return this.user_privileges; + } + + public void setUser_privileges(Map user_privileges) { + this.user_privileges = user_privileges; + } + + public void unsetUser_privileges() { + this.user_privileges = null; + } + + // Returns true if field user_privileges is set (has been asigned a value) and false otherwise + public boolean isSetUser_privileges() { + return this.user_privileges != null; + } + + public int getGroup_privilegesSize() { + return (this.group_privileges == null) ? 0 : this.group_privileges.size(); + } + + public void putToGroup_privileges(String key, String val) { + if (this.group_privileges == null) { + this.group_privileges = new HashMap(); + } + this.group_privileges.put(key, val); + } + + public Map getGroup_privileges() { + return this.group_privileges; + } + + public void setGroup_privileges(Map group_privileges) { + this.group_privileges = group_privileges; + } + + public void unsetGroup_privileges() { + this.group_privileges = null; + } + + // Returns true if field group_privileges is set (has been asigned a value) and false otherwise + public boolean isSetGroup_privileges() { + return this.group_privileges != null; + } + + public int getRole_privilegesSize() { + return (this.role_privileges == null) ? 0 : this.role_privileges.size(); + } + + public void putToRole_privileges(String key, String val) { + if (this.role_privileges == null) { + this.role_privileges = new HashMap(); + } + this.role_privileges.put(key, val); + } + + public Map getRole_privileges() { + return this.role_privileges; + } + + public void setRole_privileges(Map role_privileges) { + this.role_privileges = role_privileges; + } + + public void unsetRole_privileges() { + this.role_privileges = null; + } + + // Returns true if field role_privileges is set (has been asigned a value) and false otherwise + public boolean isSetRole_privileges() { + return this.role_privileges != null; + } + + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + case USER_PRIVILEGES: + if (value == null) { + unsetUser_privileges(); + } else { + setUser_privileges((Map)value); + } + break; + + case GROUP_PRIVILEGES: + if (value == null) { + unsetGroup_privileges(); + } else { + setGroup_privileges((Map)value); + } + break; + + case ROLE_PRIVILEGES: + if (value == null) { + unsetRole_privileges(); + } else { + setRole_privileges((Map)value); + } + break; + + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + public Object getFieldValue(int fieldID) { + switch (fieldID) { + case USER_PRIVILEGES: + return getUser_privileges(); + + case GROUP_PRIVILEGES: + return getGroup_privileges(); + + case ROLE_PRIVILEGES: + return getRole_privileges(); + + 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 USER_PRIVILEGES: + return isSetUser_privileges(); + case GROUP_PRIVILEGES: + return isSetGroup_privileges(); + case ROLE_PRIVILEGES: + return isSetRole_privileges(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof PrivilegeSet) + return this.equals((PrivilegeSet)that); + return false; + } + + public boolean equals(PrivilegeSet that) { + if (that == null) + return false; + + boolean this_present_user_privileges = true && this.isSetUser_privileges(); + boolean that_present_user_privileges = true && that.isSetUser_privileges(); + if (this_present_user_privileges || that_present_user_privileges) { + if (!(this_present_user_privileges && that_present_user_privileges)) + return false; + if (!this.user_privileges.equals(that.user_privileges)) + return false; + } + + boolean this_present_group_privileges = true && this.isSetGroup_privileges(); + boolean that_present_group_privileges = true && that.isSetGroup_privileges(); + if (this_present_group_privileges || that_present_group_privileges) { + if (!(this_present_group_privileges && that_present_group_privileges)) + return false; + if (!this.group_privileges.equals(that.group_privileges)) + return false; + } + + boolean this_present_role_privileges = true && this.isSetRole_privileges(); + boolean that_present_role_privileges = true && that.isSetRole_privileges(); + if (this_present_role_privileges || that_present_role_privileges) { + if (!(this_present_role_privileges && that_present_role_privileges)) + return false; + if (!this.role_privileges.equals(that.role_privileges)) + 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 USER_PRIVILEGES: + if (field.type == TType.MAP) { + { + TMap _map4 = iprot.readMapBegin(); + this.user_privileges = new HashMap(2*_map4.size); + for (int _i5 = 0; _i5 < _map4.size; ++_i5) + { + String _key6; + String _val7; + _key6 = iprot.readString(); + _val7 = iprot.readString(); + this.user_privileges.put(_key6, _val7); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case GROUP_PRIVILEGES: + if (field.type == TType.MAP) { + { + TMap _map8 = iprot.readMapBegin(); + this.group_privileges = new HashMap(2*_map8.size); + for (int _i9 = 0; _i9 < _map8.size; ++_i9) + { + String _key10; + String _val11; + _key10 = iprot.readString(); + _val11 = iprot.readString(); + this.group_privileges.put(_key10, _val11); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case ROLE_PRIVILEGES: + if (field.type == TType.MAP) { + { + TMap _map12 = iprot.readMapBegin(); + this.role_privileges = new HashMap(2*_map12.size); + for (int _i13 = 0; _i13 < _map12.size; ++_i13) + { + String _key14; + String _val15; + _key14 = iprot.readString(); + _val15 = iprot.readString(); + this.role_privileges.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.user_privileges != null) { + oprot.writeFieldBegin(USER_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.user_privileges.size())); + for (Map.Entry _iter16 : this.user_privileges.entrySet()) { + oprot.writeString(_iter16.getKey()); + oprot.writeString(_iter16.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.group_privileges != null) { + oprot.writeFieldBegin(GROUP_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.group_privileges.size())); + for (Map.Entry _iter17 : this.group_privileges.entrySet()) { + oprot.writeString(_iter17.getKey()); + oprot.writeString(_iter17.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (this.role_privileges != null) { + oprot.writeFieldBegin(ROLE_PRIVILEGES_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.role_privileges.size())); + for (Map.Entry _iter18 : this.role_privileges.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("PrivilegeSet("); + boolean first = true; + + sb.append("user_privileges:"); + if (this.user_privileges == null) { + sb.append("null"); + } else { + sb.append(this.user_privileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_privileges:"); + if (this.group_privileges == null) { + sb.append("null"); + } else { + sb.append(this.group_privileges); + } + first = false; + if (!first) sb.append(", "); + sb.append("role_privileges:"); + if (this.role_privileges == null) { + sb.append("null"); + } else { + sb.append(this.role_privileges); + } + 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,346 @@ +/** + * 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 CREATE_TIME_FIELD_DESC = new TField("createTime", TType.I32, (short)2); + private static final TField OWNER_NAME_FIELD_DESC = new TField("ownerName", TType.STRING, (short)3); + + private String roleName; + public static final int ROLENAME = 1; + private int createTime; + public static final int CREATETIME = 2; + private String ownerName; + public static final int OWNERNAME = 3; + + 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(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, + int createTime, + String ownerName) + { + this(); + this.roleName = roleName; + 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; + } + __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 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 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 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 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_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 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(); + } + oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC); + oprot.writeI32(this.createTime); + oprot.writeFieldEnd(); + if (this.ownerName != null) { + oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); + oprot.writeString(this.ownerName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Role("); + boolean first = true; + + sb.append("roleName:"); + if (this.roleName == null) { + sb.append("null"); + } else { + sb.append(this.roleName); + } + first = false; + if (!first) sb.append(", "); + sb.append("createTime:"); + sb.append(this.createTime); + first = false; + if (!first) sb.append(", "); + sb.append("ownerName:"); + if (this.ownerName == null) { + sb.append("null"); + } else { + sb.append(this.ownerName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + // 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 1030336) +++ 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,686 @@ +/** + * 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 COLUMN_FIELD_DESC = new TField("column", TType.STRING, (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 String column; + public static final int COLUMN = 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(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, + 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.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.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 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 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 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 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_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 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.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("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 1030336) +++ 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 1030336) +++ 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 1030336) +++ 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 1030336) +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (working copy) @@ -101,6 +101,40 @@ 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) throws MetaException, TException; + + public boolean drop_role(String role_name) throws MetaException, TException; + + public boolean add_role_member(String role_name, String user_name, boolean is_role, boolean is_group) throws MetaException, TException; + + public boolean remove_role_member(String role_name, String user_name, boolean is_role, boolean is_group) throws MetaException, TException; + + public List list_security_user_grant(String principal_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 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 { @@ -1623,1286 +1657,12559 @@ 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("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"); } - 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; - } - oprot.writeMessageBegin(new TMessage("create_database", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + 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(); } - 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 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"); } - 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(); - } + 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) throws MetaException, TException + { + send_create_role(role_name, owner_name); + return recv_create_role(); + } + + public void send_create_role(String role_name, String owner_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.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) throws MetaException, TException + { + send_drop_role(role_name); + return recv_drop_role(); + } + + public void send_drop_role(String role_name) throws TException + { + oprot_.writeMessageBegin(new TMessage("drop_role", TMessageType.CALL, seqid_)); + drop_role_args args = new drop_role_args(); + args.role_name = role_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) throws MetaException, TException + { + send_add_role_member(role_name, user_name, is_role, is_group); + return recv_add_role_member(); + } + + public void send_add_role_member(String role_name, String user_name, boolean is_role, boolean is_group) 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.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) throws MetaException, TException + { + send_remove_role_member(role_name, user_name, is_role, is_group); + return recv_remove_role_member(); + } + + public void send_remove_role_member(String role_name, String user_name, boolean is_role, boolean is_group) 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.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_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 column_name) throws MetaException, TException + { + send_list_security_column_grant(principal_name, is_group, is_role, db_name, table_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 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.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_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("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_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; + } + 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; + 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_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_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_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 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); + 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); + 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); + 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); + 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_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.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; } - oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + 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(); } - 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 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(); } - 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(); + @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 } - 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 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 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 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 { } - 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 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); } - 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 add_partition_args() { + } + public add_partition_args( + Partition new_part) + { + this(); + this.new_part = new_part; } - 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(); + /** + * 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); } - 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(); - } + public Partition getNew_part() { + return this.new_part; + } + public void setNew_part(Partition new_part) { + this.new_part = new_part; } - 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; + 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); } - oprot.writeMessageBegin(new TMessage("drop_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 NEW_PART: + return getNew_part(); + default: + throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + } } - 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(); + // 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; } - 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(); + 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; } - private class get_table 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_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; + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; } - oprot.writeMessageBegin(new TMessage("get_table", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + 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(); } - 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(); + 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(); } - 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(); + @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 } - 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 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 { } - 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 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); } - 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(); - } + 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; } - 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(); + /** + * 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); } - 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 Partition getSuccess() { + return this.success; + } + public void setSuccess(Partition success) { + this.success = success; } - 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 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; } - 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 InvalidObjectException getO1() { + return this.o1; + } + public void setO1(InvalidObjectException o1) { + this.o1 = o1; } - 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 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_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 AlreadyExistsException getO2() { + return this.o2; + } + public void setO2(AlreadyExistsException o2) { + this.o2 = o2; } - 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 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_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(); - } + public MetaException getO3() { + return this.o3; + } + public void setO3(MetaException o3) { + this.o3 = o3; } - 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(); - } + 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; } - 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; + 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); } - oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - } + break; - } + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((AlreadyExistsException)value); + } + break; - 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; + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); } - oprot.writeMessageBegin(new TMessage("partition_name_to_vals", 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 getSuccess(); + + case O1: + return getO1(); + + case O2: + return getO2(); + + case O3: + return getO3(); + 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 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; } - 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(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; + } - 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(); + 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; } - private class get_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) { - 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; + 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; } - oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + iprot.readFieldEnd(); } + iprot.readStructEnd(); + 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.writeMessageBegin(new TMessage("get_indexes", 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); + 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(); } - 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("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 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 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 Database database; - public static final int DATABASE = 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 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(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(create_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(append_partition_args.class, metaDataMap); } - public create_database_args() { + public append_partition_args() { } - public create_database_args( - Database database) + public append_partition_args( + String db_name, + String tbl_name, + List part_vals) { this(); - this.database = database; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; } /** * Performs a deep copy on other. */ - public create_database_args(create_database_args other) { - if (other.isSetDatabase()) { - this.database = new Database(other.database); + 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 create_database_args clone() { - return new create_database_args(this); + public append_partition_args clone() { + return new append_partition_args(this); } - public Database getDatabase() { - return this.database; + public String getDb_name() { + return this.db_name; } - public void setDatabase(Database database) { - this.database = database; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetDatabase() { - this.database = 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); + } + + 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 database is set (has been asigned a value) and false otherwise - public boolean isSetDatabase() { - return this.database != 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 DATABASE: + case DB_NAME: if (value == null) { - unsetDatabase(); + unsetDb_name(); } else { - setDatabase((Database)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; @@ -2913,8 +14220,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DATABASE: - return getDatabase(); + 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!"); @@ -2924,8 +14237,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 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!"); } @@ -2935,21 +14252,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 append_partition_args) + return this.equals((append_partition_args)that); return false; } - public boolean equals(create_database_args that) { + public boolean equals(append_partition_args that) { if (that == null) return false; - boolean this_present_database = true && this.isSetDatabase(); - boolean that_present_database = true && that.isSetDatabase(); - if (this_present_database || that_present_database) { - if (!(this_present_database && that_present_database)) + boolean this_present_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.database.equals(that.database)) + 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; } @@ -2972,10 +14307,33 @@ } switch (field.id) { - case DATABASE: - if (field.type == TType.STRUCT) { - this.database = new Database(); - this.database.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 _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); } @@ -2995,9 +14353,25 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.database != null) { - oprot.writeFieldBegin(DATABASE_FIELD_DESC); - this.database.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 _iter129 : this.part_vals) { + oprot.writeString(_iter129); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -3006,14 +14380,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_database_args("); + StringBuilder sb = new StringBuilder("append_partition_args("); boolean first = true; - sb.append("database:"); - if (this.database == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.database); + 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(")"); @@ -3027,15 +14417,18 @@ } - public static class create_database_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("create_database_result"); + public static class 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 AlreadyExistsException o1; + private Partition success; + public static final int SUCCESS = 0; + private InvalidObjectException o1; public static final int O1 = 1; - private InvalidObjectException o2; + private AlreadyExistsException o2; public static final int O2 = 2; private MetaException o3; public static final int O3 = 3; @@ -3045,6 +14438,8 @@ } 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, @@ -3054,18 +14449,20 @@ }}); static { - FieldMetaData.addStructMetaDataMap(create_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(append_partition_result.class, metaDataMap); } - public create_database_result() { + public append_partition_result() { } - public create_database_result( - AlreadyExistsException o1, - InvalidObjectException o2, + 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; @@ -3074,12 +14471,15 @@ /** * Performs a deep copy on other. */ - public create_database_result(create_database_result other) { + public append_partition_result(append_partition_result other) { + if (other.isSetSuccess()) { + this.success = new Partition(other.success); + } if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); + this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); + this.o2 = new AlreadyExistsException(other.o2); } if (other.isSetO3()) { this.o3 = new MetaException(other.o3); @@ -3087,15 +14487,32 @@ } @Override - public create_database_result clone() { - return new create_database_result(this); + public append_partition_result clone() { + return new append_partition_result(this); } - public AlreadyExistsException getO1() { + public Partition getSuccess() { + return this.success; + } + + public void setSuccess(Partition success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.success != null; + } + + public InvalidObjectException getO1() { return this.o1; } - public void setO1(AlreadyExistsException o1) { + public void setO1(InvalidObjectException o1) { this.o1 = o1; } @@ -3108,11 +14525,11 @@ return this.o1 != null; } - public InvalidObjectException getO2() { + public AlreadyExistsException getO2() { return this.o2; } - public void setO2(InvalidObjectException o2) { + public void setO2(AlreadyExistsException o2) { this.o2 = o2; } @@ -3144,11 +14561,19 @@ 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((AlreadyExistsException)value); + setO1((InvalidObjectException)value); } break; @@ -3156,7 +14581,7 @@ if (value == null) { unsetO2(); } else { - setO2((InvalidObjectException)value); + setO2((AlreadyExistsException)value); } break; @@ -3175,6 +14600,9 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { + case SUCCESS: + return getSuccess(); + case O1: return getO1(); @@ -3192,6 +14620,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: @@ -3207,15 +14637,24 @@ 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 append_partition_result) + return this.equals((append_partition_result)that); return false; } - public boolean equals(create_database_result that) { + 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) { @@ -3262,9 +14701,17 @@ } 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 AlreadyExistsException(); + this.o1 = new InvalidObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -3272,7 +14719,7 @@ break; case O2: if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); + this.o2 = new AlreadyExistsException(); this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -3300,7 +14747,11 @@ public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); - if (this.isSetO1()) { + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + this.success.write(oprot); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); @@ -3319,9 +14770,17 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_database_result("); + 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"); @@ -3356,74 +14815,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 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 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 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(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_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(get_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(append_partition_by_name_args.class, metaDataMap); } - public get_database_args() { + public append_partition_by_name_args() { } - public get_database_args( - String name) + public append_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) { this(); - this.name = name; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public get_database_args(get_database_args other) { - if (other.isSetName()) { - this.name = other.name; + 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 get_database_args clone() { - return new get_database_args(this); + public append_partition_by_name_args clone() { + return new append_partition_by_name_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 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 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_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); } break; @@ -3434,8 +14963,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 PART_NAME: + return getPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -3445,8 +14980,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 PART_NAME: + return isSetPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -3456,21 +14995,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 append_partition_by_name_args) + return this.equals((append_partition_by_name_args)that); return false; } - public boolean equals(get_database_args that) { + public boolean equals(append_partition_by_name_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_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; } @@ -3493,9 +15050,23 @@ } 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_NAME: + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -3515,9 +15086,19 @@ 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_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -3526,14 +15107,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_database_args("); + StringBuilder sb = new StringBuilder("append_partition_by_name_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.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.name); + sb.append(this.part_name); } first = false; sb.append(")"); @@ -3547,18 +15144,21 @@ } - public static class get_database_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_database_result"); + public static class 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 Database success; + private Partition success; public static final int SUCCESS = 0; - private NoSuchObjectException o1; + private InvalidObjectException o1; public static final int O1 = 1; - private MetaException o2; + 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 { @@ -3566,56 +15166,63 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Database.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_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); } - public get_database_result() { + public append_partition_by_name_result() { } - public get_database_result( - Database success, - NoSuchObjectException o1, - MetaException o2) + 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 get_database_result(get_database_result other) { + public append_partition_by_name_result(append_partition_by_name_result other) { if (other.isSetSuccess()) { - this.success = new Database(other.success); + this.success = new Partition(other.success); } if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + this.o1 = new InvalidObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); } } @Override - public get_database_result clone() { - return new get_database_result(this); + public append_partition_by_name_result clone() { + return new append_partition_by_name_result(this); } - public Database getSuccess() { + public Partition getSuccess() { return this.success; } - public void setSuccess(Database success) { + public void setSuccess(Partition success) { this.success = success; } @@ -3628,11 +15235,11 @@ return this.success != null; } - public NoSuchObjectException getO1() { + public InvalidObjectException getO1() { return this.o1; } - public void setO1(NoSuchObjectException o1) { + public void setO1(InvalidObjectException o1) { this.o1 = o1; } @@ -3645,11 +15252,11 @@ return this.o1 != null; } - public MetaException getO2() { + public AlreadyExistsException getO2() { return this.o2; } - public void setO2(MetaException o2) { + public void setO2(AlreadyExistsException o2) { this.o2 = o2; } @@ -3662,13 +15269,30 @@ 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((Database)value); + setSuccess((Partition)value); } break; @@ -3676,7 +15300,7 @@ if (value == null) { unsetO1(); } else { - setO1((NoSuchObjectException)value); + setO1((InvalidObjectException)value); } break; @@ -3684,7 +15308,15 @@ if (value == null) { unsetO2(); } else { - setO2((MetaException)value); + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); } break; @@ -3704,6 +15336,9 @@ case O2: return getO2(); + case O3: + return getO3(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -3718,6 +15353,8 @@ return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -3727,12 +15364,12 @@ 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 append_partition_by_name_result) + return this.equals((append_partition_by_name_result)that); return false; } - public boolean equals(get_database_result that) { + public boolean equals(append_partition_by_name_result that) { if (that == null) return false; @@ -3763,6 +15400,15 @@ return false; } + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + return true; } @@ -3784,7 +15430,7 @@ { case SUCCESS: if (field.type == TType.STRUCT) { - this.success = new Database(); + this.success = new Partition(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -3792,7 +15438,7 @@ break; case O1: if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); + this.o1 = new InvalidObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -3800,12 +15446,20 @@ break; case O2: if (field.type == TType.STRUCT) { - this.o2 = new MetaException(); + this.o2 = new AlreadyExistsException(); this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; + case 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; @@ -3832,6 +15486,10 @@ oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -3839,7 +15497,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_database_result("); + StringBuilder sb = new StringBuilder("append_partition_by_name_result("); boolean first = true; sb.append("success:"); @@ -3865,6 +15523,14 @@ sb.append(this.o2); } first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; sb.append(")"); return sb.toString(); } @@ -3876,15 +15542,21 @@ } - 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 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 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 boolean deleteData; - public static final int DELETEDATA = 2; + public static final int DELETEDATA = 4; private final Isset __isset = new Isset(); private static final class Isset implements java.io.Serializable { @@ -3892,25 +15564,34 @@ } 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(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_database_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_partition_args.class, metaDataMap); } - public drop_database_args() { + public drop_partition_args() { } - public drop_database_args( - String name, + public drop_partition_args( + String db_name, + String tbl_name, + List part_vals, boolean deleteData) { this(); - this.name = name; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; this.deleteData = deleteData; this.__isset.deleteData = true; } @@ -3918,34 +15599,93 @@ /** * Performs a deep copy on other. */ - public drop_database_args(drop_database_args other) { - if (other.isSetName()) { - this.name = other.name; + 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_database_args clone() { - return new drop_database_args(this); + public drop_partition_args clone() { + return new drop_partition_args(this); } - public String getName() { - return this.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 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 setName(String name) { - this.name = name; + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; } - public void unsetName() { - this.name = null; + public void unsetPart_vals() { + this.part_vals = 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 part_vals is set (has been asigned a value) and false otherwise + public boolean isSetPart_vals() { + return this.part_vals != null; } public boolean isDeleteData() { @@ -3968,11 +15708,27 @@ 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; @@ -3991,8 +15747,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 PART_VALS: + return getPart_vals(); case DELETEDATA: return new Boolean(isDeleteData()); @@ -4005,8 +15767,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 PART_VALS: + return isSetPart_vals(); case DELETEDATA: return isSetDeleteData(); default: @@ -4018,21 +15784,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 drop_partition_args) + return this.equals((drop_partition_args)that); return false; } - public boolean equals(drop_database_args that) { + public boolean equals(drop_partition_args that) { if (that == null) return false; - boolean this_present_name = true && this.isSetName(); - boolean that_present_name = true && that.isSetName(); - if (this_present_name || that_present_name) { - if (!(this_present_name && that_present_name)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.name.equals(that.name)) + if (!this.db_name.equals(that.db_name)) + return false; + } + + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) + return false; + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_vals = true && this.isSetPart_vals(); + boolean that_present_part_vals = true && that.isSetPart_vals(); + if (this_present_part_vals || that_present_part_vals) { + if (!(this_present_part_vals && that_present_part_vals)) + return false; + if (!this.part_vals.equals(that.part_vals)) return false; } @@ -4064,9 +15848,33 @@ } 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 _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); } @@ -4094,9 +15902,25 @@ 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 _iter133 : this.part_vals) { + oprot.writeString(_iter133); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); @@ -4108,14 +15932,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_database_args("); + StringBuilder sb = new StringBuilder("drop_partition_args("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_vals:"); + if (this.part_vals == null) { + sb.append("null"); + } else { + sb.append(this.part_vals); } first = false; if (!first) sb.append(", "); @@ -4133,68 +15973,87 @@ } - public static class drop_database_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_database_result"); + public static class 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 static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); + private boolean success; + public static final int SUCCESS = 0; private NoSuchObjectException o1; public static final int O1 = 1; - private InvalidOperationException 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 { + 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(drop_database_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_partition_result.class, metaDataMap); } - public drop_database_result() { + public drop_partition_result() { } - public drop_database_result( + public drop_partition_result( + boolean success, NoSuchObjectException o1, - InvalidOperationException o2, - MetaException o3) + MetaException o2) { this(); + this.success = success; + this.__isset.success = true; this.o1 = o1; this.o2 = o2; - this.o3 = o3; } /** * Performs a deep copy on other. */ - public drop_database_result(drop_database_result 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 InvalidOperationException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + this.o2 = new MetaException(other.o2); } } @Override - public drop_database_result clone() { - return new drop_database_result(this); + 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() { @@ -4214,11 +16073,11 @@ return this.o1 != null; } - public InvalidOperationException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(InvalidOperationException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -4231,46 +16090,29 @@ 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: + case SUCCESS: if (value == null) { - unsetO1(); + unsetSuccess(); } else { - setO1((NoSuchObjectException)value); + setSuccess((Boolean)value); } break; - case O2: + case O1: if (value == null) { - unsetO2(); + unsetO1(); } else { - setO2((InvalidOperationException)value); + setO1((NoSuchObjectException)value); } break; - case O3: + case O2: if (value == null) { - unsetO3(); + unsetO2(); } else { - setO3((MetaException)value); + setO2((MetaException)value); } break; @@ -4281,15 +16123,15 @@ 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!"); } @@ -4298,12 +16140,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 O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -4313,15 +16155,24 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_database_result) - return this.equals((drop_database_result)that); + if (that instanceof drop_partition_result) + return this.equals((drop_partition_result)that); return false; } - public boolean equals(drop_database_result that) { + 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) { @@ -4340,15 +16191,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; } @@ -4368,6 +16210,14 @@ } 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(); @@ -4378,20 +16228,12 @@ break; case O2: if (field.type == TType.STRUCT) { - this.o2 = new InvalidOperationException(); + 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; @@ -4406,7 +16248,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(); @@ -4414,10 +16260,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(); @@ -4425,9 +16267,13 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_database_result("); + 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"); @@ -4443,14 +16289,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(); } @@ -4462,74 +16300,181 @@ } - 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 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 pattern; - public static final int PATTERN = 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 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(PATTERN, new FieldMetaData("pattern", 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_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(get_databases_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_partition_by_name_args.class, metaDataMap); } - public get_databases_args() { + public drop_partition_by_name_args() { } - public get_databases_args( - String pattern) + public drop_partition_by_name_args( + String db_name, + String tbl_name, + String part_name, + boolean deleteData) { this(); - this.pattern = pattern; + 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 get_databases_args(get_databases_args other) { - if (other.isSetPattern()) { - this.pattern = other.pattern; + 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 get_databases_args clone() { - return new get_databases_args(this); + public drop_partition_by_name_args clone() { + return new drop_partition_by_name_args(this); } - public String getPattern() { - return this.pattern; + public String getDb_name() { + return this.db_name; } - public void setPattern(String pattern) { - this.pattern = pattern; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetPattern() { - this.pattern = null; + public void unsetDb_name() { + this.db_name = null; } - // Returns true if field pattern is set (has been asigned a value) and false otherwise - public boolean isSetPattern() { - return this.pattern != null; + // Returns true if field db_name is set (has been asigned a value) and false otherwise + public boolean isSetDb_name() { + return this.db_name != null; + } + + public 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 PATTERN: + case DB_NAME: if (value == null) { - unsetPattern(); + unsetDb_name(); } else { - setPattern((String)value); + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); + } + break; + + case DELETEDATA: + if (value == null) { + unsetDeleteData(); + } else { + setDeleteData((Boolean)value); } break; @@ -4540,8 +16485,17 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case PATTERN: - return getPattern(); + 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!"); @@ -4551,8 +16505,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 PATTERN: - return isSetPattern(); + 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!"); } @@ -4562,21 +16522,48 @@ 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 drop_partition_by_name_args) + return this.equals((drop_partition_by_name_args)that); return false; } - public boolean equals(get_databases_args that) { + public boolean equals(drop_partition_by_name_args that) { if (that == null) return false; - boolean this_present_pattern = true && this.isSetPattern(); - boolean that_present_pattern = true && that.isSetPattern(); - if (this_present_pattern || that_present_pattern) { - if (!(this_present_pattern && that_present_pattern)) + boolean this_present_db_name = true && this.isSetDb_name(); + boolean that_present_db_name = true && that.isSetDb_name(); + if (this_present_db_name || that_present_db_name) { + if (!(this_present_db_name && that_present_db_name)) return false; - if (!this.pattern.equals(that.pattern)) + if (!this.db_name.equals(that.db_name)) + return false; + } + + 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; } @@ -4599,9 +16586,31 @@ } switch (field.id) { - case PATTERN: + case DB_NAME: if (field.type == TType.STRING) { - this.pattern = 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_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); } @@ -4621,27 +16630,60 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.pattern != null) { - oprot.writeFieldBegin(PATTERN_FIELD_DESC); - oprot.writeString(this.pattern); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } + oprot.writeFieldBegin(DELETE_DATA_FIELD_DESC); + oprot.writeBool(this.deleteData); + oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_databases_args("); + StringBuilder sb = new StringBuilder("drop_partition_by_name_args("); boolean first = true; - sb.append("pattern:"); - if (this.pattern == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.pattern); + sb.append(this.db_name); + } + first = false; + 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(); } @@ -4653,102 +16695,94 @@ } - 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); + 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 List success; + private boolean 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 { + 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))); + put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(drop_partition_by_name_result.class, metaDataMap); } - public get_databases_result() { + public drop_partition_by_name_result() { } - public get_databases_result( - List success, - MetaException o1) + 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; } /** * 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 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 MetaException(other.o1); + this.o1 = new NoSuchObjectException(other.o1); + } + if (other.isSetO2()) { + this.o2 = new MetaException(other.o2); } } @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 drop_partition_by_name_result clone() { + return new drop_partition_by_name_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() { + public NoSuchObjectException getO1() { return this.o1; } - public void setO1(MetaException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -4761,13 +16795,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((Boolean)value); } break; @@ -4775,7 +16826,15 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((NoSuchObjectException)value); + } + break; + + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((MetaException)value); } break; @@ -4787,11 +16846,14 @@ 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!"); } @@ -4804,6 +16866,8 @@ return isSetSuccess(); case O1: return isSetO1(); + case O2: + return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -4813,21 +16877,21 @@ 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 drop_partition_by_name_result) + return this.equals((drop_partition_by_name_result)that); return false; } - public boolean equals(get_databases_result that) { + public boolean equals(drop_partition_by_name_result that) { if (that == null) return false; - boolean this_present_success = true && this.isSetSuccess(); - boolean that_present_success = true && that.isSetSuccess(); + boolean this_present_success = true; + boolean that_present_success = true; if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; - if (!this.success.equals(that.success)) + if (this.success != that.success) return false; } @@ -4840,6 +16904,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; } @@ -4860,30 +16933,29 @@ 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(); - } + 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 = 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; @@ -4900,18 +16972,16 @@ 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.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(); @@ -4919,15 +16989,11 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_databases_result("); + StringBuilder sb = new StringBuilder("drop_partition_by_name_result("); boolean first = true; sb.append("success:"); - if (this.success == null) { - sb.append("null"); - } else { - sb.append(this.success); - } + sb.append(this.success); first = false; if (!first) sb.append(", "); sb.append("o1:"); @@ -4937,6 +17003,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(); } @@ -4948,32 +17022,167 @@ } - public static class get_all_databases_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_all_databases_args"); + public static class get_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 { + } 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_all_databases_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); } - public get_all_databases_args() { + 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; } /** * Performs a deep copy on other. */ - public get_all_databases_args(get_all_databases_args other) { + public get_partition_args(get_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; + } } @Override - public get_all_databases_args clone() { - return new get_all_databases_args(this); + public get_partition_args clone() { + return new get_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!"); } @@ -4981,6 +17190,15 @@ 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!"); } @@ -4989,6 +17207,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 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!"); } @@ -4998,15 +17222,42 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_all_databases_args) - return this.equals((get_all_databases_args)that); + if (that instanceof get_partition_args) + return this.equals((get_partition_args)that); return false; } - public boolean equals(get_all_databases_args that) { + 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; + } + + 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; } @@ -5026,6 +17277,37 @@ } 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; @@ -5041,15 +17323,59 @@ 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 _iter137 : this.part_vals) { + oprot.writeString(_iter137); + } + 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_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(); } @@ -5061,15 +17387,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"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + 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 List success; + 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 { @@ -5077,69 +17406,56 @@ 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_partition_result.class, metaDataMap); } - public get_all_databases_result() { + public get_partition_result() { } - public get_all_databases_result( - List success, - MetaException o1) + public get_partition_result( + Partition success, + MetaException o1, + NoSuchObjectException o2) { this(); this.success = success; this.o1 = o1; + this.o2 = o2; } /** * Performs a deep copy on other. */ - public get_all_databases_result(get_all_databases_result other) { + public get_partition_result(get_partition_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 Partition(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } + if (other.isSetO2()) { + this.o2 = new NoSuchObjectException(other.o2); + } } @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 get_partition_result clone() { + return new get_partition_result(this); } - public List getSuccess() { + public Partition getSuccess() { return this.success; } - public void setSuccess(List success) { + public void setSuccess(Partition success) { this.success = success; } @@ -5169,13 +17485,30 @@ 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((Partition)value); } break; @@ -5187,6 +17520,14 @@ } break; + case O2: + if (value == null) { + unsetO2(); + } else { + setO2((NoSuchObjectException)value); + } + break; + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -5200,6 +17541,9 @@ case O1: return getO1(); + case O2: + return getO2(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -5212,6 +17556,8 @@ return isSetSuccess(); case O1: return isSetO1(); + case O2: + return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -5221,12 +17567,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_partition_result) + return this.equals((get_partition_result)that); return false; } - public boolean equals(get_all_databases_result that) { + public boolean equals(get_partition_result that) { if (that == null) return false; @@ -5248,6 +17594,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; } @@ -5268,18 +17623,9 @@ switch (field.id) { 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) - { - String _elem64; - _elem64 = iprot.readString(); - this.success.add(_elem64); - } - iprot.readListEnd(); - } + if (field.type == TType.STRUCT) { + this.success = new Partition(); + this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -5292,6 +17638,14 @@ 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; @@ -5308,18 +17662,16 @@ 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.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(); @@ -5327,7 +17679,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_databases_result("); + StringBuilder sb = new StringBuilder("get_partition_result("); boolean first = true; sb.append("success:"); @@ -5345,6 +17697,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(); } @@ -5356,74 +17716,144 @@ } - 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_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 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 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(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_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_by_name_args.class, metaDataMap); } - public get_type_args() { + public get_partition_by_name_args() { } - public get_type_args( - String name) + public get_partition_by_name_args( + String db_name, + String tbl_name, + String part_name) { this(); - this.name = name; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public get_type_args(get_type_args other) { - if (other.isSetName()) { - this.name = other.name; + public get_partition_by_name_args(get_partition_by_name_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_name()) { + this.part_name = other.part_name; } } @Override - public get_type_args clone() { - return new get_type_args(this); + public get_partition_by_name_args clone() { + return new get_partition_by_name_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 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 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_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); } break; @@ -5434,8 +17864,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 PART_NAME: + return getPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -5445,8 +17881,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 PART_NAME: + return isSetPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -5456,21 +17896,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_by_name_args) + return this.equals((get_partition_by_name_args)that); return false; } - public boolean equals(get_type_args that) { + public boolean equals(get_partition_by_name_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_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; } @@ -5493,9 +17951,23 @@ } 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_NAME: + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -5515,9 +17987,19 @@ 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_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -5526,14 +18008,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_args("); + StringBuilder sb = new StringBuilder("get_partition_by_name_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_name:"); + if (this.part_name == null) { + sb.append("null"); + } else { + sb.append(this.part_name); } first = false; sb.append(")"); @@ -5547,13 +18045,13 @@ } - public static class get_type_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_type_result"); + public static class get_partition_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 Type success; + private Partition success; public static final int SUCCESS = 0; private MetaException o1; public static final int O1 = 1; @@ -5566,7 +18064,7 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Type.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, @@ -5574,14 +18072,14 @@ }}); static { - FieldMetaData.addStructMetaDataMap(get_type_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); } - public get_type_result() { + public get_partition_by_name_result() { } - public get_type_result( - Type success, + public get_partition_by_name_result( + Partition success, MetaException o1, NoSuchObjectException o2) { @@ -5594,9 +18092,9 @@ /** * Performs a deep copy on other. */ - public get_type_result(get_type_result other) { + public get_partition_by_name_result(get_partition_by_name_result other) { if (other.isSetSuccess()) { - this.success = new Type(other.success); + this.success = new Partition(other.success); } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -5607,15 +18105,15 @@ } @Override - public get_type_result clone() { - return new get_type_result(this); + public get_partition_by_name_result clone() { + return new get_partition_by_name_result(this); } - public Type getSuccess() { + public Partition getSuccess() { return this.success; } - public void setSuccess(Type success) { + public void setSuccess(Partition success) { this.success = success; } @@ -5668,7 +18166,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((Type)value); + setSuccess((Partition)value); } break; @@ -5727,12 +18225,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_by_name_result) + return this.equals((get_partition_by_name_result)that); return false; } - public boolean equals(get_type_result that) { + public boolean equals(get_partition_by_name_result that) { if (that == null) return false; @@ -5784,7 +18282,7 @@ { case SUCCESS: if (field.type == TType.STRUCT) { - this.success = new Type(); + this.success = new Partition(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -5839,7 +18337,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_result("); + StringBuilder sb = new StringBuilder("get_partition_by_name_result("); boolean first = true; sb.append("success:"); @@ -5876,74 +18374,148 @@ } - 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); + 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 Type 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 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(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Type.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(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I16))); }}); static { - FieldMetaData.addStructMetaDataMap(create_type_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); } - public create_type_args() { + public get_partitions_args() { + this.max_parts = (short)-1; + } - public create_type_args( - Type type) + public get_partitions_args( + String db_name, + String tbl_name, + short max_parts) { this(); - this.type = type; + 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 create_type_args(create_type_args other) { - if (other.isSetType()) { - this.type = new Type(other.type); + 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; } @Override - public create_type_args clone() { - return new create_type_args(this); + public get_partitions_args clone() { + return new get_partitions_args(this); } - public Type getType() { - return this.type; + public String getDb_name() { + return this.db_name; } - public void setType(Type type) { - this.type = type; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetType() { - this.type = null; + public void unsetDb_name() { + this.db_name = null; } - // Returns true if field type is set (has been asigned a value) and false otherwise - public boolean isSetType() { - return this.type != null; + // Returns true if field db_name is set (has been asigned a value) and false otherwise + public boolean isSetDb_name() { + return this.db_name != null; + } + + public 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 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 MAX_PARTS: + if (value == null) { + unsetMax_parts(); + } else { + setMax_parts((Short)value); } break; @@ -5954,8 +18526,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case TYPE: - return getType(); + 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!"); @@ -5965,8 +18543,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 TYPE: - return isSetType(); + 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!"); } @@ -5976,21 +18558,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_type_args) - return this.equals((create_type_args)that); + if (that instanceof get_partitions_args) + return this.equals((get_partitions_args)that); return false; } - public boolean equals(create_type_args that) { + public boolean equals(get_partitions_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_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; } @@ -6013,10 +18613,24 @@ } 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 MAX_PARTS: + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + this.__isset.max_parts = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -6036,27 +18650,47 @@ 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(); } + 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_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("max_parts:"); + sb.append(this.max_parts); + first = false; sb.append(")"); return sb.toString(); } @@ -6068,104 +18702,112 @@ } - 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_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 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 NoSuchObjectException o1; public static final int O1 = 1; - private InvalidObjectException 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 { - 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_result.class, metaDataMap); } - public create_type_result() { + public get_partitions_result() { } - public create_type_result( - boolean success, - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3) + public get_partitions_result( + List success, + NoSuchObjectException o1, + MetaException o2) { 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; + 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 AlreadyExistsException(other.o1); + this.o1 = new NoSuchObjectException(other.o1); } if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + this.o2 = new MetaException(other.o2); } } @Override - public create_type_result clone() { - return new create_type_result(this); + public get_partitions_result clone() { + return new get_partitions_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 NoSuchObjectException getO1() { return this.o1; } - public void setO1(AlreadyExistsException o1) { + public void setO1(NoSuchObjectException o1) { this.o1 = o1; } @@ -6178,11 +18820,11 @@ return this.o1 != null; } - public InvalidObjectException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(InvalidObjectException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -6195,30 +18837,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((Boolean)value); + setSuccess((List)value); } break; @@ -6226,7 +18851,7 @@ if (value == null) { unsetO1(); } else { - setO1((AlreadyExistsException)value); + setO1((NoSuchObjectException)value); } break; @@ -6234,15 +18859,7 @@ if (value == null) { unsetO2(); } else { - setO2((InvalidObjectException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); + setO2((MetaException)value); } break; @@ -6254,7 +18871,7 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return new Boolean(isSuccess()); + return getSuccess(); case O1: return getO1(); @@ -6262,9 +18879,6 @@ case O2: return getO2(); - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -6279,8 +18893,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -6290,21 +18902,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_result) + return this.equals((get_partitions_result)that); return false; } - public boolean equals(create_type_result that) { + public boolean equals(get_partitions_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; } @@ -6326,15 +18938,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; } @@ -6355,16 +18958,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 _list138 = iprot.readListBegin(); + this.success = new ArrayList(_list138.size); + for (int _i139 = 0; _i139 < _list138.size; ++_i139) + { + Partition _elem140; + _elem140 = new Partition(); + _elem140.read(iprot); + this.success.add(_elem140); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } break; case O1: if (field.type == TType.STRUCT) { - this.o1 = new AlreadyExistsException(); + this.o1 = new NoSuchObjectException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -6372,20 +18985,12 @@ break; case O2: if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); + 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; @@ -6402,7 +19007,13 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeBool(this.success); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Partition _iter141 : this.success) { + _iter141.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -6412,10 +19023,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(); @@ -6423,11 +19030,15 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_type_result("); + StringBuilder sb = new StringBuilder("get_partitions_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:"); @@ -6445,93 +19056,159 @@ 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 void validate() throws TException { + // check for required fields + // check that fields of type enum have valid values + } + + } + + 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 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(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_partition_names_args.class, metaDataMap); + } + + public get_partition_names_args() { + this.max_parts = (short)-1; + + } + + public get_partition_names_args( + String db_name, + String tbl_name, + short max_parts) + { + this(); + 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) { + 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 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; + public String getDb_name() { + return this.db_name; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + public void setDb_name(String db_name) { + this.db_name = db_name; } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + public void unsetDb_name() { + this.db_name = null; + } - static { - FieldMetaData.addStructMetaDataMap(drop_type_args.class, metaDataMap); + // 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 drop_type_args() { + public String getTbl_name() { + return this.tbl_name; } - public drop_type_args( - String type) - { - this(); - this.type = type; + public void setTbl_name(String tbl_name) { + this.tbl_name = tbl_name; } - /** - * Performs a deep copy on other. - */ - public drop_type_args(drop_type_args other) { - if (other.isSetType()) { - this.type = other.type; - } + public void unsetTbl_name() { + this.tbl_name = null; } - @Override - public drop_type_args clone() { - return new drop_type_args(this); + // 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 getType() { - return this.type; + public short getMax_parts() { + return this.max_parts; } - public void setType(String type) { - this.type = type; + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + this.__isset.max_parts = true; } - public void unsetType() { - this.type = null; + public void unsetMax_parts() { + this.__isset.max_parts = false; } - // Returns true if field type is set (has been asigned a value) and false otherwise - public boolean isSetType() { - return this.type != null; + // Returns true if field 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((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; @@ -6542,8 +19219,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case TYPE: - return getType(); + 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!"); @@ -6553,8 +19236,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 TYPE: - return isSetType(); + 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!"); } @@ -6564,21 +19251,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_type_args) - return this.equals((drop_type_args)that); + if (that instanceof get_partition_names_args) + return this.equals((get_partition_names_args)that); return false; } - public boolean equals(drop_type_args that) { + public boolean equals(get_partition_names_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_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; } @@ -6601,9 +19306,24 @@ } 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 MAX_PARTS: + if (field.type == TType.I16) { + this.max_parts = iprot.readI16(); + this.__isset.max_parts = true; } else { TProtocolUtil.skip(iprot, field.type); } @@ -6623,27 +19343,47 @@ 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(); } + 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_type_args("); + StringBuilder sb = new StringBuilder("get_partition_names_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("max_parts:"); + sb.append(this.max_parts); + first = false; sb.append(")"); return sb.toString(); } @@ -6655,111 +19395,102 @@ } - 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); + 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 boolean success; + 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 { - 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))); + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_type_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); } - public drop_type_result() { + public get_partition_names_result() { } - public drop_type_result( - boolean success, - MetaException o1, - NoSuchObjectException o2) + public get_partition_names_result( + List success, + MetaException 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); + 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 NoSuchObjectException(other.o2); + this.o2 = new MetaException(other.o2); } } @Override - public drop_type_result clone() { - return new drop_type_result(this); - } - - public boolean isSuccess() { - return this.success; + public get_partition_names_result clone() { + return new get_partition_names_result(this); } - public void setSuccess(boolean success) { - this.success = success; - this.__isset.success = true; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void unsetSuccess() { - this.__isset.success = false; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.__isset.success; + public void addToSuccess(String elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - public MetaException getO1() { - return this.o1; + public List getSuccess() { + return this.success; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setSuccess(List success) { + this.success = success; } - public void unsetO1() { - this.o1 = null; + public void unsetSuccess() { + this.success = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.success != null; } - public NoSuchObjectException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(NoSuchObjectException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -6778,15 +19509,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((Boolean)value); - } - break; - - case O1: - if (value == null) { - unsetO1(); - } else { - setO1((MetaException)value); + setSuccess((List)value); } break; @@ -6794,7 +19517,7 @@ if (value == null) { unsetO2(); } else { - setO2((NoSuchObjectException)value); + setO2((MetaException)value); } break; @@ -6806,10 +19529,7 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return new Boolean(isSuccess()); - - case O1: - return getO1(); + return getSuccess(); case O2: return getO2(); @@ -6824,8 +19544,6 @@ switch (fieldID) { case SUCCESS: return isSetSuccess(); - case O1: - return isSetO1(); case O2: return isSetO2(); default: @@ -6837,30 +19555,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_partition_names_result) + return this.equals((get_partition_names_result)that); return false; } - public boolean equals(drop_type_result that) { + public boolean equals(get_partition_names_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) - 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)) + if (!this.success.equals(that.success)) return false; } @@ -6893,24 +19602,25 @@ 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); + if (field.type == TType.LIST) { + { + TList _list142 = iprot.readListBegin(); + this.success = new ArrayList(_list142.size); + for (int _i143 = 0; _i143 < _list142.size; ++_i143) + { + String _elem144; + _elem144 = iprot.readString(); + this.success.add(_elem144); + } + 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); @@ -6932,11 +19642,13 @@ 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.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter145 : this.success) { + oprot.writeString(_iter145); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO2()) { oprot.writeFieldBegin(O2_FIELD_DESC); @@ -6949,18 +19661,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_type_result("); + StringBuilder sb = new StringBuilder("get_partition_names_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(", "); @@ -6982,74 +19690,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_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 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_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; + } + + // 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 get_type_all_args() { + public List getPart_vals() { + return this.part_vals; } - public get_type_all_args( - String name) - { - this(); - this.name = name; + public void setPart_vals(List part_vals) { + this.part_vals = part_vals; } - /** - * Performs a deep copy on other. - */ - public get_type_all_args(get_type_all_args other) { - if (other.isSetName()) { - this.name = other.name; - } + public void 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; @@ -7060,8 +19897,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!"); @@ -7071,8 +19917,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!"); } @@ -7082,21 +19934,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_partitions_ps_args) + return this.equals((get_partitions_ps_args)that); return false; } - public boolean equals(get_type_all_args that) { + public boolean equals(get_partitions_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; } @@ -7119,9 +19998,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 _list146 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list146.size); + for (int _i147 = 0; _i147 < _list146.size; ++_i147) + { + String _elem148; + _elem148 = iprot.readString(); + this.part_vals.add(_elem148); + } + 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); } @@ -7141,27 +20052,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 _iter149 : this.part_vals) { + oprot.writeString(_iter149); + } + 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_partitions_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(); } @@ -7173,15 +20123,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_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 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 { @@ -7189,74 +20139,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 StructMetaData(TType.STRUCT, Partition.class)))); + put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); }}); static { - FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); } - public get_type_all_result() { + public get_partitions_ps_result() { } - public get_type_all_result( - Map success, - MetaException o2) + public get_partitions_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_partitions_ps_result(get_partitions_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 (Partition other_element : other.success) { + __this__success.add(new Partition(other_element)); } this.success = __this__success; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); } } @Override - public get_type_all_result clone() { - return new get_type_all_result(this); + 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 void putToSuccess(String key, Type val) { + 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 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; } @@ -7269,21 +20214,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) { @@ -7292,15 +20237,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; @@ -7314,8 +20259,8 @@ case SUCCESS: return getSuccess(); - case O2: - return getO2(); + case O1: + return getO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -7327,8 +20272,8 @@ switch (fieldID) { case SUCCESS: return isSetSuccess(); - case O2: - return isSetO2(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -7338,12 +20283,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_partitions_ps_result) + return this.equals((get_partitions_ps_result)that); return false; } - public boolean equals(get_type_all_result that) { + public boolean equals(get_partitions_ps_result that) { if (that == null) return false; @@ -7356,12 +20301,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; } @@ -7385,29 +20330,27 @@ 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 _list150 = iprot.readListBegin(); + this.success = new ArrayList(_list150.size); + for (int _i151 = 0; _i151 < _list150.size; ++_i151) { - String _key68; - Type _val69; - _key68 = iprot.readString(); - _val69 = new Type(); - _val69.read(iprot); - this.success.put(_key68, _val69); + Partition _elem152; + _elem152 = new Partition(); + _elem152.read(iprot); + this.success.add(_elem152); } - 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); } @@ -7429,17 +20372,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.STRUCT, this.success.size())); + for (Partition _iter153 : this.success) { + _iter153.write(oprot); } - 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(); @@ -7448,7 +20390,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_type_all_result("); + StringBuilder sb = new StringBuilder("get_partitions_ps_result("); boolean first = true; sb.append("success:"); @@ -7459,11 +20401,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(")"); @@ -7477,58 +20419,86 @@ } - public static class get_fields_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_fields_args"); + public static class get_partition_names_ps_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 TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); + private 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 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(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + 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_fields_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); } - public get_fields_args() { + public get_partition_names_ps_args() { + this.max_parts = (short)-1; + } - public get_fields_args( + public get_partition_names_ps_args( String db_name, - String table_name) + String tbl_name, + List part_vals, + short max_parts) { this(); this.db_name = db_name; - this.table_name = table_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_fields_args(get_fields_args other) { + public get_partition_names_ps_args(get_partition_names_ps_args other) { if (other.isSetDb_name()) { this.db_name = other.db_name; } - if (other.isSetTable_name()) { - this.table_name = other.table_name; + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetPart_vals()) { + List __this__part_vals = new ArrayList(); + for (String other_element : other.part_vals) { + __this__part_vals.add(other_element); + } + this.part_vals = __this__part_vals; } + __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_partition_names_ps_args clone() { + return new get_partition_names_ps_args(this); } public String getDb_name() { @@ -7548,21 +20518,71 @@ return this.db_name != null; } - public String getTable_name() { - return this.table_name; + 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 short getMax_parts() { + return this.max_parts; } - public void setTable_name(String table_name) { - this.table_name = table_name; + public void setMax_parts(short max_parts) { + this.max_parts = max_parts; + this.__isset.max_parts = true; } - public void unsetTable_name() { - this.table_name = null; + public void unsetMax_parts() { + this.__isset.max_parts = false; } - // 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 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) { @@ -7575,11 +20595,27 @@ } break; - case TABLE_NAME: + case TBL_NAME: if (value == null) { - unsetTable_name(); + unsetTbl_name(); } else { - setTable_name((String)value); + setTbl_name((String)value); + } + break; + + case PART_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; @@ -7593,8 +20629,14 @@ case DB_NAME: return getDb_name(); - case TABLE_NAME: - return getTable_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!"); @@ -7606,8 +20648,12 @@ switch (fieldID) { case DB_NAME: return isSetDb_name(); - case TABLE_NAME: - return isSetTable_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!"); } @@ -7617,12 +20663,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_partition_names_ps_args) + return this.equals((get_partition_names_ps_args)that); return false; } - public boolean equals(get_fields_args that) { + public boolean equals(get_partition_names_ps_args that) { if (that == null) return false; @@ -7635,12 +20681,30 @@ return false; } - boolean this_present_table_name = true && this.isSetTable_name(); - boolean that_present_table_name = true && that.isSetTable_name(); - if (this_present_table_name || that_present_table_name) { - if (!(this_present_table_name && that_present_table_name)) + boolean this_present_tbl_name = true && this.isSetTbl_name(); + boolean that_present_tbl_name = true && that.isSetTbl_name(); + if (this_present_tbl_name || that_present_tbl_name) { + if (!(this_present_tbl_name && that_present_tbl_name)) return false; - if (!this.table_name.equals(that.table_name)) + if (!this.tbl_name.equals(that.tbl_name)) + return false; + } + + boolean this_present_part_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; } @@ -7670,9 +20734,34 @@ 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 PART_VALS: + if (field.type == TType.LIST) { + { + TList _list154 = iprot.readListBegin(); + this.part_vals = new ArrayList(_list154.size); + for (int _i155 = 0; _i155 < _list154.size; ++_i155) + { + String _elem156; + _elem156 = iprot.readString(); + this.part_vals.add(_elem156); + } + 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); } @@ -7697,18 +20786,32 @@ oprot.writeString(this.db_name); oprot.writeFieldEnd(); } - if (this.table_name != null) { - oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); - oprot.writeString(this.table_name); + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.part_vals != null) { + oprot.writeFieldBegin(PART_VALS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); + for (String _iter157 : this.part_vals) { + oprot.writeString(_iter157); + } + 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_fields_args("); + StringBuilder sb = new StringBuilder("get_partition_names_ps_args("); boolean first = true; sb.append("db_name:"); @@ -7719,13 +20822,25 @@ } first = false; if (!first) sb.append(", "); - sb.append("table_name:"); - if (this.table_name == null) { + sb.append("tbl_name:"); + if (this.tbl_name == null) { sb.append("null"); } else { - sb.append(this.table_name); + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("part_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(); } @@ -7737,21 +20852,15 @@ } - 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_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 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; - 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 { @@ -7760,82 +20869,68 @@ 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 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))); }}); static { - FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); } - public get_fields_result() { + public get_partition_names_ps_result() { } - public get_fields_result( - List success, - MetaException o1, - UnknownTableException o2, - UnknownDBException o3) + public get_partition_names_ps_result( + List success, + MetaException o1) { this(); this.success = success; this.o1 = o1; - this.o2 = o2; - this.o3 = o3; } /** * Performs a deep copy on other. */ - public get_fields_result(get_fields_result other) { + public get_partition_names_ps_result(get_partition_names_ps_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 (String other_element : other.success) { + __this__success.add(other_element); } this.success = __this__success; } if (other.isSetO1()) { this.o1 = new MetaException(other.o1); } - if (other.isSetO2()) { - this.o2 = new 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 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() { + public java.util.Iterator getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } - public void addToSuccess(FieldSchema elem) { + public void addToSuccess(String 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; } @@ -7862,41 +20957,7 @@ // 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; + return this.o1 != null; } public void setFieldValue(int fieldID, Object value) { @@ -7905,7 +20966,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((List)value); } break; @@ -7917,22 +20978,6 @@ } 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!"); } @@ -7946,12 +20991,6 @@ case O1: return getO1(); - case O2: - return getO2(); - - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -7964,10 +21003,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -7977,12 +21012,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_partition_names_ps_result) + return this.equals((get_partition_names_ps_result)that); return false; } - public boolean equals(get_fields_result that) { + public boolean equals(get_partition_names_ps_result that) { if (that == null) return false; @@ -8004,24 +21039,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; } @@ -8044,14 +21061,13 @@ 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 _list158 = iprot.readListBegin(); + this.success = new ArrayList(_list158.size); + for (int _i159 = 0; _i159 < _list158.size; ++_i159) { - FieldSchema _elem73; - _elem73 = new FieldSchema(); - _elem73.read(iprot); - this.success.add(_elem73); + String _elem160; + _elem160 = iprot.readString(); + this.success.add(_elem160); } iprot.readListEnd(); } @@ -8067,22 +21083,6 @@ 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; @@ -8100,9 +21100,9 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (FieldSchema _iter74 : this.success) { - _iter74.write(oprot); + oprot.writeListBegin(new TList(TType.STRING, this.success.size())); + for (String _iter161 : this.success) { + oprot.writeString(_iter161); } oprot.writeListEnd(); } @@ -8111,14 +21111,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(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -8126,7 +21118,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_fields_result("); + StringBuilder sb = new StringBuilder("get_partition_names_ps_result("); boolean first = true; sb.append("success:"); @@ -8144,22 +21136,6 @@ sb.append(this.o1); } first = false; - if (!first) sb.append(", "); - sb.append("o2:"); - if (this.o2 == null) { - sb.append("null"); - } else { - sb.append(this.o2); - } - first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; sb.append(")"); return sb.toString(); } @@ -8171,58 +21147,81 @@ } - public static class get_schema_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_schema_args"); + public static class get_partitions_by_filter_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_schema_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); } - public get_schema_args() { + public get_partitions_by_filter_args() { + this.max_parts = (short)-1; + } - public get_schema_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_schema_args(get_schema_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_schema_args clone() { - return new get_schema_args(this); + public get_partitions_by_filter_args clone() { + return new get_partitions_by_filter_args(this); } public String getDb_name() { @@ -8242,21 +21241,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) { @@ -8269,11 +21303,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; @@ -8287,8 +21337,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!"); @@ -8300,8 +21356,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!"); } @@ -8311,12 +21371,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_schema_args) - return this.equals((get_schema_args)that); + if (that instanceof get_partitions_by_filter_args) + return this.equals((get_partitions_by_filter_args)that); return false; } - public boolean equals(get_schema_args that) { + public boolean equals(get_partitions_by_filter_args that) { if (that == null) return false; @@ -8329,12 +21389,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; } @@ -8364,9 +21442,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); } @@ -8391,18 +21484,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_schema_args("); + StringBuilder sb = new StringBuilder("get_partitions_by_filter_args("); boolean first = true; sb.append("db_name:"); @@ -8413,13 +21514,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(); } @@ -8431,21 +21544,18 @@ } - public static class get_schema_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_schema_result"); + public static class get_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 { @@ -8454,43 +21564,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_schema_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_result.class, metaDataMap); } - public get_schema_result() { + public get_partitions_by_filter_result() { } - public get_schema_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_schema_result(get_schema_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; } @@ -8498,38 +21604,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_schema_result clone() { - return new get_schema_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; } @@ -8559,11 +21662,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; } @@ -8576,30 +21679,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; @@ -8615,15 +21701,7 @@ if (value == null) { unsetO2(); } else { - setO2((UnknownTableException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((UnknownDBException)value); + setO2((NoSuchObjectException)value); } break; @@ -8643,9 +21721,6 @@ case O2: return getO2(); - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -8660,8 +21735,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -8671,12 +21744,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_schema_result) - return this.equals((get_schema_result)that); + if (that instanceof get_partitions_by_filter_result) + return this.equals((get_partitions_by_filter_result)that); return false; } - public boolean equals(get_schema_result that) { + public boolean equals(get_partitions_by_filter_result that) { if (that == null) return false; @@ -8707,15 +21780,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; } @@ -8738,14 +21802,14 @@ 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) + TList _list162 = iprot.readListBegin(); + this.success = new ArrayList(_list162.size); + for (int _i163 = 0; _i163 < _list162.size; ++_i163) { - FieldSchema _elem77; - _elem77 = new FieldSchema(); - _elem77.read(iprot); - this.success.add(_elem77); + Partition _elem164; + _elem164 = new Partition(); + _elem164.read(iprot); + this.success.add(_elem164); } iprot.readListEnd(); } @@ -8763,20 +21827,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; @@ -8795,8 +21851,8 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (FieldSchema _iter78 : this.success) { - _iter78.write(oprot); + for (Partition _iter165 : this.success) { + _iter165.write(oprot); } oprot.writeListEnd(); } @@ -8809,10 +21865,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(); @@ -8820,7 +21872,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_schema_result("); + StringBuilder sb = new StringBuilder("get_partitions_by_filter_result("); boolean first = true; sb.append("success:"); @@ -8846,14 +21898,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(); } @@ -8865,74 +21909,144 @@ } - 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 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); - private Table tbl; - public static final int TBL = 1; + 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; 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(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_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); }}); static { - FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); } - public create_table_args() { + public alter_partition_args() { } - public create_table_args( - Table tbl) + public alter_partition_args( + String db_name, + String tbl_name, + Partition new_part) { this(); - this.tbl = tbl; + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_part = new_part; } /** * Performs a deep copy on other. */ - public create_table_args(create_table_args other) { - if (other.isSetTbl()) { - this.tbl = new Table(other.tbl); + public alter_partition_args(alter_partition_args other) { + if (other.isSetDb_name()) { + this.db_name = other.db_name; + } + if (other.isSetTbl_name()) { + this.tbl_name = other.tbl_name; + } + if (other.isSetNew_part()) { + this.new_part = new Partition(other.new_part); } } @Override - public create_table_args clone() { - return new create_table_args(this); + public alter_partition_args clone() { + return new alter_partition_args(this); } - public Table getTbl() { - return this.tbl; + public String getDb_name() { + return this.db_name; } - public void setTbl(Table tbl) { - this.tbl = tbl; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetTbl() { - this.tbl = null; + public void unsetDb_name() { + this.db_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 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 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 TBL: + case DB_NAME: if (value == null) { - unsetTbl(); + unsetDb_name(); } else { - setTbl((Table)value); + setDb_name((String)value); + } + break; + + case TBL_NAME: + if (value == null) { + unsetTbl_name(); + } else { + setTbl_name((String)value); + } + break; + + case NEW_PART: + if (value == null) { + unsetNew_part(); + } else { + setNew_part((Partition)value); } break; @@ -8943,8 +22057,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case TBL: - return getTbl(); + case DB_NAME: + return getDb_name(); + + case TBL_NAME: + return getTbl_name(); + + case NEW_PART: + return getNew_part(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -8954,8 +22074,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 TBL: - return isSetTbl(); + 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!"); } @@ -8965,21 +22089,39 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof create_table_args) - return this.equals((create_table_args)that); + if (that instanceof alter_partition_args) + return this.equals((alter_partition_args)that); return false; } - public boolean equals(create_table_args that) { + public boolean equals(alter_partition_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_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.tbl.equals(that.tbl)) + 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_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; } @@ -9002,10 +22144,24 @@ } switch (field.id) { - case TBL: + 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 NEW_PART: if (field.type == TType.STRUCT) { - this.tbl = new Table(); - this.tbl.read(iprot); + this.new_part = new Partition(); + this.new_part.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -9025,9 +22181,19 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.tbl != null) { - oprot.writeFieldBegin(TBL_FIELD_DESC); - this.tbl.write(oprot); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.tbl_name != null) { + oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); + oprot.writeString(this.tbl_name); + oprot.writeFieldEnd(); + } + if (this.new_part != null) { + oprot.writeFieldBegin(NEW_PART_FIELD_DESC); + this.new_part.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -9036,14 +22202,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_table_args("); + StringBuilder sb = new StringBuilder("alter_partition_args("); boolean first = true; - sb.append("tbl:"); - if (this.tbl == null) { + sb.append("db_name:"); + if (this.db_name == null) { sb.append("null"); } else { - sb.append(this.tbl); + sb.append(this.db_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("tbl_name:"); + if (this.tbl_name == null) { + sb.append("null"); + } else { + sb.append(this.tbl_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("new_part:"); + if (this.new_part == null) { + sb.append("null"); + } else { + sb.append(this.new_part); } first = false; sb.append(")"); @@ -9057,21 +22239,15 @@ } - 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 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 static final TField O4_FIELD_DESC = new TField("o4", TType.STRUCT, (short)4); - private AlreadyExistsException o1; + private InvalidOperationException o1; public static final int O1 = 1; - private InvalidObjectException o2; + private MetaException 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 { @@ -9082,60 +22258,46 @@ 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(alter_partition_result.class, metaDataMap); } - public create_table_result() { + public alter_partition_result() { } - public create_table_result( - AlreadyExistsException o1, - InvalidObjectException o2, - MetaException o3, - NoSuchObjectException o4) + public alter_partition_result( + InvalidOperationException o1, + MetaException o2) { 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) { + public alter_partition_result(alter_partition_result other) { if (other.isSetO1()) { - this.o1 = new AlreadyExistsException(other.o1); + this.o1 = new InvalidOperationException(other.o1); } if (other.isSetO2()) { - this.o2 = new InvalidObjectException(other.o2); - } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); - } - if (other.isSetO4()) { - this.o4 = new NoSuchObjectException(other.o4); + this.o2 = new MetaException(other.o2); } } @Override - public create_table_result clone() { - return new create_table_result(this); + public alter_partition_result clone() { + return new alter_partition_result(this); } - public AlreadyExistsException getO1() { + public InvalidOperationException getO1() { return this.o1; } - public void setO1(AlreadyExistsException o1) { + public void setO1(InvalidOperationException o1) { this.o1 = o1; } @@ -9148,11 +22310,11 @@ return this.o1 != null; } - public InvalidObjectException getO2() { + public MetaException getO2() { return this.o2; } - public void setO2(InvalidObjectException o2) { + public void setO2(MetaException o2) { this.o2 = o2; } @@ -9165,47 +22327,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 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); + setO1((InvalidOperationException)value); } break; @@ -9213,23 +22341,7 @@ 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); + setO2((MetaException)value); } break; @@ -9246,12 +22358,6 @@ case O2: return getO2(); - case O3: - return getO3(); - - case O4: - return getO4(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -9264,10 +22370,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); - case O4: - return isSetO4(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -9277,12 +22379,12 @@ 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 alter_partition_result) + return this.equals((alter_partition_result)that); return false; } - public boolean equals(create_table_result that) { + public boolean equals(alter_partition_result that) { if (that == null) return false; @@ -9304,24 +22406,6 @@ return false; } - boolean this_present_o3 = true && this.isSetO3(); - boolean that_present_o3 = true && that.isSetO3(); - if (this_present_o3 || that_present_o3) { - if (!(this_present_o3 && that_present_o3)) - return false; - if (!this.o3.equals(that.o3)) - return false; - } - - boolean this_present_o4 = true && this.isSetO4(); - boolean that_present_o4 = true && that.isSetO4(); - if (this_present_o4 || that_present_o4) { - if (!(this_present_o4 && that_present_o4)) - return false; - if (!this.o4.equals(that.o4)) - return false; - } - return true; } @@ -9343,7 +22427,7 @@ { case O1: if (field.type == TType.STRUCT) { - this.o1 = new AlreadyExistsException(); + this.o1 = new InvalidOperationException(); this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -9351,28 +22435,12 @@ break; case O2: if (field.type == TType.STRUCT) { - this.o2 = new InvalidObjectException(); + 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; - 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; @@ -9395,14 +22463,6 @@ oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); - } else if (this.isSetO4()) { - oprot.writeFieldBegin(O4_FIELD_DESC); - this.o4.write(oprot); - oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -9410,7 +22470,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("create_table_result("); + StringBuilder sb = new StringBuilder("alter_partition_result("); boolean first = true; sb.append("o1:"); @@ -9428,22 +22488,6 @@ sb.append(this.o2); } first = false; - if (!first) sb.append(", "); - sb.append("o3:"); - if (this.o3 == null) { - sb.append("null"); - } else { - sb.append(this.o3); - } - first = false; - if (!first) sb.append(", "); - sb.append("o4:"); - if (this.o4 == null) { - sb.append("null"); - } else { - sb.append(this.o4); - } - first = false; sb.append(")"); return sb.toString(); } @@ -9455,86 +22499,58 @@ } - 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 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 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; + 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 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))); + put(DEFAULTVALUE, new FieldMetaData("defaultValue", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); } - public drop_table_args() { + public get_config_value_args() { } - public drop_table_args( - String dbname, + public get_config_value_args( String name, - boolean deleteData) + String defaultValue) { this(); - this.dbname = dbname; this.name = name; - this.deleteData = deleteData; - this.__isset.deleteData = true; + this.defaultValue = defaultValue; } /** * Performs a deep copy on other. */ - public drop_table_args(drop_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; - } + public get_config_value_args(get_config_value_args other) { if (other.isSetName()) { this.name = other.name; } - __isset.deleteData = other.__isset.deleteData; - this.deleteData = other.deleteData; + if (other.isSetDefaultValue()) { + this.defaultValue = other.defaultValue; + } } @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 get_config_value_args clone() { + return new get_config_value_args(this); } public String getName() { @@ -9554,34 +22570,25 @@ return this.name != null; } - public boolean isDeleteData() { - return this.deleteData; + public String getDefaultValue() { + return this.defaultValue; } - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - this.__isset.deleteData = true; + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; } - public void unsetDeleteData() { - this.__isset.deleteData = false; + public void unsetDefaultValue() { + this.defaultValue = 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 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 DBNAME: - if (value == null) { - unsetDbname(); - } else { - setDbname((String)value); - } - break; - case NAME: if (value == null) { unsetName(); @@ -9590,11 +22597,11 @@ } break; - case DELETEDATA: + case DEFAULTVALUE: if (value == null) { - unsetDeleteData(); + unsetDefaultValue(); } else { - setDeleteData((Boolean)value); + setDefaultValue((String)value); } break; @@ -9605,14 +22612,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DBNAME: - return getDbname(); - case NAME: return getName(); - case DELETEDATA: - return new Boolean(isDeleteData()); + case DEFAULTVALUE: + return getDefaultValue(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -9622,12 +22626,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 NAME: return isSetName(); - case DELETEDATA: - return isSetDeleteData(); + case DEFAULTVALUE: + return isSetDefaultValue(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -9637,24 +22639,15 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_table_args) - return this.equals((drop_table_args)that); + if (that instanceof get_config_value_args) + return this.equals((get_config_value_args)that); return false; } - public boolean equals(drop_table_args that) { + public boolean equals(get_config_value_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) { @@ -9664,12 +22657,12 @@ return false; } - boolean this_present_deleteData = true; - boolean that_present_deleteData = true; - if (this_present_deleteData || that_present_deleteData) { - if (!(this_present_deleteData && that_present_deleteData)) + boolean this_present_defaultValue = true && this.isSetDefaultValue(); + boolean that_present_defaultValue = true && that.isSetDefaultValue(); + if (this_present_defaultValue || that_present_defaultValue) { + if (!(this_present_defaultValue && that_present_defaultValue)) return false; - if (this.deleteData != that.deleteData) + if (!this.defaultValue.equals(that.defaultValue)) return false; } @@ -9692,13 +22685,6 @@ } 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(); @@ -9706,10 +22692,9 @@ TProtocolUtil.skip(iprot, field.type); } break; - case DELETEDATA: - if (field.type == TType.BOOL) { - this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; + case DEFAULTVALUE: + if (field.type == TType.STRING) { + this.defaultValue = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -9729,36 +22714,25 @@ 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(); + if (this.defaultValue != null) { + oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); + oprot.writeString(this.defaultValue); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_table_args("); + StringBuilder sb = new StringBuilder("get_config_value_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"); @@ -9767,8 +22741,12 @@ } first = false; if (!first) sb.append(", "); - sb.append("deleteData:"); - sb.append(this.deleteData); + sb.append("defaultValue:"); + if (this.defaultValue == null) { + sb.append("null"); + } else { + sb.append(this.defaultValue); + } first = false; sb.append(")"); return sb.toString(); @@ -9781,109 +22759,109 @@ } - public static class drop_table_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("drop_table_result"); + public static class get_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 O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)2); - private NoSuchObjectException o1; + private String success; + public static final int SUCCESS = 0; + private ConfigValSecurityException 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 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(get_config_value_result.class, metaDataMap); } - public drop_table_result() { + public get_config_value_result() { } - public drop_table_result( - NoSuchObjectException o1, - MetaException o3) + public get_config_value_result( + String success, + ConfigValSecurityException 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 get_config_value_result(get_config_value_result other) { + if (other.isSetSuccess()) { + this.success = other.success; } - if (other.isSetO3()) { - this.o3 = new MetaException(other.o3); + if (other.isSetO1()) { + this.o1 = new ConfigValSecurityException(other.o1); } } @Override - public drop_table_result clone() { - return new drop_table_result(this); + public get_config_value_result clone() { + return new get_config_value_result(this); } - public NoSuchObjectException getO1() { - return this.o1; + public String getSuccess() { + return this.success; } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public void setSuccess(String success) { + this.success = success; } - public void unsetO1() { - this.o1 = null; + public void unsetSuccess() { + this.success = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.success != null; } - public MetaException getO3() { - return this.o3; + public ConfigValSecurityException getO1() { + return this.o1; } - public void setO3(MetaException o3) { - this.o3 = o3; + public void setO1(ConfigValSecurityException o1) { + this.o1 = o1; } - public void unsetO3() { - this.o3 = null; + public void unsetO1() { + this.o1 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != null; + // Returns true if field o1 is set (has been asigned a value) and false otherwise + public boolean isSetO1() { + return this.o1 != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case O1: + case SUCCESS: if (value == null) { - unsetO1(); + unsetSuccess(); } else { - setO1((NoSuchObjectException)value); + setSuccess((String)value); } break; - case O3: + case O1: if (value == null) { - unsetO3(); + unsetO1(); } else { - setO3((MetaException)value); + setO1((ConfigValSecurityException)value); } break; @@ -9894,12 +22872,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!"); } @@ -9908,10 +22886,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!"); } @@ -9921,15 +22899,24 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof drop_table_result) - return this.equals((drop_table_result)that); + if (that instanceof get_config_value_result) + return this.equals((get_config_value_result)that); return false; } - public boolean equals(drop_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) { @@ -9939,15 +22926,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; } @@ -9967,18 +22945,17 @@ } switch (field.id) { - case O1: - if (field.type == TType.STRUCT) { - this.o1 = new NoSuchObjectException(); - this.o1.read(iprot); + case SUCCESS: + if (field.type == TType.STRING) { + this.success = iprot.readString(); } 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 ConfigValSecurityException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -9997,14 +22974,14 @@ public void write(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); - if (this.isSetO1()) { + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeString(this.success); + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); this.o1.write(oprot); oprot.writeFieldEnd(); - } else if (this.isSetO3()) { - oprot.writeFieldBegin(O3_FIELD_DESC); - this.o3.write(oprot); - oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -10012,22 +22989,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("drop_table_result("); + StringBuilder sb = new StringBuilder("get_config_value_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(")"); @@ -10039,111 +23016,76 @@ // 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; + } + + 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 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_vals_args.class, metaDataMap); } - public get_tables_args() { + public partition_name_to_vals_args() { } - public get_tables_args( - String db_name, - String pattern) + public partition_name_to_vals_args( + String part_name) { this(); - this.db_name = db_name; - this.pattern = pattern; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public get_tables_args(get_tables_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetPattern()) { - this.pattern = other.pattern; + public partition_name_to_vals_args(partition_name_to_vals_args other) { + if (other.isSetPart_name()) { + this.part_name = other.part_name; } } @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 partition_name_to_vals_args clone() { + return new partition_name_to_vals_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; @@ -10154,11 +23096,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!"); @@ -10168,10 +23107,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!"); } @@ -10181,30 +23118,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_vals_args) + return this.equals((partition_name_to_vals_args)that); return false; } - public boolean equals(get_tables_args that) { + public boolean equals(partition_name_to_vals_args that) { if (that == null) return false; - boolean this_present_db_name = true && this.isSetDb_name(); - boolean that_present_db_name = true && that.isSetDb_name(); - if (this_present_db_name || that_present_db_name) { - if (!(this_present_db_name && that_present_db_name)) - return false; - if (!this.db_name.equals(that.db_name)) - return false; - } - - boolean this_present_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; } @@ -10227,16 +23155,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); } @@ -10256,14 +23177,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(); @@ -10272,22 +23188,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_tables_args("); + StringBuilder sb = new StringBuilder("partition_name_to_vals_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { - sb.append("null"); - } else { - sb.append(this.db_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("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(")"); @@ -10301,8 +23209,8 @@ } - public static class get_tables_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_tables_result"); + public static class partition_name_to_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); @@ -10324,13 +23232,13 @@ }}); static { - FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); } - public get_tables_result() { + public partition_name_to_vals_result() { } - public get_tables_result( + public partition_name_to_vals_result( List success, MetaException o1) { @@ -10342,7 +23250,7 @@ /** * Performs a deep copy on other. */ - public get_tables_result(get_tables_result other) { + public partition_name_to_vals_result(partition_name_to_vals_result other) { if (other.isSetSuccess()) { List __this__success = new ArrayList(); for (String other_element : other.success) { @@ -10356,8 +23264,8 @@ } @Override - public get_tables_result clone() { - return new get_tables_result(this); + public partition_name_to_vals_result clone() { + return new partition_name_to_vals_result(this); } public int getSuccessSize() { @@ -10461,12 +23369,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_vals_result) + return this.equals((partition_name_to_vals_result)that); return false; } - public boolean equals(get_tables_result that) { + public boolean equals(partition_name_to_vals_result that) { if (that == null) return false; @@ -10510,13 +23418,13 @@ case SUCCESS: if (field.type == TType.LIST) { { - TList _list79 = iprot.readListBegin(); - this.success = new ArrayList(_list79.size); - for (int _i80 = 0; _i80 < _list79.size; ++_i80) + TList _list166 = iprot.readListBegin(); + this.success = new ArrayList(_list166.size); + for (int _i167 = 0; _i167 < _list166.size; ++_i167) { - String _elem81; - _elem81 = iprot.readString(); - this.success.add(_elem81); + String _elem168; + _elem168 = iprot.readString(); + this.success.add(_elem168); } iprot.readListEnd(); } @@ -10550,8 +23458,8 @@ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter82 : this.success) { - oprot.writeString(_iter82); + for (String _iter169 : this.success) { + oprot.writeString(_iter169); } oprot.writeListEnd(); } @@ -10567,7 +23475,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_tables_result("); + StringBuilder sb = new StringBuilder("partition_name_to_vals_result("); boolean first = true; sb.append("success:"); @@ -10596,74 +23504,74 @@ } - 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 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 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, + put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(get_all_tables_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_spec_args.class, metaDataMap); } - public get_all_tables_args() { + public partition_name_to_spec_args() { } - public get_all_tables_args( - String db_name) + public partition_name_to_spec_args( + String part_name) { this(); - this.db_name = db_name; + this.part_name = part_name; } /** * Performs a deep copy on other. */ - public get_all_tables_args(get_all_tables_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; + public partition_name_to_spec_args(partition_name_to_spec_args other) { + if (other.isSetPart_name()) { + this.part_name = other.part_name; } } @Override - public get_all_tables_args clone() { - return new get_all_tables_args(this); + public partition_name_to_spec_args clone() { + return new partition_name_to_spec_args(this); } - public String getDb_name() { - return this.db_name; + public String getPart_name() { + return this.part_name; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetDb_name() { - this.db_name = null; + public void unsetPart_name() { + 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; + // 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: + case PART_NAME: if (value == null) { - unsetDb_name(); + unsetPart_name(); } else { - setDb_name((String)value); + setPart_name((String)value); } break; @@ -10674,8 +23582,8 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); + case PART_NAME: + return getPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -10685,8 +23593,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 PART_NAME: + return isSetPart_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -10696,21 +23604,21 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_all_tables_args) - return this.equals((get_all_tables_args)that); + if (that instanceof partition_name_to_spec_args) + return this.equals((partition_name_to_spec_args)that); return false; } - public boolean equals(get_all_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)) + 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.db_name.equals(that.db_name)) + if (!this.part_name.equals(that.part_name)) return false; } @@ -10733,9 +23641,9 @@ } switch (field.id) { - case DB_NAME: + case PART_NAME: if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -10755,9 +23663,9 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -10766,14 +23674,14 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_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("part_name:"); + if (this.part_name == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.part_name); } first = false; sb.append(")"); @@ -10787,12 +23695,12 @@ } - 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 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; @@ -10803,21 +23711,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_all_tables_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(partition_name_to_spec_result.class, metaDataMap); } - public get_all_tables_result() { + public partition_name_to_spec_result() { } - public get_all_tables_result( - List success, + public partition_name_to_spec_result( + Map success, MetaException o1) { this(); @@ -10828,11 +23737,19 @@ /** * Performs a deep copy on other. */ - public get_all_tables_result(get_all_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; } @@ -10842,30 +23759,26 @@ } @Override - public get_all_tables_result clone() { - return new get_all_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; } @@ -10901,7 +23814,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Map)value); } break; @@ -10947,12 +23860,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 partition_name_to_spec_result) + return this.equals((partition_name_to_spec_result)that); return false; } - public boolean equals(get_all_tables_result that) { + public boolean equals(partition_name_to_spec_result that) { if (that == null) return false; @@ -10994,17 +23907,19 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.LIST) { + if (field.type == TType.MAP) { { - TList _list83 = iprot.readListBegin(); - this.success = new ArrayList(_list83.size); - for (int _i84 = 0; _i84 < _list83.size; ++_i84) + TMap _map170 = iprot.readMapBegin(); + this.success = new HashMap(2*_map170.size); + for (int _i171 = 0; _i171 < _map170.size; ++_i171) { - String _elem85; - _elem85 = iprot.readString(); - this.success.add(_elem85); + String _key172; + String _val173; + _key172 = iprot.readString(); + _val173 = iprot.readString(); + this.success.put(_key172, _val173); } - iprot.readListEnd(); + iprot.readMapEnd(); } } else { TProtocolUtil.skip(iprot, field.type); @@ -11035,11 +23950,12 @@ 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.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size())); + for (Map.Entry _iter174 : this.success.entrySet()) { + oprot.writeString(_iter174.getKey()); + oprot.writeString(_iter174.getValue()); } - oprot.writeListEnd(); + oprot.writeMapEnd(); } oprot.writeFieldEnd(); } else if (this.isSetO1()) { @@ -11053,7 +23969,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_all_tables_result("); + StringBuilder sb = new StringBuilder("partition_name_to_spec_result("); boolean first = true; sb.append("success:"); @@ -11082,109 +23998,109 @@ } - 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); + 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 dbname; - public static final int DBNAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; + 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(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_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_table_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); } - public get_table_args() { + public add_index_args() { } - public get_table_args( - String dbname, - String tbl_name) + public add_index_args( + Index new_index, + Table index_table) { this(); - this.dbname = dbname; - this.tbl_name = tbl_name; + this.new_index = new_index; + this.index_table = index_table; } /** * Performs a deep copy on other. */ - public get_table_args(get_table_args other) { - if (other.isSetDbname()) { - this.dbname = other.dbname; + public add_index_args(add_index_args other) { + if (other.isSetNew_index()) { + this.new_index = new Index(other.new_index); } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetIndex_table()) { + this.index_table = new Table(other.index_table); } } @Override - public get_table_args clone() { - return new get_table_args(this); + public add_index_args clone() { + return new add_index_args(this); } - public String getDbname() { - return this.dbname; + public Index getNew_index() { + return this.new_index; } - public void setDbname(String dbname) { - this.dbname = dbname; + public void setNew_index(Index new_index) { + this.new_index = new_index; } - public void unsetDbname() { - this.dbname = null; + public void unsetNew_index() { + this.new_index = 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 new_index is set (has been asigned a value) and false otherwise + public boolean isSetNew_index() { + return this.new_index != null; } - public String getTbl_name() { - return this.tbl_name; + public Table getIndex_table() { + return this.index_table; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setIndex_table(Table index_table) { + this.index_table = index_table; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetIndex_table() { + this.index_table = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise - public boolean isSetTbl_name() { - return this.tbl_name != null; + // Returns true if field index_table is set (has been asigned a value) and false otherwise + public boolean isSetIndex_table() { + return this.index_table != null; } public void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case DBNAME: + case NEW_INDEX: if (value == null) { - unsetDbname(); + unsetNew_index(); } else { - setDbname((String)value); + setNew_index((Index)value); } break; - case TBL_NAME: + case INDEX_TABLE: if (value == null) { - unsetTbl_name(); + unsetIndex_table(); } else { - setTbl_name((String)value); + setIndex_table((Table)value); } break; @@ -11195,11 +24111,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DBNAME: - return getDbname(); + case NEW_INDEX: + return getNew_index(); - case TBL_NAME: - return getTbl_name(); + case INDEX_TABLE: + return getIndex_table(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -11209,10 +24125,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 TBL_NAME: - return isSetTbl_name(); + case NEW_INDEX: + return isSetNew_index(); + case INDEX_TABLE: + return isSetIndex_table(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -11222,30 +24138,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_table_args) - return this.equals((get_table_args)that); + if (that instanceof add_index_args) + return this.equals((add_index_args)that); return false; } - public boolean equals(get_table_args that) { + public boolean equals(add_index_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_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.dbname.equals(that.dbname)) + if (!this.new_index.equals(that.new_index)) 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_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.tbl_name.equals(that.tbl_name)) + if (!this.index_table.equals(that.index_table)) return false; } @@ -11268,16 +24184,18 @@ } switch (field.id) { - case DBNAME: - if (field.type == TType.STRING) { - this.dbname = 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 TBL_NAME: - if (field.type == TType.STRING) { - this.tbl_name = iprot.readString(); + case INDEX_TABLE: + if (field.type == TType.STRUCT) { + this.index_table = new Table(); + this.index_table.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -11297,14 +24215,14 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.dbname != null) { - oprot.writeFieldBegin(DBNAME_FIELD_DESC); - oprot.writeString(this.dbname); + if (this.new_index != null) { + oprot.writeFieldBegin(NEW_INDEX_FIELD_DESC); + this.new_index.write(oprot); oprot.writeFieldEnd(); } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + if (this.index_table != null) { + oprot.writeFieldBegin(INDEX_TABLE_FIELD_DESC); + this.index_table.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -11313,22 +24231,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_table_args("); + StringBuilder sb = new StringBuilder("add_index_args("); boolean first = true; - sb.append("dbname:"); - if (this.dbname == null) { + sb.append("new_index:"); + if (this.new_index == null) { sb.append("null"); } else { - sb.append(this.dbname); + sb.append(this.new_index); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("index_table:"); + if (this.index_table == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.index_table); } first = false; sb.append(")"); @@ -11342,18 +24260,21 @@ } - public static class get_table_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_table_result"); + public static class 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 Table success; + private Index success; public static final int SUCCESS = 0; - private MetaException o1; + private InvalidObjectException o1; public static final int O1 = 1; - private NoSuchObjectException o2; + 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 { @@ -11361,56 +24282,63 @@ public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.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(get_table_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); } - public get_table_result() { + public add_index_result() { } - public get_table_result( - Table success, - MetaException o1, - NoSuchObjectException o2) + public add_index_result( + Index success, + InvalidObjectException o1, + AlreadyExistsException o2, + MetaException o3) { this(); this.success = success; this.o1 = o1; this.o2 = o2; + this.o3 = o3; } /** * Performs a deep copy on other. */ - public get_table_result(get_table_result other) { + public add_index_result(add_index_result other) { if (other.isSetSuccess()) { - this.success = new Table(other.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 NoSuchObjectException(other.o2); + this.o2 = new AlreadyExistsException(other.o2); + } + if (other.isSetO3()) { + this.o3 = new MetaException(other.o3); } } @Override - public get_table_result clone() { - return new get_table_result(this); + public add_index_result clone() { + return new add_index_result(this); } - public Table getSuccess() { + public Index getSuccess() { return this.success; } - public void setSuccess(Table success) { + public void setSuccess(Index success) { this.success = success; } @@ -11423,11 +24351,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; } @@ -11440,11 +24368,11 @@ return this.o1 != null; } - public NoSuchObjectException getO2() { + public AlreadyExistsException getO2() { return this.o2; } - public void setO2(NoSuchObjectException o2) { + public void setO2(AlreadyExistsException o2) { this.o2 = o2; } @@ -11457,13 +24385,30 @@ 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((Table)value); + setSuccess((Index)value); } break; @@ -11471,7 +24416,7 @@ if (value == null) { unsetO1(); } else { - setO1((MetaException)value); + setO1((InvalidObjectException)value); } break; @@ -11479,7 +24424,15 @@ if (value == null) { unsetO2(); } else { - setO2((NoSuchObjectException)value); + setO2((AlreadyExistsException)value); + } + break; + + case O3: + if (value == null) { + unsetO3(); + } else { + setO3((MetaException)value); } break; @@ -11499,6 +24452,9 @@ case O2: return getO2(); + case O3: + return getO3(); + default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -11513,6 +24469,8 @@ return isSetO1(); case O2: return isSetO2(); + case O3: + return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -11522,12 +24480,12 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_table_result) - return this.equals((get_table_result)that); + if (that instanceof add_index_result) + return this.equals((add_index_result)that); return false; } - public boolean equals(get_table_result that) { + public boolean equals(add_index_result that) { if (that == null) return false; @@ -11558,6 +24516,15 @@ return false; } + boolean this_present_o3 = true && this.isSetO3(); + boolean that_present_o3 = true && that.isSetO3(); + if (this_present_o3 || that_present_o3) { + if (!(this_present_o3 && that_present_o3)) + return false; + if (!this.o3.equals(that.o3)) + return false; + } + return true; } @@ -11579,7 +24546,7 @@ { case SUCCESS: if (field.type == TType.STRUCT) { - this.success = new Table(); + this.success = new Index(); this.success.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); @@ -11587,7 +24554,7 @@ 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); @@ -11595,12 +24562,20 @@ break; case O2: if (field.type == TType.STRUCT) { - this.o2 = new NoSuchObjectException(); + this.o2 = new AlreadyExistsException(); this.o2.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } break; + case 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; @@ -11627,6 +24602,10 @@ oprot.writeFieldBegin(O2_FIELD_DESC); this.o2.write(oprot); oprot.writeFieldEnd(); + } else if (this.isSetO3()) { + oprot.writeFieldBegin(O3_FIELD_DESC); + this.o3.write(oprot); + oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); @@ -11634,7 +24613,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_table_result("); + StringBuilder sb = new StringBuilder("add_index_result("); boolean first = true; sb.append("success:"); @@ -11660,6 +24639,14 @@ sb.append(this.o2); } first = false; + if (!first) sb.append(", "); + sb.append("o3:"); + if (this.o3 == null) { + sb.append("null"); + } else { + sb.append(this.o3); + } + first = false; sb.append(")"); return sb.toString(); } @@ -11671,85 +24658,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() { @@ -11769,30 +24767,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; @@ -11804,11 +24820,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; @@ -11819,14 +24843,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!"); @@ -11836,12 +24863,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!"); } @@ -11851,21 +24880,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; } @@ -11878,12 +24907,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; } @@ -11906,9 +24944,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); } @@ -11920,10 +24958,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); } @@ -11943,9 +24988,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) { @@ -11953,25 +24998,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(", "); @@ -11983,13 +25031,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(); } @@ -12001,21 +25053,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, @@ -12023,17 +25081,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; } @@ -12041,9 +25102,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); @@ -12051,15 +25114,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; } @@ -12091,11 +25172,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; @@ -12114,6 +25203,9 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { + case SUCCESS: + return new Boolean(isSuccess()); + case O1: return getO1(); @@ -12128,6 +25220,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: @@ -12141,15 +25235,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) { @@ -12187,9 +25290,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); @@ -12217,7 +25328,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(); @@ -12232,9 +25347,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"); @@ -12261,74 +25380,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; @@ -12339,8 +25528,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!"); @@ -12350,8 +25545,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!"); } @@ -12361,21 +25560,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; } @@ -12398,10 +25615,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); } @@ -12421,9 +25651,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(); @@ -12432,14 +25672,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(")"); @@ -12453,21 +25709,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 { @@ -12475,63 +25728,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; } @@ -12544,11 +25790,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; } @@ -12561,11 +25807,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; } @@ -12578,30 +25824,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; @@ -12609,7 +25838,7 @@ if (value == null) { unsetO1(); } else { - setO1((InvalidObjectException)value); + setO1((MetaException)value); } break; @@ -12617,15 +25846,7 @@ if (value == null) { unsetO2(); } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); + setO2((NoSuchObjectException)value); } break; @@ -12645,9 +25866,6 @@ case O2: return getO2(); - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -12662,8 +25880,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -12673,12 +25889,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; @@ -12709,15 +25925,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; } @@ -12739,7 +25946,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); @@ -12747,7 +25954,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); @@ -12755,20 +25962,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; @@ -12795,10 +25994,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(); @@ -12806,7 +26001,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:"); @@ -12832,14 +26027,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(); } @@ -12851,21 +26038,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() {{ @@ -12873,51 +26061,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() { @@ -12954,36 +26139,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) { @@ -13004,11 +26175,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; @@ -13025,8 +26196,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!"); @@ -13040,8 +26211,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!"); } @@ -13051,12 +26222,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; @@ -13078,12 +26249,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; } @@ -13120,19 +26291,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); } @@ -13162,24 +26324,16 @@ 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.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:"); @@ -13198,12 +26352,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(); @@ -13216,21 +26366,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 { @@ -13238,63 +26385,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; } @@ -13307,11 +26467,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; } @@ -13324,11 +26484,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; } @@ -13341,30 +26501,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; @@ -13372,7 +26515,7 @@ if (value == null) { unsetO1(); } else { - setO1((InvalidObjectException)value); + setO1((NoSuchObjectException)value); } break; @@ -13380,15 +26523,7 @@ if (value == null) { unsetO2(); } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); + setO2((MetaException)value); } break; @@ -13408,9 +26543,6 @@ case O2: return getO2(); - case O3: - return getO3(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -13425,8 +26557,6 @@ return isSetO1(); case O2: return isSetO2(); - case O3: - return isSetO3(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -13436,12 +26566,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; @@ -13472,15 +26602,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; } @@ -13501,16 +26622,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 _list175 = iprot.readListBegin(); + this.success = new ArrayList(_list175.size); + for (int _i176 = 0; _i176 < _list175.size; ++_i176) + { + Index _elem177; + _elem177 = new Index(); + _elem177.read(iprot); + this.success.add(_elem177); + } + 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); @@ -13518,20 +26649,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; @@ -13548,7 +26671,13 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - this.success.write(oprot); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (Index _iter178 : this.success) { + _iter178.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -13558,10 +26687,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(); @@ -13569,7 +26694,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:"); @@ -13595,14 +26720,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(); } @@ -13614,21 +26731,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() {{ @@ -13636,46 +26754,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() { @@ -13712,21 +26832,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) { @@ -13747,11 +26868,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; @@ -13768,8 +26889,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!"); @@ -13783,8 +26904,8 @@ return isSetDb_name(); case TBL_NAME: return isSetTbl_name(); - case PART_NAME: - return isSetPart_name(); + case MAX_INDEXES: + return isSetMax_indexes(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -13794,12 +26915,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; @@ -13821,12 +26942,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; } @@ -13863,9 +26984,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); } @@ -13895,18 +27017,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:"); @@ -13925,12 +27045,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(); @@ -13943,21 +27059,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 { @@ -13965,63 +27075,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; } @@ -14034,28 +27150,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; } @@ -14068,38 +27167,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; @@ -14107,15 +27181,7 @@ if (value == null) { unsetO2(); } else { - setO2((AlreadyExistsException)value); - } - break; - - case O3: - if (value == null) { - unsetO3(); - } else { - setO3((MetaException)value); + setO2((MetaException)value); } break; @@ -14129,15 +27195,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!"); } @@ -14148,12 +27208,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!"); } @@ -14163,12 +27219,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; @@ -14177,16 +27233,7 @@ 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)) + if (!this.success.equals(that.success)) return false; } @@ -14199,15 +27246,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; } @@ -14228,37 +27266,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 _list179 = iprot.readListBegin(); + this.success = new ArrayList(_list179.size); + for (int _i180 = 0; _i180 < _list179.size; ++_i180) + { + String _elem181; + _elem181 = iprot.readString(); + this.success.add(_elem181); + } + 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; @@ -14275,20 +27306,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 _iter182 : this.success) { + oprot.writeString(_iter182); + } + 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(); @@ -14296,7 +27325,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:"); @@ -14307,14 +27336,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"); @@ -14322,14 +27343,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(); } @@ -14341,201 +27354,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; - } - - public boolean isDeleteData() { - return this.deleteData; + this.group_names.add(elem); } - public void setDeleteData(boolean deleteData) { - this.deleteData = deleteData; - this.__isset.deleteData = true; + public List getGroup_names() { + return this.group_names; } - public void unsetDeleteData() { - this.__isset.deleteData = false; + public void setGroup_names(List group_names) { + this.group_names = group_names; } - // Returns true if field deleteData is set (has been asigned a value) and false otherwise - public boolean isSetDeleteData() { - return this.__isset.deleteData; + public void unsetGroup_names() { + 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; + // 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; + } - case PART_VALS: + public void setFieldValue(int fieldID, Object value) { + switch (fieldID) { + 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; @@ -14546,17 +27487,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!"); @@ -14566,14 +27501,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!"); } @@ -14583,48 +27514,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; } @@ -14647,30 +27560,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 _list183 = iprot.readListBegin(); + this.group_names = new ArrayList(_list183.size); + for (int _i184 = 0; _i184 < _list183.size; ++_i184) { - String _elem93; - _elem93 = iprot.readString(); - this.part_vals.add(_elem93); + String _elem185; + _elem185 = iprot.readString(); + this.group_names.add(_elem185); } iprot.readListEnd(); } @@ -14678,14 +27584,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; @@ -14701,66 +27599,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 _iter186 : this.group_names) { + oprot.writeString(_iter186); } 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(); } @@ -14772,94 +27650,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; } @@ -14872,46 +27738,21 @@ 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); + setSuccess((PrincipalPrivilegeSet)value); } break; - case O2: + case O1: if (value == null) { - unsetO2(); + unsetO1(); } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -14923,14 +27764,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!"); } @@ -14943,8 +27781,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -14954,21 +27790,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; } @@ -14981,15 +27817,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; } @@ -15010,29 +27837,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; @@ -15049,16 +27868,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(); @@ -15066,26 +27881,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(")"); @@ -15099,79 +27910,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 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 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 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() { @@ -15191,56 +27996,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) { @@ -15253,27 +28055,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; @@ -15287,14 +28081,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!"); @@ -15306,12 +28097,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!"); } @@ -15321,12 +28110,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; @@ -15339,30 +28128,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; } @@ -15392,24 +28172,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 _list187 = iprot.readListBegin(); + this.group_names = new ArrayList(_list187.size); + for (int _i188 = 0; _i188 < _list187.size; ++_i188) + { + String _elem189; + _elem189 = iprot.readString(); + this.group_names.add(_elem189); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -15434,26 +28216,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 _iter190 : this.group_names) { + oprot.writeString(_iter190); + } + 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:"); @@ -15464,25 +28249,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(); } @@ -15494,94 +28275,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; } @@ -15594,30 +28363,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; @@ -15625,15 +28377,7 @@ if (value == null) { unsetO1(); } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -15645,14 +28389,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!"); } @@ -15665,8 +28406,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -15676,21 +28415,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; } @@ -15703,15 +28442,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; } @@ -15732,29 +28462,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; @@ -15771,16 +28493,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(); @@ -15788,26 +28506,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(")"); @@ -15821,18 +28535,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 { @@ -15841,53 +28558,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() { @@ -15907,53 +28631,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) { @@ -15966,19 +28707,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; @@ -15992,11 +28741,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!"); @@ -16008,10 +28760,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!"); } @@ -16021,12 +28775,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; @@ -16039,21 +28793,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; } @@ -16083,23 +28846,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 _list191 = iprot.readListBegin(); + this.group_names = new ArrayList(_list191.size); + for (int _i192 = 0; _i192 < _list191.size; ++_i192) { - String _elem97; - _elem97 = iprot.readString(); - this.part_vals.add(_elem97); + String _elem193; + _elem193 = iprot.readString(); + this.group_names.add(_elem193); } iprot.readListEnd(); } @@ -16127,17 +28897,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 _iter194 : this.group_names) { + oprot.writeString(_iter194); } oprot.writeListEnd(); } @@ -16149,7 +28924,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:"); @@ -16160,19 +28935,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.user_name); + } + first = false; + if (!first) sb.append(", "); + 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; sb.append(")"); @@ -16186,18 +28969,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 { @@ -16205,56 +28985,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; } @@ -16284,30 +29057,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; @@ -16319,14 +29075,6 @@ } break; - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -16340,9 +29088,6 @@ case O1: return getO1(); - case O2: - return getO2(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -16355,8 +29100,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -16366,12 +29109,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; @@ -16393,15 +29136,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; } @@ -16423,7 +29157,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); @@ -16437,14 +29171,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; @@ -16467,10 +29193,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(); @@ -16478,7 +29200,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:"); @@ -16496,14 +29218,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(); } @@ -16515,18 +29229,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 { @@ -16535,48 +29255,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() { @@ -16596,21 +29335,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() { @@ -16630,29 +29369,94 @@ 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: if (value == null) { - unsetDb_name(); + 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 { - setDb_name((String)value); + setPart_name((String)value); } break; - case TBL_NAME: + case USER_NAME: if (value == null) { - unsetTbl_name(); + unsetUser_name(); } else { - setTbl_name((String)value); + setUser_name((String)value); } break; - case PART_NAME: + case GROUP_NAMES: if (value == null) { - unsetPart_name(); + unsetGroup_names(); } else { - setPart_name((String)value); + setGroup_names((List)value); } break; @@ -16666,12 +29470,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!"); } @@ -16682,10 +29492,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!"); } @@ -16695,12 +29509,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; @@ -16713,12 +29527,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; } @@ -16731,6 +29545,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; } @@ -16757,9 +29589,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); } @@ -16771,6 +29603,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 _list195 = iprot.readListBegin(); + this.group_names = new ArrayList(_list195.size); + for (int _i196 = 0; _i196 < _list195.size; ++_i196) + { + String _elem197; + _elem197 = iprot.readString(); + this.group_names.add(_elem197); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; default: TProtocolUtil.skip(iprot, field.type); break; @@ -16791,9 +29647,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) { @@ -16801,13 +29657,29 @@ 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 _iter198 : this.group_names) { + oprot.writeString(_iter198); + } + 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:"); @@ -16818,11 +29690,11 @@ } 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(", "); @@ -16833,6 +29705,22 @@ sb.append(this.part_name); } first = false; + if (!first) sb.append(", "); + sb.append("user_name:"); + if (this.user_name == null) { + sb.append("null"); + } else { + sb.append(this.user_name); + } + first = false; + if (!first) sb.append(", "); + sb.append("group_names:"); + if (this.group_names == null) { + sb.append("null"); + } else { + sb.append(this.group_names); + } + first = false; sb.append(")"); return sb.toString(); } @@ -16844,18 +29732,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 { @@ -16863,56 +29748,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; } @@ -16942,30 +29820,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; @@ -16977,14 +29838,6 @@ } break; - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -16998,9 +29851,6 @@ case O1: return getO1(); - case O2: - return getO2(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -17013,8 +29863,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -17024,12 +29872,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; @@ -17051,15 +29899,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; } @@ -17081,7 +29920,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); @@ -17095,14 +29934,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; @@ -17125,10 +29956,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(); @@ -17136,7 +29963,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:"); @@ -17154,14 +29981,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(); } @@ -17173,71 +29992,103 @@ } - 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_partitions_args(get_partitions_args 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.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetTable_name()) { + this.table_name = other.table_name; } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; + 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_partitions_args clone() { - return new get_partitions_args(this); + public get_column_privilege_set_args clone() { + return new get_column_privilege_set_args(this); } public String getDb_name() { @@ -17257,39 +30108,104 @@ 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 short getMax_parts() { - return this.max_parts; + public String getPart_name() { + return this.part_name; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - this.__isset.max_parts = true; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetMax_parts() { - this.__isset.max_parts = false; + public void unsetPart_name() { + this.part_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 part_name is set (has been asigned a value) and false otherwise + public boolean isSetPart_name() { + return this.part_name != null; + } + + public String getColumn_name() { + return this.column_name; + } + + public void setColumn_name(String column_name) { + this.column_name = column_name; + } + + public void unsetColumn_name() { + this.column_name = null; + } + + // Returns true if field column_name is set (has been asigned a value) and false otherwise + public boolean isSetColumn_name() { + return this.column_name != null; + } + + public 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) { @@ -17302,19 +30218,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; @@ -17328,11 +30268,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!"); @@ -17344,10 +30293,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!"); } @@ -17357,12 +30312,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; @@ -17375,21 +30330,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; } @@ -17419,17 +30401,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 _list199 = iprot.readListBegin(); + this.group_names = new ArrayList(_list199.size); + for (int _i200 = 0; _i200 < _list199.size; ++_i200) + { + String _elem201; + _elem201 = iprot.readString(); + this.group_names.add(_elem201); + } + iprot.readListEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -17454,21 +30466,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(); } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); - 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 _iter202 : this.group_names) { + oprot.writeString(_iter202); + } + oprot.writeListEnd(); + } + 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:"); @@ -17479,16 +30514,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(); @@ -17501,18 +30564,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 { @@ -17520,76 +30580,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; } @@ -17602,38 +30635,21 @@ 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 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) { @@ -17642,7 +30658,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((PrincipalPrivilegeSet)value); } break; @@ -17650,15 +30666,7 @@ if (value == null) { unsetO1(); } else { - setO1((NoSuchObjectException)value); - } - break; - - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((MetaException)value); + setO1((MetaException)value); } break; @@ -17675,9 +30683,6 @@ case O1: return getO1(); - case O2: - return getO2(); - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -17690,8 +30695,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -17701,12 +30704,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; @@ -17728,15 +30731,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; } @@ -17757,39 +30751,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; @@ -17806,22 +30782,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(); @@ -17829,7 +30795,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:"); @@ -17847,14 +30813,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(); } @@ -17866,148 +30824,109 @@ } - 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 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 role_name; + public static final int ROLE_NAME = 1; + private String owner_name; + public static final int OWNER_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(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))); }}); 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) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.max_parts = max_parts; - this.__isset.max_parts = true; + this.role_name = role_name; + this.owner_name = owner_name; } /** * Performs a deep copy on other. */ - public get_partition_names_args(get_partition_names_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; + public create_role_args(create_role_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + if (other.isSetOwner_name()) { + this.owner_name = other.owner_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 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 create_role_args clone() { + return new create_role_args(this); } - public String getTbl_name() { - return this.tbl_name; + public String getRole_name() { + return this.role_name; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void unsetTbl_name() { - this.tbl_name = null; + public void unsetRole_name() { + this.role_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 role_name is set (has been asigned a value) and false otherwise + public boolean isSetRole_name() { + return this.role_name != null; } - public short getMax_parts() { - return this.max_parts; + public String getOwner_name() { + return this.owner_name; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - this.__isset.max_parts = true; + public void setOwner_name(String owner_name) { + this.owner_name = owner_name; } - public void unsetMax_parts() { - this.__isset.max_parts = false; + public void unsetOwner_name() { + this.owner_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 owner_name is set (has been asigned a value) and false otherwise + public boolean isSetOwner_name() { + return this.owner_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: + case ROLE_NAME: if (value == null) { - unsetTbl_name(); + unsetRole_name(); } else { - setTbl_name((String)value); + setRole_name((String)value); } break; - case MAX_PARTS: + case OWNER_NAME: if (value == null) { - unsetMax_parts(); + unsetOwner_name(); } else { - setMax_parts((Short)value); + setOwner_name((String)value); } break; @@ -18018,14 +30937,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); - - case TBL_NAME: - return getTbl_name(); + case ROLE_NAME: + return getRole_name(); - case MAX_PARTS: - return new Short(getMax_parts()); + case OWNER_NAME: + return getOwner_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -18035,12 +30951,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_PARTS: - return isSetMax_parts(); + case ROLE_NAME: + return isSetRole_name(); + case OWNER_NAME: + return isSetOwner_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -18050,39 +30964,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof get_partition_names_args) - return this.equals((get_partition_names_args)that); + if (that instanceof 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)) - 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_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.tbl_name.equals(that.tbl_name)) + if (!this.role_name.equals(that.role_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_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.max_parts != that.max_parts) + if (!this.owner_name.equals(that.owner_name)) return false; } @@ -18105,24 +31010,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 OWNER_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; + this.owner_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -18142,47 +31039,40 @@ 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.owner_name != null) { + oprot.writeFieldBegin(OWNER_NAME_FIELD_DESC); + oprot.writeString(this.owner_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); - first = false; sb.append(")"); return sb.toString(); } @@ -18194,112 +31084,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); + FieldMetaData.addStructMetaDataMap(create_role_result.class, metaDataMap); } - public get_partition_names_result() { + public create_role_result() { } - public get_partition_names_result( - List success, - MetaException o2) + public create_role_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_partition_names_result(get_partition_names_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + public create_role_result(create_role_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_result clone() { - return new get_partition_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 create_role_result clone() { + return new create_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 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) { @@ -18308,15 +31180,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; @@ -18328,10 +31200,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!"); @@ -18343,8 +31215,8 @@ switch (fieldID) { case SUCCESS: return isSetSuccess(); - case O2: - return isSetO2(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -18354,30 +31226,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; } @@ -18401,26 +31273,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); } @@ -18441,17 +31304,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(); @@ -18460,22 +31317,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(")"); @@ -18489,203 +31342,74 @@ } - 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 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 role_name; + public static final int ROLE_NAME = 1; 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(ROLE_NAME, new FieldMetaData("role_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) { 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; + this.role_name = role_name; } /** * 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(); - } - 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 drop_role_args clone() { + return new drop_role_args(this); } - public short getMax_parts() { - return this.max_parts; + public String getRole_name() { + return this.role_name; } - public void setMax_parts(short max_parts) { - this.max_parts = max_parts; - this.__isset.max_parts = true; + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void unsetMax_parts() { - this.__isset.max_parts = false; + public void unsetRole_name() { + this.role_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 role_name is set (has been asigned a value) and false otherwise + public boolean isSetRole_name() { + return this.role_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: - if (value == null) { - unsetPart_vals(); - } else { - setPart_vals((List)value); - } - break; - - case MAX_PARTS: + case ROLE_NAME: if (value == null) { - unsetMax_parts(); + unsetRole_name(); } else { - setMax_parts((Short)value); + setRole_name((String)value); } break; @@ -18696,17 +31420,8 @@ 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 MAX_PARTS: - return new Short(getMax_parts()); + case ROLE_NAME: + return getRole_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -18716,14 +31431,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 TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); + case ROLE_NAME: + return isSetRole_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -18733,48 +31442,21 @@ 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_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_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_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.max_parts != that.max_parts) + if (!this.role_name.equals(that.role_name)) return false; } @@ -18797,41 +31479,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 TBL_NAME: + case ROLE_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.role_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -18851,66 +31501,27 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - 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(); - } + if (this.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_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_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("null"); - } else { - sb.append(this.tbl_name); - } - first = false; - if (!first) sb.append(", "); - sb.append("part_vals:"); - if (this.part_vals == null) { + sb.append("role_name:"); + if (this.role_name == null) { sb.append("null"); } else { - sb.append(this.part_vals); + sb.append(this.role_name); } first = false; - if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); - first = false; sb.append(")"); return sb.toString(); } @@ -18922,95 +31533,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() { @@ -19036,7 +31629,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Boolean)value); } break; @@ -19056,7 +31649,7 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); @@ -19082,21 +31675,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; } @@ -19129,19 +31722,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); } @@ -19170,13 +31753,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); @@ -19189,15 +31766,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:"); @@ -19218,203 +31791,183 @@ } - 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 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 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 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))); }}); 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) { 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; + 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; } /** * 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; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public add_role_member_args(add_role_member_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_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; } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; + __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_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; + public add_role_member_args clone() { + return new add_role_member_args(this); } - // Returns true if field db_name is set (has been asigned a value) and false otherwise - public boolean isSetDb_name() { - return this.db_name != null; + public String getRole_name() { + return this.role_name; } - public String getTbl_name() { - return this.tbl_name; + public void setRole_name(String role_name) { + this.role_name = role_name; } - public void setTbl_name(String tbl_name) { - this.tbl_name = tbl_name; + public void unsetRole_name() { + this.role_name = null; } - public void unsetTbl_name() { - this.tbl_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; } - // 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 getUser_name() { + return this.user_name; } - public int getPart_valsSize() { - return (this.part_vals == null) ? 0 : this.part_vals.size(); + public void setUser_name(String user_name) { + this.user_name = user_name; } - public java.util.Iterator getPart_valsIterator() { - return (this.part_vals == null) ? null : this.part_vals.iterator(); + public void unsetUser_name() { + this.user_name = null; } - public void addToPart_vals(String elem) { - if (this.part_vals == null) { - this.part_vals = new ArrayList(); - } - this.part_vals.add(elem); + // Returns true if field user_name is set (has been asigned a value) and false otherwise + public boolean isSetUser_name() { + return this.user_name != null; } - public List getPart_vals() { - return this.part_vals; + public boolean isIs_role() { + return this.is_role; } - public void setPart_vals(List part_vals) { - this.part_vals = part_vals; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - public void unsetPart_vals() { - this.part_vals = null; + public void unsetIs_role() { + this.__isset.is_role = 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 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 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 USER_NAME: if (value == null) { - unsetTbl_name(); + unsetUser_name(); } else { - setTbl_name((String)value); + setUser_name((String)value); } break; - case PART_VALS: + case IS_ROLE: if (value == null) { - unsetPart_vals(); + unsetIs_role(); } else { - setPart_vals((List)value); + setIs_role((Boolean)value); } break; - case MAX_PARTS: + case IS_GROUP: if (value == null) { - unsetMax_parts(); + unsetIs_group(); } else { - setMax_parts((Short)value); + setIs_group((Boolean)value); } break; @@ -19425,17 +31978,17 @@ 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()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -19445,14 +31998,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 DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case PART_VALS: - return isSetPart_vals(); - case MAX_PARTS: - return isSetMax_parts(); + case ROLE_NAME: + return isSetRole_name(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -19462,48 +32015,48 @@ 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; } @@ -19526,41 +32079,32 @@ } 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); } @@ -19580,29 +32124,21 @@ 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.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_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(); - } + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); + 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(); @@ -19610,35 +32146,31 @@ @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("null"); - } else { - sb.append(this.part_vals); - } + sb.append("is_role:"); + sb.append(this.is_role); first = false; if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); + sb.append("is_group:"); + sb.append(this.is_group); first = false; sb.append(")"); return sb.toString(); @@ -19651,95 +32183,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(); - } - - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + 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() { @@ -19765,7 +32279,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((List)value); + setSuccess((Boolean)value); } break; @@ -19785,7 +32299,7 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { case SUCCESS: - return getSuccess(); + return new Boolean(isSuccess()); case O1: return getO1(); @@ -19811,21 +32325,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; } @@ -19858,18 +32372,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); } @@ -19898,13 +32403,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); @@ -19917,15 +32416,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:"); @@ -19946,183 +32441,183 @@ } - 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 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; + 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 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, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(ROLE_NAME, new FieldMetaData("role_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(FILTER, new FieldMetaData("filter", TFieldRequirementType.DEFAULT, + put(USER_NAME, new FieldMetaData("user_name", TFieldRequirementType.DEFAULT, 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))); }}); 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) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.filter = filter; - this.max_parts = max_parts; - this.__isset.max_parts = true; + 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; } /** * 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; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; + public remove_role_member_args(remove_role_member_args other) { + if (other.isSetRole_name()) { + this.role_name = other.role_name; } - if (other.isSetFilter()) { - this.filter = other.filter; + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - __isset.max_parts = other.__isset.max_parts; - this.max_parts = other.max_parts; + __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_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 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 USER_NAME: if (value == null) { - unsetTbl_name(); + unsetUser_name(); } else { - setTbl_name((String)value); + setUser_name((String)value); } break; - case FILTER: + case IS_ROLE: if (value == null) { - unsetFilter(); + unsetIs_role(); } else { - setFilter((String)value); + setIs_role((Boolean)value); } break; - case MAX_PARTS: + case IS_GROUP: if (value == null) { - unsetMax_parts(); + unsetIs_group(); } else { - setMax_parts((Short)value); + setIs_group((Boolean)value); } break; @@ -20133,17 +32628,17 @@ 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()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -20153,14 +32648,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 DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case FILTER: - return isSetFilter(); - case MAX_PARTS: - return isSetMax_parts(); + case ROLE_NAME: + return isSetRole_name(); + case USER_NAME: + return isSetUser_name(); + case IS_ROLE: + return isSetIs_role(); + case IS_GROUP: + return isSetIs_group(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -20170,48 +32665,48 @@ 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; } @@ -20234,31 +32729,32 @@ } 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); } @@ -20278,23 +32774,21 @@ 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.role_name != null) { + oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC); + oprot.writeString(this.role_name); oprot.writeFieldEnd(); } - if (this.filter != null) { - oprot.writeFieldBegin(FILTER_FIELD_DESC); - oprot.writeString(this.filter); + if (this.user_name != null) { + oprot.writeFieldBegin(USER_NAME_FIELD_DESC); + oprot.writeString(this.user_name); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_PARTS_FIELD_DESC); - oprot.writeI16(this.max_parts); + 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(); @@ -20302,35 +32796,31 @@ @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("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("filter:"); - if (this.filter == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.filter); + sb.append(this.user_name); } first = false; if (!first) sb.append(", "); - sb.append("max_parts:"); - sb.append(this.max_parts); + 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(); @@ -20343,105 +32833,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() { @@ -20461,30 +32923,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; @@ -20496,14 +32941,6 @@ } break; - case O2: - if (value == null) { - unsetO2(); - } else { - setO2((NoSuchObjectException)value); - } - break; - default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -20512,14 +32949,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!"); } @@ -20532,8 +32966,6 @@ return isSetSuccess(); case O1: return isSetO1(); - case O2: - return isSetO2(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -20543,21 +32975,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; } @@ -20570,15 +33002,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; } @@ -20599,19 +33022,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); } @@ -20624,14 +33037,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; @@ -20648,22 +33053,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(); @@ -20671,15 +33066,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:"); @@ -20689,14 +33080,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(); } @@ -20708,144 +33091,148 @@ } - 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_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 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; + 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(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + put(PRINCIPLA_NAME, new FieldMetaData("principla_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); + 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(alter_partition_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_user_grant_args.class, metaDataMap); } - public alter_partition_args() { + public list_security_user_grant_args() { } - public alter_partition_args( - String db_name, - String tbl_name, - Partition new_part) + public list_security_user_grant_args( + String principla_name, + boolean is_role, + boolean is_group) { this(); - this.db_name = db_name; - this.tbl_name = tbl_name; - this.new_part = new_part; + 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 alter_partition_args(alter_partition_args other) { - if (other.isSetDb_name()) { - this.db_name = other.db_name; - } - if (other.isSetTbl_name()) { - this.tbl_name = other.tbl_name; - } - if (other.isSetNew_part()) { - this.new_part = new Partition(other.new_part); + public 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 alter_partition_args clone() { - return new alter_partition_args(this); + public list_security_user_grant_args clone() { + return new list_security_user_grant_args(this); } - public String getDb_name() { - return this.db_name; + public String getPrincipla_name() { + return this.principla_name; } - public void setDb_name(String db_name) { - this.db_name = db_name; + public void setPrincipla_name(String principla_name) { + this.principla_name = principla_name; } - public void unsetDb_name() { - this.db_name = null; + public void unsetPrincipla_name() { + this.principla_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 principla_name is set (has been asigned a value) and false otherwise + public boolean isSetPrincipla_name() { + return this.principla_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: + case PRINCIPLA_NAME: if (value == null) { - unsetDb_name(); + unsetPrincipla_name(); } else { - setDb_name((String)value); + setPrincipla_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 NEW_PART: + case IS_GROUP: if (value == null) { - unsetNew_part(); + unsetIs_group(); } else { - setNew_part((Partition)value); + setIs_group((Boolean)value); } break; @@ -20856,14 +33243,14 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); + case PRINCIPLA_NAME: + return getPrincipla_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()); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -20873,12 +33260,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 DB_NAME: - return isSetDb_name(); - case TBL_NAME: - return isSetTbl_name(); - case NEW_PART: - return isSetNew_part(); + 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!"); } @@ -20888,39 +33275,39 @@ 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_security_user_grant_args) + return this.equals((list_security_user_grant_args)that); return false; } - public boolean equals(alter_partition_args that) { + public boolean equals(list_security_user_grant_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_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.db_name.equals(that.db_name)) + if (!this.principla_name.equals(that.principla_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; } @@ -20943,24 +33330,25 @@ } switch (field.id) { - case DB_NAME: + case PRINCIPLA_NAME: if (field.type == TType.STRING) { - this.db_name = iprot.readString(); + this.principla_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); } @@ -20980,52 +33368,40 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.db_name != null) { - oprot.writeFieldBegin(DB_NAME_FIELD_DESC); - oprot.writeString(this.db_name); - oprot.writeFieldEnd(); - } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); - oprot.writeFieldEnd(); - } - if (this.new_part != null) { - oprot.writeFieldBegin(NEW_PART_FIELD_DESC); - this.new_part.write(oprot); + 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("alter_partition_args("); + StringBuilder sb = new StringBuilder("list_security_user_grant_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("principla_name:"); + if (this.principla_name == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.principla_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("null"); - } else { - sb.append(this.new_part); - } + sb.append("is_group:"); + sb.append(this.is_group); first = false; sb.append(")"); return sb.toString(); @@ -21038,65 +33414,102 @@ } - 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_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 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, SecurityUser.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_security_user_grant_result.class, metaDataMap); + } + + public list_security_user_grant_result() { + } + + public list_security_user_grant_result( + List success, + MetaException o1) + { + this(); + this.success = success; + this.o1 = o1; + } + + /** + * Performs a deep copy on other. + */ + public list_security_user_grant_result(list_security_user_grant_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (SecurityUser other_element : other.success) { + __this__success.add(new SecurityUser(other_element)); + } + this.success = __this__success; + } + if (other.isSetO1()) { + this.o1 = new MetaException(other.o1); + } + } + + @Override + public list_security_user_grant_result clone() { + return new list_security_user_grant_result(this); } - public alter_partition_result() { + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public alter_partition_result( - InvalidOperationException o1, - MetaException o2) - { - this(); - this.o1 = o1; - this.o2 = o2; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - /** - * Performs a deep copy on other. - */ - public alter_partition_result(alter_partition_result other) { - if (other.isSetO1()) { - this.o1 = new InvalidOperationException(other.o1); - } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + public void addToSuccess(SecurityUser elem) { + if (this.success == null) { + this.success = new ArrayList(); } + this.success.add(elem); } - @Override - public alter_partition_result clone() { - return new alter_partition_result(this); + public List getSuccess() { + return this.success; } - public InvalidOperationException getO1() { + 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(InvalidOperationException o1) { + public void setO1(MetaException o1) { this.o1 = o1; } @@ -21109,38 +33522,21 @@ 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: + 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; @@ -21151,12 +33547,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!"); } @@ -21165,10 +33561,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!"); } @@ -21178,15 +33574,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_security_user_grant_result) + return this.equals((list_security_user_grant_result)that); return false; } - public boolean equals(alter_partition_result that) { + public boolean equals(list_security_user_grant_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) { @@ -21196,15 +33601,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; } @@ -21224,18 +33620,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 _list203 = iprot.readListBegin(); + this.success = new ArrayList(_list203.size); + for (int _i204 = 0; _i204 < _list203.size; ++_i204) + { + SecurityUser _elem205; + _elem205 = new SecurityUser(); + _elem205.read(iprot); + this.success.add(_elem205); + } + 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); } @@ -21254,14 +33660,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 (SecurityUser _iter206 : this.success) { + _iter206.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(); @@ -21269,22 +33681,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("alter_partition_result("); + StringBuilder sb = new StringBuilder("list_security_user_grant_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(")"); @@ -21298,109 +33710,183 @@ } - 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_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 name; - public static final int NAME = 1; - private String defaultValue; - public static final int DEFAULTVALUE = 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 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(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + put(PRINCIPAL_NAME, new FieldMetaData("principal_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(DEFAULTVALUE, new FieldMetaData("defaultValue", TFieldRequirementType.DEFAULT, + 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(get_config_value_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_db_grant_args.class, metaDataMap); } - public get_config_value_args() { + public list_security_db_grant_args() { } - public get_config_value_args( - String name, - String defaultValue) + public list_security_db_grant_args( + String principal_name, + boolean is_group, + boolean is_role, + String db_name) { this(); - this.name = name; - this.defaultValue = defaultValue; + 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; + } + + public boolean isIs_group() { + return this.is_group; } - /** - * 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 void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; } - @Override - public get_config_value_args clone() { - return new get_config_value_args(this); + public void unsetIs_group() { + this.__isset.is_group = false; } - public String getName() { - return this.name; + // 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 setName(String name) { - this.name = name; + public boolean isIs_role() { + return this.is_role; } - public void unsetName() { - this.name = null; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - // Returns true if field name is set (has been asigned a value) and false otherwise - public boolean isSetName() { - return this.name != null; + public void unsetIs_role() { + this.__isset.is_role = false; } - public String getDefaultValue() { - return this.defaultValue; + // 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 setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; + public String getDb_name() { + return this.db_name; } - public void unsetDefaultValue() { - this.defaultValue = null; + public void setDb_name(String db_name) { + this.db_name = db_name; } - // Returns true if field defaultValue is set (has been asigned a value) and false otherwise - public boolean isSetDefaultValue() { - return this.defaultValue != 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 void setFieldValue(int fieldID, Object value) { switch (fieldID) { - case NAME: + case PRINCIPAL_NAME: if (value == null) { - unsetName(); + unsetPrincipal_name(); } else { - setName((String)value); + setPrincipal_name((String)value); } break; - case DEFAULTVALUE: + case IS_GROUP: if (value == null) { - unsetDefaultValue(); + unsetIs_group(); } else { - setDefaultValue((String)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; @@ -21411,11 +33897,17 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case NAME: - return getName(); + case PRINCIPAL_NAME: + return getPrincipal_name(); - case DEFAULTVALUE: - return getDefaultValue(); + 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!"); @@ -21425,10 +33917,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 DEFAULTVALUE: - return isSetDefaultValue(); + 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!"); } @@ -21438,30 +33934,48 @@ 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_db_grant_args) + return this.equals((list_security_db_grant_args)that); return false; } - public boolean equals(get_config_value_args that) { + public boolean equals(list_security_db_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_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.name.equals(that.name)) + if (!this.principal_name.equals(that.principal_name)) return false; } - boolean this_present_defaultValue = true && this.isSetDefaultValue(); - boolean that_present_defaultValue = true && that.isSetDefaultValue(); - if (this_present_defaultValue || that_present_defaultValue) { - if (!(this_present_defaultValue && that_present_defaultValue)) + boolean this_present_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; + } + + 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; } @@ -21484,16 +33998,32 @@ } switch (field.id) { - case NAME: + case PRINCIPAL_NAME: if (field.type == TType.STRING) { - this.name = iprot.readString(); + this.principal_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DEFAULTVALUE: + 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.defaultValue = iprot.readString(); + this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -21513,14 +34043,20 @@ validate(); oprot.writeStructBegin(STRUCT_DESC); - if (this.name != null) { - oprot.writeFieldBegin(NAME_FIELD_DESC); - oprot.writeString(this.name); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); } - if (this.defaultValue != null) { - oprot.writeFieldBegin(DEFAULT_VALUE_FIELD_DESC); - oprot.writeString(this.defaultValue); + 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(); @@ -21529,22 +34065,30 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_config_value_args("); + StringBuilder sb = new StringBuilder("list_security_db_grant_args("); boolean first = true; - sb.append("name:"); - if (this.name == null) { + sb.append("principal_name:"); + if (this.principal_name == null) { sb.append("null"); } else { - sb.append(this.name); + sb.append(this.principal_name); } first = false; if (!first) sb.append(", "); - sb.append("defaultValue:"); - if (this.defaultValue == 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.defaultValue); + sb.append(this.db_name); } first = false; sb.append(")"); @@ -21558,14 +34102,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_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 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(); @@ -21574,21 +34118,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, SecurityDB.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_db_grant_result.class, metaDataMap); } - public get_config_value_result() { + public list_security_db_grant_result() { } - public get_config_value_result( - String success, - ConfigValSecurityException o1) + public list_security_db_grant_result( + List success, + MetaException o1) { this(); this.success = success; @@ -21598,25 +34143,44 @@ /** * Performs a deep copy on other. */ - public get_config_value_result(get_config_value_result other) { + public list_security_db_grant_result(list_security_db_grant_result other) { if (other.isSetSuccess()) { - this.success = other.success; + List __this__success = new ArrayList(); + for (SecurityDB other_element : other.success) { + __this__success.add(new SecurityDB(other_element)); + } + this.success = __this__success; } if (other.isSetO1()) { - this.o1 = new 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_db_grant_result clone() { + return new list_security_db_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(SecurityDB 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; } @@ -21629,11 +34193,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; } @@ -21652,7 +34216,7 @@ if (value == null) { unsetSuccess(); } else { - setSuccess((String)value); + setSuccess((List)value); } break; @@ -21660,7 +34224,7 @@ if (value == null) { unsetO1(); } else { - setO1((ConfigValSecurityException)value); + setO1((MetaException)value); } break; @@ -21698,12 +34262,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_db_grant_result) + return this.equals((list_security_db_grant_result)that); return false; } - public boolean equals(get_config_value_result that) { + public boolean equals(list_security_db_grant_result that) { if (that == null) return false; @@ -21745,15 +34309,26 @@ switch (field.id) { case SUCCESS: - if (field.type == TType.STRING) { - this.success = iprot.readString(); + if (field.type == TType.LIST) { + { + TList _list207 = iprot.readListBegin(); + this.success = new ArrayList(_list207.size); + for (int _i208 = 0; _i208 < _list207.size; ++_i208) + { + SecurityDB _elem209; + _elem209 = new SecurityDB(); + _elem209.read(iprot); + this.success.add(_elem209); + } + 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); @@ -21775,7 +34350,13 @@ if (this.isSetSuccess()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - oprot.writeString(this.success); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityDB _iter210 : this.success) { + _iter210.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } else if (this.isSetO1()) { oprot.writeFieldBegin(O1_FIELD_DESC); @@ -21788,7 +34369,7 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("get_config_value_result("); + StringBuilder sb = new StringBuilder("list_security_db_grant_result("); boolean first = true; sb.append("success:"); @@ -21817,320 +34398,218 @@ } - 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_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_vals_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_table_grant_args.class, metaDataMap); } - public partition_name_to_vals_args() { + public list_security_table_grant_args() { } - public partition_name_to_vals_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_vals_args(partition_name_to_vals_args other) { - if (other.isSetPart_name()) { - this.part_name = other.part_name; - } - } - - @Override - public partition_name_to_vals_args clone() { - return new partition_name_to_vals_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_vals_args) - return this.equals((partition_name_to_vals_args)that); - return false; - } - - public boolean equals(partition_name_to_vals_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; + public list_security_table_grant_args(list_security_table_grant_args other) { + if (other.isSetPrincipal_name()) { + this.principal_name = other.principal_name; } - - 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(); + __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; } - 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(); + if (other.isSetTable_name()) { + this.table_name = other.table_name; } - oprot.writeFieldStop(); - oprot.writeStructEnd(); } @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.part_name); - } - first = false; - sb.append(")"); - return sb.toString(); + public list_security_table_grant_args clone() { + return new list_security_table_grant_args(this); } - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values + public String getPrincipal_name() { + return this.principal_name; } - } - - 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 List success; - public static final int SUCCESS = 0; - private MetaException o1; - public static final int O1 = 1; + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + public void unsetPrincipal_name() { + this.principal_name = null; } - 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))); - }}); + // 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; + } - static { - FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); + public boolean isIs_group() { + return this.is_group; } - public partition_name_to_vals_result() { + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; } - public partition_name_to_vals_result( - List success, - MetaException o1) - { - this(); - this.success = success; - this.o1 = o1; + public void unsetIs_group() { + this.__isset.is_group = false; } - /** - * Performs a deep copy on other. - */ - public partition_name_to_vals_result(partition_name_to_vals_result other) { - if (other.isSetSuccess()) { - List __this__success = new ArrayList(); - for (String other_element : other.success) { - __this__success.add(other_element); - } - this.success = __this__success; - } - if (other.isSetO1()) { - this.o1 = new MetaException(other.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; } - @Override - public partition_name_to_vals_result clone() { - return new partition_name_to_vals_result(this); + public boolean isIs_role() { + return this.is_role; } - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public void setIs_role(boolean is_role) { + this.is_role = is_role; + this.__isset.is_role = true; } - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); + public void unsetIs_role() { + this.__isset.is_role = false; } - public void addToSuccess(String elem) { - if (this.success == null) { - this.success = new ArrayList(); - } - this.success.add(elem); + // 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 List getSuccess() { - return this.success; + public String getDb_name() { + return this.db_name; } - public void setSuccess(List success) { - this.success = success; + public void setDb_name(String db_name) { + this.db_name = db_name; } - public void unsetSuccess() { - this.success = null; + public void unsetDb_name() { + this.db_name = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; + // Returns true if field db_name is set (has been asigned a value) and false otherwise + public boolean isSetDb_name() { + return this.db_name != null; } - public 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((List)value); + setPrincipal_name((String)value); } break; - case O1: + case IS_GROUP: if (value == null) { - unsetO1(); + unsetIs_group(); } else { - setO1((MetaException)value); + setIs_group((Boolean)value); + } + break; + + case IS_ROLE: + if (value == null) { + unsetIs_role(); + } else { + setIs_role((Boolean)value); + } + break; + + case DB_NAME: + if (value == null) { + unsetDb_name(); + } else { + setDb_name((String)value); + } + break; + + case TABLE_NAME: + if (value == null) { + unsetTable_name(); + } else { + setTable_name((String)value); } break; @@ -22141,11 +34620,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!"); @@ -22155,10 +34643,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!"); } @@ -22168,30 +34662,57 @@ 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_table_grant_args) + return this.equals((list_security_table_grant_args)that); return false; } - public boolean equals(partition_name_to_vals_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.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; - if (!this.o1.equals(that.o1)) + } + + boolean this_present_table_name = true && this.isSetTable_name(); + boolean that_present_table_name = true && that.isSetTable_name(); + if (this_present_table_name || that_present_table_name) { + if (!(this_present_table_name && that_present_table_name)) + return false; + if (!this.table_name.equals(that.table_name)) return false; } @@ -22214,27 +34735,39 @@ } switch (field.id) { - 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) - { - String _elem129; - _elem129 = iprot.readString(); - this.success.add(_elem129); - } - iprot.readListEnd(); - } + 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); } @@ -22251,21 +34784,28 @@ } public void write(TProtocol oprot) throws TException { - oprot.writeStructBegin(STRUCT_DESC); + validate(); - if (this.isSetSuccess()) { - oprot.writeFieldBegin(SUCCESS_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter130 : this.success) { - oprot.writeString(_iter130); - } - oprot.writeListEnd(); - } + oprot.writeStructBegin(STRUCT_DESC); + if (this.principal_name != null) { + oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC); + oprot.writeString(this.principal_name); oprot.writeFieldEnd(); - } else if (this.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + oprot.writeFieldBegin(IS_GROUP_FIELD_DESC); + oprot.writeBool(this.is_group); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(IS_ROLE_FIELD_DESC); + oprot.writeBool(this.is_role); + oprot.writeFieldEnd(); + if (this.db_name != null) { + oprot.writeFieldBegin(DB_NAME_FIELD_DESC); + oprot.writeString(this.db_name); + oprot.writeFieldEnd(); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -22274,22 +34814,38 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_vals_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(")"); @@ -22303,74 +34859,129 @@ } - 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_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 String part_name; - public static final int PART_NAME = 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(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); + 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(partition_name_to_spec_args.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_table_grant_result.class, metaDataMap); } - public partition_name_to_spec_args() { + public list_security_table_grant_result() { } - public partition_name_to_spec_args( - String part_name) + public list_security_table_grant_result( + List success, + MetaException o1) { this(); - this.part_name = part_name; + this.success = success; + this.o1 = o1; } /** * Performs a deep copy on other. */ - public partition_name_to_spec_args(partition_name_to_spec_args other) { - if (other.isSetPart_name()) { - this.part_name = other.part_name; + 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.isSetO1()) { + this.o1 = new MetaException(other.o1); } } @Override - public partition_name_to_spec_args clone() { - return new partition_name_to_spec_args(this); + public list_security_table_grant_result clone() { + return new list_security_table_grant_result(this); } - public String getPart_name() { - return this.part_name; + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); } - public void setPart_name(String part_name) { - this.part_name = part_name; + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); } - public void unsetPart_name() { - this.part_name = null; + public void addToSuccess(SecurityTablePartition elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); } - // Returns true if field part_name is set (has been asigned a value) and false otherwise - public boolean isSetPart_name() { - return this.part_name != null; + public List getSuccess() { + return this.success; + } + + public void setSuccess(List success) { + this.success = success; + } + + public void unsetSuccess() { + this.success = null; + } + + // Returns true if field success is set (has been asigned a value) and false otherwise + public boolean isSetSuccess() { + return this.success != null; + } + + public 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 PART_NAME: + case SUCCESS: if (value == null) { - unsetPart_name(); + unsetSuccess(); } else { - setPart_name((String)value); + setSuccess((List)value); + } + break; + + case O1: + if (value == null) { + unsetO1(); + } else { + setO1((MetaException)value); } break; @@ -22381,8 +34992,11 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case PART_NAME: - return getPart_name(); + case SUCCESS: + return getSuccess(); + + case O1: + return getO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -22392,8 +35006,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 PART_NAME: - return isSetPart_name(); + case SUCCESS: + return isSetSuccess(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -22403,21 +35019,30 @@ public boolean equals(Object that) { if (that == null) return false; - if (that instanceof partition_name_to_spec_args) - return this.equals((partition_name_to_spec_args)that); + if (that instanceof list_security_table_grant_result) + return this.equals((list_security_table_grant_result)that); return false; } - public boolean equals(partition_name_to_spec_args that) { + public boolean equals(list_security_table_grant_result that) { if (that == null) return false; - boolean this_present_part_name = true && this.isSetPart_name(); - boolean that_present_part_name = true && that.isSetPart_name(); - if (this_present_part_name || that_present_part_name) { - if (!(this_present_part_name && that_present_part_name)) + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.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.part_name.equals(that.part_name)) + if (!this.o1.equals(that.o1)) return false; } @@ -22440,9 +35065,28 @@ } switch (field.id) { - case PART_NAME: - if (field.type == TType.STRING) { - this.part_name = iprot.readString(); + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list211 = iprot.readListBegin(); + this.success = new ArrayList(_list211.size); + for (int _i212 = 0; _i212 < _list211.size; ++_i212) + { + SecurityTablePartition _elem213; + _elem213 = new SecurityTablePartition(); + _elem213.read(iprot); + this.success.add(_elem213); + } + 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); } @@ -22459,12 +35103,21 @@ } public void write(TProtocol oprot) throws TException { - validate(); - oprot.writeStructBegin(STRUCT_DESC); - if (this.part_name != null) { - oprot.writeFieldBegin(PART_NAME_FIELD_DESC); - oprot.writeString(this.part_name); + + if (this.isSetSuccess()) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); + for (SecurityTablePartition _iter214 : this.success) { + _iter214.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } else if (this.isSetO1()) { + oprot.writeFieldBegin(O1_FIELD_DESC); + this.o1.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -22473,14 +35126,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_spec_args("); + StringBuilder sb = new StringBuilder("list_security_table_grant_result("); boolean first = true; - sb.append("part_name:"); - if (this.part_name == null) { + sb.append("success:"); + if (this.success == null) { sb.append("null"); } else { - sb.append(this.part_name); + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("o1:"); + if (this.o1 == null) { + sb.append("null"); + } else { + sb.append(this.o1); } first = false; sb.append(")"); @@ -22494,134 +35155,253 @@ } - 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); + 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 Map success; - public static final int SUCCESS = 0; - private MetaException o1; - public static final int O1 = 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 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 MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", 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(partition_name_to_spec_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_partition_grant_args.class, metaDataMap); } - public partition_name_to_spec_result() { + public list_security_partition_grant_args() { } - public partition_name_to_spec_result( - Map success, - MetaException o1) + 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.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 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 list_security_partition_grant_args(list_security_partition_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; + } + } - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); + @Override + public list_security_partition_grant_args clone() { + return new list_security_partition_grant_args(this); + } - String __this__success_copy_key = other_element_key; + public String getPrincipal_name() { + return this.principal_name; + } - String __this__success_copy_value = other_element_value; + public void setPrincipal_name(String principal_name) { + this.principal_name = principal_name; + } - __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 void unsetPrincipal_name() { + this.principal_name = null; } - @Override - public partition_name_to_spec_result clone() { - return new partition_name_to_spec_result(this); + // 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 int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); + public boolean isIs_group() { + return this.is_group; } - public void putToSuccess(String key, String val) { - if (this.success == null) { - this.success = new HashMap(); - } - this.success.put(key, val); + public void setIs_group(boolean is_group) { + this.is_group = is_group; + this.__isset.is_group = true; } - public Map getSuccess() { - return this.success; + 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 setSuccess(Map success) { - this.success = success; + public void setTable_name(String table_name) { + this.table_name = table_name; } - public void unsetSuccess() { - this.success = null; + public void unsetTable_name() { + this.table_name = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise - public boolean isSetSuccess() { - return this.success != null; + // Returns true if field table_name is set (has been asigned a value) and false otherwise + public boolean isSetTable_name() { + return this.table_name != null; } - public MetaException getO1() { - return this.o1; + public String getPart_name() { + return this.part_name; } - public void setO1(MetaException o1) { - this.o1 = o1; + public void setPart_name(String part_name) { + this.part_name = part_name; } - public void unsetO1() { - this.o1 = null; + public void unsetPart_name() { + this.part_name = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise - public boolean isSetO1() { - return this.o1 != null; + // Returns true if field part_name is set (has been asigned a value) and false otherwise + public boolean isSetPart_name() { + return this.part_name != null; } public void 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; + + case PART_NAME: + if (value == null) { + unsetPart_name(); + } else { + setPart_name((String)value); } break; @@ -22632,11 +35412,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 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(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -22646,10 +35438,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 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!"); } @@ -22659,30 +35459,66 @@ 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_partition_grant_args) + return this.equals((list_security_partition_grant_args)that); return false; } - public boolean equals(partition_name_to_spec_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_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; } @@ -22705,29 +35541,46 @@ } 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); + } + break; + case PART_NAME: + if (field.type == TType.STRING) { + this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -22744,22 +35597,33 @@ } 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(); + } + 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.isSetO1()) { - oprot.writeFieldBegin(O1_FIELD_DESC); - this.o1.write(oprot); + } + if (this.table_name != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeString(this.table_name); + oprot.writeFieldEnd(); + } + if (this.part_name != null) { + oprot.writeFieldBegin(PART_NAME_FIELD_DESC); + oprot.writeString(this.part_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -22768,22 +35632,46 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("partition_name_to_spec_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("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; sb.append(")"); @@ -22797,109 +35685,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_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 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_partition_grant_result.class, metaDataMap); } - public add_index_args() { + public list_security_partition_grant_result() { } - public add_index_args( - Index new_index, - Table index_table) + public list_security_partition_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_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.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_partition_grant_result clone() { + return new list_security_partition_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; @@ -22910,11 +35818,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!"); @@ -22924,10 +35832,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!"); } @@ -22937,30 +35845,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_partition_grant_result) + return this.equals((list_security_partition_grant_result)that); return false; } - public boolean equals(add_index_args that) { + public boolean equals(list_security_partition_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; } @@ -22983,18 +35891,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 _list215 = iprot.readListBegin(); + this.success = new ArrayList(_list215.size); + for (int _i216 = 0; _i216 < _list215.size; ++_i216) + { + SecurityTablePartition _elem217; + _elem217 = new SecurityTablePartition(); + _elem217.read(iprot); + this.success.add(_elem217); + } + 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); } @@ -23011,17 +35929,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 _iter218 : this.success) { + _iter218.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(); @@ -23030,22 +35952,22 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_index_args("); + StringBuilder sb = new StringBuilder("list_security_partition_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(")"); @@ -23059,179 +35981,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_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 COLUMN_NAME_FIELD_DESC = new TField("column_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 column_name; + public static final int COLUMN_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(COLUMN_NAME, new FieldMetaData("column_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); }}); static { - FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); + FieldMetaData.addStructMetaDataMap(list_security_column_grant_args.class, metaDataMap); } - public add_index_result() { + public list_security_column_grant_args() { } - public add_index_result( - Index success, - InvalidObjectException o1, - AlreadyExistsException o2, - MetaException o3) + public list_security_column_grant_args( + String principal_name, + boolean is_group, + boolean is_role, + String db_name, + String table_name, + String column_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.column_name = column_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_column_grant_args(list_security_column_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.isSetColumn_name()) { + this.column_name = other.column_name; } } @Override - public add_index_result clone() { - return new add_index_result(this); + public list_security_column_grant_args clone() { + return new list_security_column_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 o3 is set (has been asigned a value) and false otherwise - public boolean isSetO3() { - return this.o3 != 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 getColumn_name() { + return this.column_name; + } + + public void setColumn_name(String column_name) { + this.column_name = column_name; + } + + public void unsetColumn_name() { + this.column_name = null; + } + + // Returns true if field column_name is set (has been asigned a value) and false otherwise + public boolean isSetColumn_name() { + return this.column_name != null; } public void 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 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 O1: + case DB_NAME: if (value == null) { - unsetO1(); + unsetDb_name(); } else { - setO1((InvalidObjectException)value); + setDb_name((String)value); } break; - case O2: + case TABLE_NAME: if (value == null) { - unsetO2(); + unsetTable_name(); } else { - setO2((AlreadyExistsException)value); + setTable_name((String)value); } break; - case O3: + case COLUMN_NAME: if (value == null) { - unsetO3(); + unsetColumn_name(); } else { - setO3((MetaException)value); + setColumn_name((String)value); } break; @@ -23242,17 +36238,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 COLUMN_NAME: + return getColumn_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -23262,14 +36264,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 COLUMN_NAME: + return isSetColumn_name(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -23279,48 +36285,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_column_grant_args) + return this.equals((list_security_column_grant_args)that); return false; } - public boolean equals(add_index_result that) { + public boolean equals(list_security_column_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_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; } @@ -23343,34 +36367,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 COLUMN_NAME: + if (field.type == TType.STRING) { + this.column_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } @@ -23387,23 +36423,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.column_name != null) { + oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC); + oprot.writeString(this.column_name); oprot.writeFieldEnd(); } oprot.writeFieldStop(); @@ -23412,38 +36458,46 @@ @Override public String toString() { - StringBuilder sb = new StringBuilder("add_index_result("); + StringBuilder sb = new StringBuilder("list_security_column_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("column_name:"); + if (this.column_name == null) { sb.append("null"); } else { - sb.append(this.o3); + sb.append(this.column_name); } first = false; sb.append(")"); @@ -23457,181 +36511,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; @@ -23642,17 +36644,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!"); @@ -23662,14 +36658,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!"); } @@ -23679,48 +36671,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; } @@ -23736,38 +36710,35 @@ 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 INDEX_NAME: - if (field.type == TType.STRING) { - this.index_name = iprot.readString(); + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) + { + case SUCCESS: + if (field.type == TType.LIST) { + { + TList _list219 = iprot.readListBegin(); + this.success = new ArrayList(_list219.size); + for (int _i220 = 0; _i220 < _list219.size; ++_i220) + { + SecurityColumn _elem221; + _elem221 = new SecurityColumn(); + _elem221.read(iprot); + this.success.add(_elem221); + } + 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); } @@ -23784,63 +36755,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 _iter222 : this.success) { + _iter222.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(); } @@ -23852,146 +36807,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); + FieldMetaData.addStructMetaDataMap(grant_privileges_args.class, metaDataMap); } - public drop_index_by_name_result() { + public grant_privileges_args() { } - public drop_index_by_name_result( - boolean success, - NoSuchObjectException o1, - MetaException o2) + public grant_privileges_args( + String user_name, + boolean is_role, + boolean is_group, + PrivilegeBag privileges, + String grantor) { this(); - this.success = success; - this.__isset.success = true; - 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; + this.grantor = grantor; } /** * 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); + public grant_privileges_args(grant_privileges_args other) { + if (other.isSetUser_name()) { + this.user_name = other.user_name; } - if (other.isSetO2()) { - this.o2 = new MetaException(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); + } + if (other.isSetGrantor()) { + this.grantor = other.grantor; } } @Override - public drop_index_by_name_result clone() { - return new drop_index_by_name_result(this); + public grant_privileges_args clone() { + return new grant_privileges_args(this); } - public boolean isSuccess() { - return this.success; + public String getUser_name() { + return this.user_name; } - public void setSuccess(boolean success) { - this.success = success; - this.__isset.success = true; + public void setUser_name(String user_name) { + this.user_name = user_name; } - public void unsetSuccess() { - this.__isset.success = false; + 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.__isset.success; + // 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 NoSuchObjectException getO1() { - return this.o1; + public boolean isIs_role() { + return this.is_role; } - public void setO1(NoSuchObjectException o1) { - this.o1 = o1; + public void setIs_role(boolean is_role) { + this.is_role = is_role; + 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 MetaException getO2() { - return this.o2; + public boolean isIs_group() { + return this.is_group; } - public void setO2(MetaException o2) { - this.o2 = o2; + 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 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 String getGrantor() { + return this.grantor; + } + + public void setGrantor(String grantor) { + this.grantor = grantor; } - public void unsetO2() { - this.o2 = null; + public void unsetGrantor() { + this.grantor = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise - public boolean isSetO2() { - return this.o2 != null; + // Returns true if field grantor is set (has been asigned a value) and false otherwise + public boolean isSetGrantor() { + return this.grantor != null; } public void 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; @@ -24002,14 +37029,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!"); @@ -24019,12 +37052,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!"); } @@ -24034,39 +37071,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; } @@ -24089,26 +37144,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); } @@ -24125,19 +37194,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(); @@ -24146,26 +37224,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(")"); @@ -24179,144 +37269,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 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))); + 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))); }}); 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; @@ -24327,14 +37384,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!"); @@ -24344,12 +37398,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!"); } @@ -24359,39 +37411,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; } @@ -24414,23 +37457,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(); + case O1: + if (field.type == TType.STRUCT) { + this.o1 = new MetaException(); + this.o1.read(iprot); } else { TProtocolUtil.skip(iprot, field.type); } @@ -24447,22 +37485,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(); @@ -24471,30 +37502,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(")"); @@ -24508,144 +37527,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); - - 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; + 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 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; @@ -24656,14 +37714,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!"); @@ -24673,12 +37734,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!"); } @@ -24688,39 +37751,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; } @@ -24743,26 +37815,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 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 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 O2: + 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); } @@ -24779,19 +37858,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(); @@ -24800,30 +37883,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(")"); @@ -24837,148 +37920,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; @@ -24989,14 +38035,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!"); @@ -25006,12 +38049,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!"); } @@ -25021,39 +38062,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; } @@ -25076,24 +38108,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); } @@ -25110,50 +38136,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(); } @@ -25165,513 +38178,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)); + public revoke_all_privileges_args(revoke_all_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; + __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.success = __this__success; + this.dbs = __this__dbs; } - if (other.isSetO1()) { - this.o1 = new NoSuchObjectException(other.o1); + 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; } - if (other.isSetO2()) { - this.o2 = new MetaException(other.o2); + 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; } - } + if (other.isSetColumns()) { + Map> __this__columns = new HashMap>(); + for (Map.Entry> other_element : other.columns.entrySet()) { - @Override - public get_indexes_result clone() { - return new get_indexes_result(this); - } + Table other_element_key = other_element.getKey(); + List other_element_value = other_element.getValue(); - public int getSuccessSize() { - return (this.success == null) ? 0 : this.success.size(); - } + Table __this__columns_copy_key = new Table(other_element_key); - public java.util.Iterator getSuccessIterator() { - return (this.success == null) ? null : this.success.iterator(); - } + 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); + } - public void addToSuccess(Index elem) { - if (this.success == null) { - this.success = new ArrayList(); + __this__columns.put(__this__columns_copy_key, __this__columns_copy_value); + } + this.columns = __this__columns; } - 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 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; } - @Override - public String toString() { - StringBuilder sb = new StringBuilder("get_indexes_result("); - boolean first = true; + // 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; + } - 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 int getDbsSize() { + return (this.dbs == null) ? 0 : this.dbs.size(); + } + + 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; @@ -25682,14 +38596,29 @@ public Object getFieldValue(int fieldID) { switch (fieldID) { - case DB_NAME: - return getDb_name(); + case USER_NAME: + return getUser_name(); - case TBL_NAME: - return getTbl_name(); + case IS_ROLE: + return new Boolean(isIs_role()); - case MAX_INDEXES: - return new Short(getMax_indexes()); + case IS_GROUP: + return new Boolean(isIs_group()); + + case REMOVE_USER_PRIV: + return new Boolean(isRemove_user_priv()); + + case DBS: + return getDbs(); + + case TABLES: + return getTables(); + + case PARTS: + return getParts(); + + case COLUMNS: + return getColumns(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -25698,13 +38627,23 @@ // 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(); + switch (fieldID) { + 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!"); } @@ -25714,39 +38653,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; } @@ -25769,24 +38753,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 _list223 = iprot.readListBegin(); + this.dbs = new ArrayList(_list223.size); + for (int _i224 = 0; _i224 < _list223.size; ++_i224) + { + Database _elem225; + _elem225 = new Database(); + _elem225.read(iprot); + this.dbs.add(_elem225); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case TABLES: + if (field.type == TType.LIST) { + { + TList _list226 = iprot.readListBegin(); + this.tables = new ArrayList
(_list226.size); + for (int _i227 = 0; _i227 < _list226.size; ++_i227) + { + Table _elem228; + _elem228 = new Table(); + _elem228.read(iprot); + this.tables.add(_elem228); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case PARTS: + if (field.type == TType.LIST) { + { + TList _list229 = iprot.readListBegin(); + this.parts = new ArrayList(_list229.size); + for (int _i230 = 0; _i230 < _list229.size; ++_i230) + { + Partition _elem231; + _elem231 = new Partition(); + _elem231.read(iprot); + this.parts.add(_elem231); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case COLUMNS: + if (field.type == TType.MAP) { + { + TMap _map232 = iprot.readMapBegin(); + this.columns = new HashMap>(2*_map232.size); + for (int _i233 = 0; _i233 < _map232.size; ++_i233) + { + Table _key234; + List _val235; + _key234 = new Table(); + _key234.read(iprot); + { + TList _list236 = iprot.readListBegin(); + _val235 = new ArrayList(_list236.size); + for (int _i237 = 0; _i237 < _list236.size; ++_i237) + { + String _elem238; + _elem238 = iprot.readString(); + _val235.add(_elem238); + } + iprot.readListEnd(); + } + this.columns.put(_key234, _val235); + } + iprot.readMapEnd(); + } } else { TProtocolUtil.skip(iprot, field.type); } @@ -25806,46 +38883,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 _iter239 : this.dbs) { + _iter239.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 _iter240 : this.tables) { + _iter240.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.parts != null) { + oprot.writeFieldBegin(PARTS_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.parts.size())); + for (Partition _iter241 : this.parts) { + _iter241.write(oprot); + } + oprot.writeListEnd(); + } oprot.writeFieldEnd(); } - if (this.tbl_name != null) { - oprot.writeFieldBegin(TBL_NAME_FIELD_DESC); - oprot.writeString(this.tbl_name); + if (this.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRUCT, TType.LIST, this.columns.size())); + for (Map.Entry> _iter242 : this.columns.entrySet()) { + _iter242.getKey().write(oprot); + { + oprot.writeListBegin(new TList(TType.STRING, _iter242.getValue().size())); + for (String _iter243 : _iter242.getValue()) { + oprot.writeString(_iter243); + } + oprot.writeListEnd(); + } + } + oprot.writeMapEnd(); + } oprot.writeFieldEnd(); } - oprot.writeFieldBegin(MAX_INDEXES_FIELD_DESC); - oprot.writeI16(this.max_indexes); - oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { - StringBuilder sb = new StringBuilder("get_index_names_args("); + StringBuilder sb = new StringBuilder("revoke_all_privileges_args("); boolean first = true; - sb.append("db_name:"); - if (this.db_name == null) { + sb.append("user_name:"); + if (this.user_name == null) { sb.append("null"); } else { - sb.append(this.db_name); + sb.append(this.user_name); } first = false; if (!first) sb.append(", "); - sb.append("tbl_name:"); - if (this.tbl_name == null) { + sb.append("is_role:"); + sb.append(this.is_role); + first = false; + if (!first) sb.append(", "); + sb.append("is_group:"); + sb.append(this.is_group); + first = false; + if (!first) sb.append(", "); + sb.append("remove_user_priv:"); + sb.append(this.remove_user_priv); + first = false; + if (!first) sb.append(", "); + sb.append("dbs:"); + if (this.dbs == null) { sb.append("null"); } else { - sb.append(this.tbl_name); + sb.append(this.dbs); } first = false; if (!first) sb.append(", "); - sb.append("max_indexes:"); - sb.append(this.max_indexes); + sb.append("tables:"); + if (this.tables == null) { + sb.append("null"); + } else { + sb.append(this.tables); + } + first = false; + if (!first) sb.append(", "); + sb.append("parts:"); + if (this.parts == null) { + sb.append("null"); + } else { + sb.append(this.parts); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } first = false; sb.append(")"); return sb.toString(); @@ -25858,112 +39019,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) { @@ -25972,15 +39115,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; @@ -25992,10 +39135,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!"); @@ -26007,8 +39150,8 @@ switch (fieldID) { case SUCCESS: return isSetSuccess(); - case O2: - return isSetO2(); + case O1: + return isSetO1(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } @@ -26018,30 +39161,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; } @@ -26065,26 +39208,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); } @@ -26105,17 +39239,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(); @@ -26124,22 +39252,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 1030336) +++ metastore/src/gen-php/ThriftHiveMetastore.php (working copy) @@ -48,6 +48,23 @@ 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); + public function drop_role($role_name); + public function add_role_member($role_name, $user_name, $is_role, $is_group); + public function remove_role_member($role_name, $user_name, $is_role, $is_group); + 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, $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 { @@ -2248,139 +2265,4546 @@ throw new Exception("get_index_names failed: unknown result"); } -} + 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(); + } -// HELPER FUNCTIONS AND STRUCTURES + 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(); + } + } -class metastore_ThriftHiveMetastore_create_database_args { - static $_TSPEC; + 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 $database = null; + $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 __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'database', - 'type' => TType::STRUCT, - 'class' => 'metastore_Database', - ), - ); + 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 send_get_db_privilege_set($db_name, $user_name, $group_names) + { + $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) + { + thrift_protocol_write_binary($this->output_, 'get_db_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } - if (is_array($vals)) { - if (isset($vals['database'])) { - $this->database = $vals['database']; + else + { + $this->output_->writeMessageBegin('get_db_privilege_set', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + 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 getName() { - return 'ThriftHiveMetastore_create_database_args'; + 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 read($input) + public function send_get_table_privilege_set($db_name, $table_name, $user_name, $group_names) { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) + $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) { - $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_table_privilege_set', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } - $xfer += $input->readStructEnd(); - return $xfer; + 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 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); + 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; } - $xfer += $output->writeFieldBegin('database', TType::STRUCT, 1); - $xfer += $this->database->write($output); - $xfer += $output->writeFieldEnd(); + $result = new metastore_ThriftHiveMetastore_get_table_privilege_set_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; + 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(); + } -class metastore_ThriftHiveMetastore_create_database_result { - static $_TSPEC; + 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 $o1 = null; - public $o2 = null; - public $o3 = null; + 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; - 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']; + $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 getName() { - return 'ThriftHiveMetastore_create_database_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 read($input) + public function send_get_column_privilege_set($db_name, $table_name, $part_name, $column_name, $user_name, $group_names) { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) + $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) + { + $this->send_create_role($role_name, $owner_name); + return $this->recv_create_role(); + } + + public function send_create_role($role_name, $owner_name) + { + $args = new metastore_ThriftHiveMetastore_create_role_args(); + $args->role_name = $role_name; + $args->owner_name = $owner_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) + { + $this->send_drop_role($role_name); + return $this->recv_drop_role(); + } + + public function send_drop_role($role_name) + { + $args = new metastore_ThriftHiveMetastore_drop_role_args(); + $args->role_name = $role_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + 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) + { + $this->send_add_role_member($role_name, $user_name, $is_role, $is_group); + return $this->recv_add_role_member(); + } + + public function send_add_role_member($role_name, $user_name, $is_role, $is_group) + { + $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; + $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) + { + $this->send_remove_role_member($role_name, $user_name, $is_role, $is_group); + return $this->recv_remove_role_member(); + } + + public function send_remove_role_member($role_name, $user_name, $is_role, $is_group) + { + $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; + $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_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, $column_name) + { + $this->send_list_security_column_grant($principal_name, $is_group, $is_role, $db_name, $table_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, $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->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) { @@ -2390,7 +6814,119 @@ { case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_AlreadyExistsException(); + $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); @@ -2398,7 +6934,7 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); + $this->o2 = new metastore_AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -2424,7 +6960,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_database_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_partition_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $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); @@ -2447,29 +6991,49 @@ } -class metastore_ThriftHiveMetastore_get_database_args { +class metastore_ThriftHiveMetastore_append_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_append_partition_args'; } public function read($input) @@ -2489,7 +7053,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(); + $_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); } @@ -2506,10 +7094,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_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(); @@ -2519,12 +7129,13 @@ } -class metastore_ThriftHiveMetastore_get_database_result { +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)) { @@ -2532,16 +7143,21 @@ 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_InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -2556,11 +7172,14 @@ if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } } } public function getName() { - return 'ThriftHiveMetastore_get_database_result'; + return 'ThriftHiveMetastore_append_partition_result'; } public function read($input) @@ -2580,7 +7199,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); @@ -2588,7 +7207,7 @@ break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -2596,12 +7215,20 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); + $this->o2 = new metastore_AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -2614,7 +7241,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_database_result'); + $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); @@ -2633,6 +7260,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; @@ -2640,37 +7272,45 @@ } -class metastore_ThriftHiveMetastore_drop_database_args { +class metastore_ThriftHiveMetastore_append_partition_by_name_args { static $_TSPEC; - public $name = null; - public $deleteData = null; + public $db_name = null; + public $tbl_name = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + '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_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_database_args'; + return 'ThriftHiveMetastore_append_partition_by_name_args'; } public function read($input) @@ -2690,14 +7330,21 @@ { 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::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -2714,15 +7361,20 @@ 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_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->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_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -2732,9 +7384,10 @@ } -class metastore_ThriftHiveMetastore_drop_database_result { +class metastore_ThriftHiveMetastore_append_partition_by_name_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; public $o3 = null; @@ -2742,15 +7395,20 @@ 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_InvalidObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidOperationException', + 'class' => 'metastore_AlreadyExistsException', ), 3 => array( 'var' => 'o3', @@ -2760,6 +7418,9 @@ ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } @@ -2773,7 +7434,7 @@ } public function getName() { - return 'ThriftHiveMetastore_drop_database_result'; + return 'ThriftHiveMetastore_append_partition_by_name_result'; } public function read($input) @@ -2791,9 +7452,17 @@ } switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -2801,7 +7470,7 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidOperationException(); + $this->o2 = new metastore_AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); @@ -2827,7 +7496,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_database_result'); + $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); @@ -2850,29 +7527,57 @@ } -class metastore_ThriftHiveMetastore_get_databases_args { +class metastore_ThriftHiveMetastore_drop_partition_args { static $_TSPEC; - public $pattern = null; + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $deleteData = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'pattern', + '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['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_vals'])) { + $this->part_vals = $vals['part_vals']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; } } } public function getName() { - return 'ThriftHiveMetastore_get_databases_args'; + return 'ThriftHiveMetastore_drop_partition_args'; } public function read($input) @@ -2892,7 +7597,38 @@ { 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::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); } @@ -2909,10 +7645,37 @@ 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_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(); @@ -2922,26 +7685,28 @@ } -class metastore_ThriftHiveMetastore_get_databases_result { +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::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -2953,11 +7718,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_drop_partition_result'; } public function read($input) @@ -2976,26 +7744,24 @@ 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::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 1: + case 2: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); - $xfer += $this->o1->read($input); + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -3012,22 +7778,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_databases_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::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::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -3035,6 +7789,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; @@ -3042,19 +7801,53 @@ } -class metastore_ThriftHiveMetastore_get_all_databases_args { +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() { + 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_get_all_databases_args'; + return 'ThriftHiveMetastore_drop_partition_by_name_args'; } public function read($input) @@ -3072,6 +7865,34 @@ } 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; @@ -3084,7 +7905,27 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_args'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->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; @@ -3092,26 +7933,28 @@ } -class metastore_ThriftHiveMetastore_get_all_databases_result { +class metastore_ThriftHiveMetastore_drop_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::BOOL, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), ); @@ -3123,11 +7966,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_drop_partition_by_name_result'; } public function read($input) @@ -3146,30 +7992,28 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size110 = 0; - $_etype113 = 0; - $xfer += $input->readListBegin($_etype113, $_size110); - for ($_i114 = 0; $_i114 < $_size110; ++$_i114) - { - $elem115 = null; - $xfer += $input->readString($elem115); - $this->success []= $elem115; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); + $this->o1 = new metastore_NoSuchObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_MetaException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -3182,22 +8026,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_databases_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_partition_by_name_result'); if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter116) - { - $xfer += $output->writeString($iter116); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -3205,6 +8037,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; @@ -3212,29 +8049,49 @@ } -class metastore_ThriftHiveMetastore_get_type_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_type_args'; + return 'ThriftHiveMetastore_get_partition_args'; } public function read($input) @@ -3254,7 +8111,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); } @@ -3263,18 +8144,40 @@ $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 += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_vals !== null) { + if (!is_array($this->part_vals)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter244) + { + $xfer += $output->writeString($iter244); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -3284,7 +8187,7 @@ } -class metastore_ThriftHiveMetastore_get_type_result { +class metastore_ThriftHiveMetastore_get_partition_result { static $_TSPEC; public $success = null; @@ -3297,7 +8200,7 @@ 0 => array( 'var' => 'success', 'type' => TType::STRUCT, - 'class' => 'metastore_Type', + 'class' => 'metastore_Partition', ), 1 => array( 'var' => 'o1', @@ -3325,7 +8228,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_type_result'; + return 'ThriftHiveMetastore_get_partition_result'; } public function read($input) @@ -3345,7 +8248,7 @@ { case 0: if ($ftype == TType::STRUCT) { - $this->success = new metastore_Type(); + $this->success = new metastore_Partition(); $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); @@ -3379,7 +8282,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_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); @@ -3405,30 +8308,45 @@ } -class metastore_ThriftHiveMetastore_create_type_args { +class metastore_ThriftHiveMetastore_get_partition_by_name_args { static $_TSPEC; - public $type = null; + public $db_name = null; + public $tbl_name = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'type', - 'type' => TType::STRUCT, - 'class' => 'metastore_Type', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_create_type_args'; + return 'ThriftHiveMetastore_get_partition_by_name_args'; } public function read($input) @@ -3447,9 +8365,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::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -3466,13 +8397,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_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(); @@ -3482,35 +8420,30 @@ } -class metastore_ThriftHiveMetastore_create_type_result { +class metastore_ThriftHiveMetastore_get_partition_by_name_result { static $_TSPEC; public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::BOOL, + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', + 'class' => 'metastore_MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_NoSuchObjectException', ), ); } @@ -3524,14 +8457,11 @@ 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_by_name_result'; } public function read($input) @@ -3550,15 +8480,16 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Partition(); + $xfer += $this->success->read($input); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_AlreadyExistsException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -3566,20 +8497,12 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); + $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; @@ -3592,10 +8515,13 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_type_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_by_name_result'); if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -3608,11 +8534,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; @@ -3620,29 +8541,45 @@ } -class metastore_ThriftHiveMetastore_drop_type_args { +class metastore_ThriftHiveMetastore_get_partitions_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', + '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_drop_type_args'; + return 'ThriftHiveMetastore_get_partitions_args'; } public function read($input) @@ -3662,7 +8599,21 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type); + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); } else { $xfer += $input->skip($ftype); } @@ -3679,10 +8630,20 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_type_args'); - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 1); - $xfer += $output->writeString($this->type); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_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(); @@ -3692,7 +8653,7 @@ } -class metastore_ThriftHiveMetastore_drop_type_result { +class metastore_ThriftHiveMetastore_get_partitions_result { static $_TSPEC; public $success = null; @@ -3704,17 +8665,22 @@ 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', + 'class' => 'metastore_NoSuchObjectException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_MetaException', ), ); } @@ -3732,7 +8698,7 @@ } public function getName() { - return 'ThriftHiveMetastore_drop_type_result'; + return 'ThriftHiveMetastore_get_partitions_result'; } public function read($input) @@ -3751,15 +8717,26 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size245 = 0; + $_etype248 = 0; + $xfer += $input->readListBegin($_etype248, $_size245); + for ($_i249 = 0; $_i249 < $_size245; ++$_i249) + { + $elem250 = null; + $elem250 = new metastore_Partition(); + $xfer += $elem250->read($input); + $this->success []= $elem250; + } + $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); @@ -3767,7 +8744,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); @@ -3777,18 +8754,30 @@ $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 += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $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::STRUCT, count($this->success)); + { + foreach ($this->success as $iter251) + { + $xfer += $iter251->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -3808,29 +8797,45 @@ } -class metastore_ThriftHiveMetastore_get_type_all_args { +class metastore_ThriftHiveMetastore_get_partition_names_args { static $_TSPEC; - public $name = 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' => 'name', + '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['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']; } } } public function getName() { - return 'ThriftHiveMetastore_get_type_all_args'; + return 'ThriftHiveMetastore_get_partition_names_args'; } public function read($input) @@ -3850,7 +8855,21 @@ { 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); } @@ -3867,10 +8886,20 @@ 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_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(); @@ -3880,7 +8909,7 @@ } -class metastore_ThriftHiveMetastore_get_type_all_result { +class metastore_ThriftHiveMetastore_get_partition_names_result { static $_TSPEC; public $success = null; @@ -3891,15 +8920,10 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRUCT, - 'key' => array( + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Type', ), ), 1 => array( @@ -3920,7 +8944,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_type_all_result'; + return 'ThriftHiveMetastore_get_partition_names_result'; } public function read($input) @@ -3939,22 +8963,18 @@ 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) + $_size252 = 0; + $_etype255 = 0; + $xfer += $input->readListBegin($_etype255, $_size252); + for ($_i256 = 0; $_i256 < $_size252; ++$_i256) { - $key122 = ''; - $val123 = new metastore_Type(); - $xfer += $input->readString($key122); - $val123 = new metastore_Type(); - $xfer += $val123->read($input); - $this->success[$key122] = $val123; + $elem257 = null; + $xfer += $input->readString($elem257); + $this->success []= $elem257; } - $xfer += $input->readMapEnd(); + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -3979,22 +8999,21 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_type_all_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partition_names_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + $xfer += $output->writeFieldBegin('success', TType::LST, 0); { - $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); + $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $kiter124 => $viter125) + foreach ($this->success as $iter258) { - $xfer += $output->writeString($kiter124); - $xfer += $viter125->write($output); + $xfer += $output->writeString($iter258); } } - $output->writeMapEnd(); + $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } @@ -4010,11 +9029,13 @@ } -class metastore_ThriftHiveMetastore_get_fields_args { +class metastore_ThriftHiveMetastore_get_partitions_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)) { @@ -4024,23 +9045,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_partitions_ps_args'; } public function read($input) @@ -4067,7 +9106,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(); + $_size259 = 0; + $_etype262 = 0; + $xfer += $input->readListBegin($_etype262, $_size259); + for ($_i263 = 0; $_i263 < $_size259; ++$_i263) + { + $elem264 = null; + $xfer += $input->readString($elem264); + $this->part_vals []= $elem264; + } + $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); } @@ -4084,15 +9147,37 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args'); + $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->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 $iter265) + { + $xfer += $output->writeString($iter265); + } + } + $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(); @@ -4102,13 +9187,11 @@ } -class metastore_ThriftHiveMetastore_get_fields_result { +class metastore_ThriftHiveMetastore_get_partitions_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)) { @@ -4119,7 +9202,7 @@ 'etype' => TType::STRUCT, 'elem' => array( 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', + 'class' => 'metastore_Partition', ), ), 1 => array( @@ -4127,16 +9210,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)) { @@ -4146,17 +9219,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_partitions_ps_result'; } public function read($input) @@ -4177,15 +9244,15 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size126 = 0; - $_etype129 = 0; - $xfer += $input->readListBegin($_etype129, $_size126); - for ($_i130 = 0; $_i130 < $_size126; ++$_i130) + $_size266 = 0; + $_etype269 = 0; + $xfer += $input->readListBegin($_etype269, $_size266); + for ($_i270 = 0; $_i270 < $_size266; ++$_i270) { - $elem131 = null; - $elem131 = new metastore_FieldSchema(); - $xfer += $elem131->read($input); - $this->success []= $elem131; + $elem271 = null; + $elem271 = new metastore_Partition(); + $xfer += $elem271->read($input); + $this->success []= $elem271; } $xfer += $input->readListEnd(); } else { @@ -4200,22 +9267,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; @@ -4228,7 +9279,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result'); if ($this->success !== null) { if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); @@ -4237,9 +9288,9 @@ { $output->writeListBegin(TType::STRUCT, count($this->success)); { - foreach ($this->success as $iter132) + foreach ($this->success as $iter272) { - $xfer += $iter132->write($output); + $xfer += $iter272->write($output); } } $output->writeListEnd(); @@ -4251,16 +9302,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; @@ -4268,11 +9309,13 @@ } -class metastore_ThriftHiveMetastore_get_schema_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)) { @@ -4282,23 +9325,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_schema_args'; + return 'ThriftHiveMetastore_get_partition_names_ps_args'; } public function read($input) @@ -4325,7 +9386,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(); + $_size273 = 0; + $_etype276 = 0; + $xfer += $input->readListBegin($_etype276, $_size273); + for ($_i277 = 0; $_i277 < $_size273; ++$_i277) + { + $elem278 = null; + $xfer += $input->readString($elem278); + $this->part_vals []= $elem278; + } + $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); } @@ -4342,15 +9427,37 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_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 $iter279) + { + $xfer += $output->writeString($iter279); + } + } + $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(); @@ -4360,13 +9467,11 @@ } -class metastore_ThriftHiveMetastore_get_schema_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)) { @@ -4374,10 +9479,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( @@ -4385,16 +9489,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)) { @@ -4404,17 +9498,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_schema_result'; + return 'ThriftHiveMetastore_get_partition_names_ps_result'; } public function read($input) @@ -4435,15 +9523,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size133 = 0; - $_etype136 = 0; - $xfer += $input->readListBegin($_etype136, $_size133); - for ($_i137 = 0; $_i137 < $_size133; ++$_i137) + $_size280 = 0; + $_etype283 = 0; + $xfer += $input->readListBegin($_etype283, $_size280); + for ($_i284 = 0; $_i284 < $_size280; ++$_i284) { - $elem138 = null; - $elem138 = new metastore_FieldSchema(); - $xfer += $elem138->read($input); - $this->success []= $elem138; + $elem285 = null; + $xfer += $input->readString($elem285); + $this->success []= $elem285; } $xfer += $input->readListEnd(); } else { @@ -4458,22 +9545,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; @@ -4486,18 +9557,18 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_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 $iter139) + foreach ($this->success as $iter286) { - $xfer += $iter139->write($output); + $xfer += $output->writeString($iter286); } } $output->writeListEnd(); @@ -4509,16 +9580,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; @@ -4526,30 +9587,53 @@ } -class metastore_ThriftHiveMetastore_create_table_args { +class metastore_ThriftHiveMetastore_get_partitions_by_filter_args { static $_TSPEC; - public $tbl = 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' => 'tbl', - 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + '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['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['filter'])) { + $this->filter = $vals['filter']; + } + if (isset($vals['max_parts'])) { + $this->max_parts = $vals['max_parts']; } } } public function getName() { - return 'ThriftHiveMetastore_create_table_args'; + return 'ThriftHiveMetastore_get_partitions_by_filter_args'; } public function read($input) @@ -4568,9 +9652,29 @@ switch ($fid) { case 1: - if ($ftype == TType::STRUCT) { - $this->tbl = new metastore_Table(); - $xfer += $this->tbl->read($input); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::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); } @@ -4587,13 +9691,25 @@ 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->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->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(); @@ -4603,57 +9719,52 @@ } -class metastore_ThriftHiveMetastore_create_table_result { +class metastore_ThriftHiveMetastore_get_partitions_by_filter_result { static $_TSPEC; + public $success = null; public $o1 = null; public $o2 = null; - public $o3 = null; - public $o4 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', + 'class' => 'metastore_MetaException', ), 2 => array( 'var' => 'o2', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, 'class' => 'metastore_NoSuchObjectException', ), ); } if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } if (isset($vals['o2'])) { $this->o2 = $vals['o2']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } - if (isset($vals['o4'])) { - $this->o4 = $vals['o4']; - } } } public function getName() { - return 'ThriftHiveMetastore_create_table_result'; + return 'ThriftHiveMetastore_get_partitions_by_filter_result'; } public function read($input) @@ -4671,34 +9782,36 @@ } 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); + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size287 = 0; + $_etype290 = 0; + $xfer += $input->readListBegin($_etype290, $_size287); + for ($_i291 = 0; $_i291 < $_size287; ++$_i291) + { + $elem292 = null; + $elem292 = new metastore_Partition(); + $xfer += $elem292->read($input); + $this->success []= $elem292; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } break; - case 3: + case 1: if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); } break; - case 4: + case 2: if ($ftype == TType::STRUCT) { - $this->o4 = new metastore_NoSuchObjectException(); - $xfer += $this->o4->read($input); + $this->o2 = new metastore_NoSuchObjectException(); + $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } @@ -4715,7 +9828,24 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_table_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); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter293) + { + $xfer += $iter293->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } if ($this->o1 !== null) { $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); $xfer += $this->o1->write($output); @@ -4726,16 +9856,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; @@ -4743,45 +9863,46 @@ } -class metastore_ThriftHiveMetastore_drop_table_args { +class metastore_ThriftHiveMetastore_alter_partition_args { static $_TSPEC; - public $dbname = null; - public $name = null; - public $deleteData = 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' => 'dbname', + 'var' => 'db_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'name', + 'var' => 'tbl_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', ), ); } if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; } - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_args'; + return 'ThriftHiveMetastore_alter_partition_args'; } public function read($input) @@ -4801,21 +9922,22 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbname); + $xfer += $input->readString($this->db_name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->tbl_name); } else { $xfer += $input->skip($ftype); } break; case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); + if ($ftype == TType::STRUCT) { + $this->new_part = new metastore_Partition(); + $xfer += $this->new_part->read($input); } else { $xfer += $input->skip($ftype); } @@ -4832,20 +9954,23 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_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->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 2); - $xfer += $output->writeString($this->name); + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); $xfer += $output->writeFieldEnd(); } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); - $xfer += $output->writeBool($this->deleteData); + if ($this->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); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4855,11 +9980,11 @@ } -class metastore_ThriftHiveMetastore_drop_table_result { +class metastore_ThriftHiveMetastore_alter_partition_result { static $_TSPEC; public $o1 = null; - public $o3 = null; + public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -4867,10 +9992,10 @@ 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', + 'class' => 'metastore_InvalidOperationException', ), 2 => array( - 'var' => 'o3', + 'var' => 'o2', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), @@ -4880,14 +10005,14 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; } } } public function getName() { - return 'ThriftHiveMetastore_drop_table_result'; + return 'ThriftHiveMetastore_alter_partition_result'; } public function read($input) @@ -4907,7 +10032,7 @@ { case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); + $this->o1 = new metastore_InvalidOperationException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -4915,8 +10040,8 @@ break; 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); } @@ -4933,15 +10058,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_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); $xfer += $output->writeFieldEnd(); } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); - $xfer += $this->o3->write($output); + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -4951,37 +10076,37 @@ } -class metastore_ThriftHiveMetastore_get_tables_args { +class metastore_ThriftHiveMetastore_get_config_value_args { static $_TSPEC; - public $db_name = null; - public $pattern = null; + public $name = null; + public $defaultValue = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'db_name', + 'var' => 'name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'pattern', + 'var' => 'defaultValue', 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; + if (isset($vals['name'])) { + $this->name = $vals['name']; } - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; + if (isset($vals['defaultValue'])) { + $this->defaultValue = $vals['defaultValue']; } } } public function getName() { - return 'ThriftHiveMetastore_get_tables_args'; + return 'ThriftHiveMetastore_get_config_value_args'; } public function read($input) @@ -5001,14 +10126,14 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->name); } else { $xfer += $input->skip($ftype); } break; case 2: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->pattern); + $xfer += $input->readString($this->defaultValue); } else { $xfer += $input->skip($ftype); } @@ -5025,15 +10150,15 @@ 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->writeStructBegin('ThriftHiveMetastore_get_config_value_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); $xfer += $output->writeFieldEnd(); } - if ($this->pattern !== null) { - $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); - $xfer += $output->writeString($this->pattern); + if ($this->defaultValue !== null) { + $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); + $xfer += $output->writeString($this->defaultValue); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5043,7 +10168,7 @@ } -class metastore_ThriftHiveMetastore_get_tables_result { +class metastore_ThriftHiveMetastore_get_config_value_result { static $_TSPEC; public $success = null; @@ -5054,16 +10179,12 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), + 'type' => TType::STRING, ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', + 'class' => 'metastore_ConfigValSecurityException', ), ); } @@ -5078,7 +10199,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_tables_result'; + return 'ThriftHiveMetastore_get_config_value_result'; } public function read($input) @@ -5097,25 +10218,15 @@ switch ($fid) { case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size140 = 0; - $_etype143 = 0; - $xfer += $input->readListBegin($_etype143, $_size140); - for ($_i144 = 0; $_i144 < $_size140; ++$_i144) - { - $elem145 = null; - $xfer += $input->readString($elem145); - $this->success []= $elem145; - } - $xfer += $input->readListEnd(); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->success); } else { $xfer += $input->skip($ftype); } break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); + $this->o1 = new metastore_ConfigValSecurityException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -5133,22 +10244,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_tables_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_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 $iter146) - { - $xfer += $output->writeString($iter146); - } - } - $output->writeListEnd(); - } + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -5163,29 +10262,29 @@ } -class metastore_ThriftHiveMetastore_get_all_tables_args { +class metastore_ThriftHiveMetastore_partition_name_to_vals_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_vals_args'; } public function read($input) @@ -5205,7 +10304,7 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -5222,10 +10321,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_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(); @@ -5235,7 +10334,7 @@ } -class metastore_ThriftHiveMetastore_get_all_tables_result { +class metastore_ThriftHiveMetastore_partition_name_to_vals_result { static $_TSPEC; public $success = null; @@ -5270,7 +10369,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_all_tables_result'; + return 'ThriftHiveMetastore_partition_name_to_vals_result'; } public function read($input) @@ -5291,14 +10390,14 @@ case 0: if ($ftype == TType::LST) { $this->success = array(); - $_size147 = 0; - $_etype150 = 0; - $xfer += $input->readListBegin($_etype150, $_size147); - for ($_i151 = 0; $_i151 < $_size147; ++$_i151) + $_size294 = 0; + $_etype297 = 0; + $xfer += $input->readListBegin($_etype297, $_size294); + for ($_i298 = 0; $_i298 < $_size294; ++$_i298) { - $elem152 = null; - $xfer += $input->readString($elem152); - $this->success []= $elem152; + $elem299 = null; + $xfer += $input->readString($elem299); + $this->success []= $elem299; } $xfer += $input->readListEnd(); } else { @@ -5325,7 +10424,7 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_all_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); @@ -5334,9 +10433,9 @@ { $output->writeListBegin(TType::STRING, count($this->success)); { - foreach ($this->success as $iter153) + foreach ($this->success as $iter300) { - $xfer += $output->writeString($iter153); + $xfer += $output->writeString($iter300); } } $output->writeListEnd(); @@ -5355,37 +10454,29 @@ } -class metastore_ThriftHiveMetastore_get_table_args { +class metastore_ThriftHiveMetastore_partition_name_to_spec_args { static $_TSPEC; - public $dbname = null; - public $tbl_name = null; + public $part_name = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'dbname', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', + 'var' => 'part_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']; + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_table_args'; + return 'ThriftHiveMetastore_partition_name_to_spec_args'; } public function read($input) @@ -5405,14 +10496,7 @@ { 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); + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -5429,15 +10513,10 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_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(); @@ -5447,31 +10526,32 @@ } -class metastore_ThriftHiveMetastore_get_table_result { +class metastore_ThriftHiveMetastore_partition_name_to_spec_result { static $_TSPEC; public $success = null; public $o1 = null; - public $o2 = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Table', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, 'class' => 'metastore_MetaException', ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), ); } if (is_array($vals)) { @@ -5481,14 +10561,11 @@ if (isset($vals['o1'])) { $this->o1 = $vals['o1']; } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } } } public function getName() { - return 'ThriftHiveMetastore_get_table_result'; + return 'ThriftHiveMetastore_partition_name_to_spec_result'; } public function read($input) @@ -5507,9 +10584,21 @@ switch ($fid) { case 0: - if ($ftype == TType::STRUCT) { - $this->success = new metastore_Table(); - $xfer += $this->success->read($input); + if ($ftype == TType::MAP) { + $this->success = array(); + $_size301 = 0; + $_ktype302 = 0; + $_vtype303 = 0; + $xfer += $input->readMapBegin($_ktype302, $_vtype303, $_size301); + for ($_i305 = 0; $_i305 < $_size301; ++$_i305) + { + $key306 = ''; + $val307 = ''; + $xfer += $input->readString($key306); + $xfer += $input->readString($val307); + $this->success[$key306] = $val307; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } @@ -5522,14 +10611,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; @@ -5542,13 +10623,23 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_table_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result'); if ($this->success !== null) { - if (!is_object($this->success)) { + if (!is_array($this->success)) { throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->success)); + { + foreach ($this->success as $kiter308 => $viter309) + { + $xfer += $output->writeString($kiter308); + $xfer += $output->writeString($viter309); + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -5556,11 +10647,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; @@ -5568,46 +10654,39 @@ } -class metastore_ThriftHiveMetastore_alter_table_args { +class metastore_ThriftHiveMetastore_add_index_args { static $_TSPEC; - public $dbname = null; - public $tbl_name = null; - public $new_tbl = 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, - ), - 3 => array( - 'var' => 'new_tbl', + 'var' => 'index_table', '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_index'])) { + $this->new_index = $vals['new_index']; } - if (isset($vals['new_tbl'])) { - $this->new_tbl = $vals['new_tbl']; + if (isset($vals['index_table'])) { + $this->index_table = $vals['index_table']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_table_args'; + return 'ThriftHiveMetastore_add_index_args'; } public function read($input) @@ -5626,23 +10705,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); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: if ($ftype == TType::STRUCT) { - $this->new_tbl = new metastore_Table(); - $xfer += $this->new_tbl->read($input); + $this->index_table = new metastore_Table(); + $xfer += $this->index_table->read($input); } else { $xfer += $input->skip($ftype); } @@ -5659,23 +10732,21 @@ 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->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->new_tbl !== null) { - if (!is_object($this->new_tbl)) { + if ($this->index_table !== null) { + if (!is_object($this->index_table)) { 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('index_table', TType::STRUCT, 2); + $xfer += $this->index_table->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -5685,39 +10756,57 @@ } -class metastore_ThriftHiveMetastore_alter_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)) { self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Index', + ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidOperationException', + '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_alter_table_result'; + return 'ThriftHiveMetastore_add_index_result'; } public function read($input) @@ -5735,9 +10824,17 @@ } switch ($fid) { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new metastore_Index(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; case 1: if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidOperationException(); + $this->o1 = new metastore_InvalidObjectException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -5745,12 +10842,20 @@ break; case 2: if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_MetaException(); + $this->o2 = new metastore_AlreadyExistsException(); $xfer += $this->o2->read($input); } else { $xfer += $input->skip($ftype); } break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; default: $xfer += $input->skip($ftype); break; @@ -5763,7 +10868,15 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_alter_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); + } + $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); @@ -5774,6 +10887,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; @@ -5781,30 +10899,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) @@ -5821,11 +10962,31 @@ break; } switch ($fid) - { - case 1: - if ($ftype == TType::STRUCT) { - $this->new_part = new metastore_Partition(); - $xfer += $this->new_part->read($input); + { + 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->index_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); } else { $xfer += $input->skip($ftype); } @@ -5842,13 +11003,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(); @@ -5858,35 +11031,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', ), ); @@ -5901,14 +11067,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) @@ -5927,16 +11090,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); @@ -5944,20 +11106,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; @@ -5970,13 +11124,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) { @@ -5989,11 +11140,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; @@ -6001,12 +11147,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)) { @@ -6020,12 +11166,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, ), ); } @@ -6036,14 +11178,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) @@ -6076,18 +11218,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); } @@ -6104,7 +11236,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); @@ -6115,21 +11247,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(); @@ -6139,13 +11259,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)) { @@ -6153,22 +11272,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', ), ); } @@ -6182,14 +11296,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) @@ -6209,7 +11320,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); @@ -6217,7 +11328,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); @@ -6225,20 +11336,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; @@ -6251,7 +11354,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); @@ -6270,11 +11373,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; @@ -6282,12 +11380,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)) { @@ -6301,8 +11399,8 @@ 'type' => TType::STRING, ), 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, + 'var' => 'max_indexes', + 'type' => TType::I16, ), ); } @@ -6313,14 +11411,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) @@ -6353,8 +11451,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); } @@ -6371,7 +11469,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); @@ -6382,9 +11480,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(); @@ -6394,35 +11492,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', ), ); @@ -6437,14 +11533,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) @@ -6463,16 +11556,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(); + $_size310 = 0; + $_etype313 = 0; + $xfer += $input->readListBegin($_etype313, $_size310); + for ($_i314 = 0; $_i314 < $_size310; ++$_i314) + { + $elem315 = null; + $elem315 = new metastore_Index(); + $xfer += $elem315->read($input); + $this->success []= $elem315; + } + $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); @@ -6480,20 +11583,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; @@ -6506,13 +11601,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 $iter316) + { + $xfer += $iter316->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -6525,11 +11629,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; @@ -6537,13 +11636,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)) { @@ -6557,16 +11655,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, ), ); } @@ -6577,17 +11667,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) @@ -6620,25 +11707,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); } @@ -6655,7 +11725,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); @@ -6666,26 +11736,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(); @@ -6695,11 +11748,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) { @@ -6707,14 +11759,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', @@ -6725,9 +11776,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']; } @@ -6735,7 +11783,7 @@ } public function getName() { - return 'ThriftHiveMetastore_drop_partition_result'; + return 'ThriftHiveMetastore_get_index_names_result'; } public function read($input) @@ -6754,22 +11802,24 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size317 = 0; + $_etype320 = 0; + $xfer += $input->readListBegin($_etype320, $_size317); + for ($_i321 = 0; $_i321 < $_size317; ++$_i321) + { + $elem322 = null; + $xfer += $input->readString($elem322); + $this->success []= $elem322; + } + $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 { @@ -6788,19 +11838,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 $iter323) + { + $xfer += $output->writeString($iter323); + } + } + $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(); } @@ -6811,53 +11868,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) @@ -6877,28 +11922,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(); + $_size324 = 0; + $_etype327 = 0; + $xfer += $input->readListBegin($_etype327, $_size324); + for ($_i328 = 0; $_i328 < $_size324; ++$_i328) + { + $elem329 = null; + $xfer += $input->readString($elem329); + $this->group_names []= $elem329; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -6915,25 +11956,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 $iter330) + { + $xfer += $output->writeString($iter330); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -6943,28 +11986,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', ), ); @@ -6976,14 +12014,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) @@ -7002,28 +12037,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; @@ -7036,20 +12064,18 @@ 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) { $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 += $this->o1->write($output); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7059,12 +12085,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)) { @@ -7074,11 +12100,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( @@ -7091,17 +12117,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) @@ -7128,22 +12154,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(); + $_size331 = 0; + $_etype334 = 0; + $xfer += $input->readListBegin($_etype334, $_size331); + for ($_i335 = 0; $_i335 < $_size331; ++$_i335) { - $elem173 = null; - $xfer += $input->readString($elem173); - $this->part_vals []= $elem173; + $elem336 = null; + $xfer += $input->readString($elem336); + $this->group_names []= $elem336; } $xfer += $input->readListEnd(); } else { @@ -7162,28 +12188,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 $iter337) { - $xfer += $output->writeString($iter174); + $xfer += $output->writeString($iter337); } } $output->writeListEnd(); @@ -7197,12 +12223,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)) { @@ -7210,18 +12235,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)) { @@ -7231,14 +12251,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) @@ -7258,7 +12275,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); @@ -7272,14 +12289,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; @@ -7292,7 +12301,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); @@ -7306,11 +12315,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; @@ -7318,12 +12322,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)) { @@ -7333,30 +12338,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) @@ -7383,14 +12399,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(); + $_size338 = 0; + $_etype341 = 0; + $xfer += $input->readListBegin($_etype341, $_size338); + for ($_i342 = 0; $_i342 < $_size338; ++$_i342) + { + $elem343 = null; + $xfer += $input->readString($elem343); + $this->group_names []= $elem343; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -7407,20 +12440,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 $iter344) + { + $xfer += $output->writeString($iter344); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7430,12 +12480,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)) { @@ -7443,18 +12492,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)) { @@ -7464,14 +12508,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) @@ -7491,7 +12532,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); @@ -7505,14 +12546,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; @@ -7525,7 +12558,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); @@ -7539,11 +12572,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; @@ -7551,12 +12579,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)) { @@ -7566,12 +12596,24 @@ 'type' => TType::STRING, ), 2 => array( - 'var' => 'tbl_name', + 'var' => 'table_name', 'type' => TType::STRING, ), 3 => array( - 'var' => 'max_parts', - 'type' => TType::I16, + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'user_name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'group_names', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), ), ); } @@ -7579,17 +12621,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) @@ -7616,14 +12664,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(); + $_size345 = 0; + $_etype348 = 0; + $xfer += $input->readListBegin($_etype348, $_size345); + for ($_i349 = 0; $_i349 < $_size345; ++$_i349) + { + $elem350 = null; + $xfer += $input->readString($elem350); + $this->group_names []= $elem350; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -7640,20 +12712,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 $iter351) + { + $xfer += $output->writeString($iter351); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7663,33 +12757,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', ), ); @@ -7701,14 +12785,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) @@ -7727,39 +12808,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; @@ -7772,22 +12835,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) { @@ -7795,11 +12849,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; @@ -7807,12 +12856,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)) { @@ -7822,12 +12874,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, + ), ), ); } @@ -7835,17 +12903,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) @@ -7872,14 +12949,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(); + $_size352 = 0; + $_etype355 = 0; + $xfer += $input->readListBegin($_etype355, $_size352); + for ($_i356 = 0; $_i356 < $_size352; ++$_i356) + { + $elem357 = null; + $xfer += $input->readString($elem357); + $this->group_names []= $elem357; + } + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -7896,20 +13004,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 $iter358) + { + $xfer += $output->writeString($iter358); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -7919,25 +13054,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', ), @@ -7947,14 +13079,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) @@ -7973,26 +13105,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); } @@ -8009,27 +13132,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(); @@ -8039,57 +13153,37 @@ } -class metastore_ThriftHiveMetastore_get_partitions_ps_args { +class metastore_ThriftHiveMetastore_create_role_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; + public $role_name = null; + public $owner_name = 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' => '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, - ), ); } 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['role_name'])) { + $this->role_name = $vals['role_name']; } - if (isset($vals['max_parts'])) { - $this->max_parts = $vals['max_parts']; + if (isset($vals['owner_name'])) { + $this->owner_name = $vals['owner_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_args'; + return 'ThriftHiveMetastore_create_role_args'; } public function read($input) @@ -8109,38 +13203,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(); - $_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); + $xfer += $input->readString($this->owner_name); } else { $xfer += $input->skip($ftype); } @@ -8157,37 +13227,15 @@ 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->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(); - } + $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->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + if ($this->owner_name !== null) { + $xfer += $output->writeFieldBegin('owner_name', TType::STRING, 2); + $xfer += $output->writeString($this->owner_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8197,7 +13245,7 @@ } -class metastore_ThriftHiveMetastore_get_partitions_ps_result { +class metastore_ThriftHiveMetastore_create_role_result { static $_TSPEC; public $success = null; @@ -8208,12 +13256,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', @@ -8233,7 +13276,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_partitions_ps_result'; + return 'ThriftHiveMetastore_create_role_result'; } public function read($input) @@ -8252,19 +13295,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); } @@ -8287,24 +13319,12 @@ return $xfer; } - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_partitions_ps_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter202) - { - $xfer += $iter202->write($output); - } - } - $output->writeListEnd(); - } + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_create_role_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -8319,57 +13339,29 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_ps_args { +class metastore_ThriftHiveMetastore_drop_role_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; + public $role_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', + 'var' => 'role_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['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['role_name'])) { + $this->role_name = $vals['role_name']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_args'; + return 'ThriftHiveMetastore_drop_role_args'; } public function read($input) @@ -8389,38 +13381,7 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->part_vals = array(); - $_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->role_name); } else { $xfer += $input->skip($ftype); } @@ -8437,37 +13398,10 @@ 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->writeFieldEnd(); - } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_role_args'); + if ($this->role_name !== null) { + $xfer += $output->writeFieldBegin('role_name', TType::STRING, 1); + $xfer += $output->writeString($this->role_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -8477,7 +13411,7 @@ } -class metastore_ThriftHiveMetastore_get_partition_names_ps_result { +class metastore_ThriftHiveMetastore_drop_role_result { static $_TSPEC; public $success = null; @@ -8488,11 +13422,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', @@ -8512,7 +13442,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_partition_names_ps_result'; + return 'ThriftHiveMetastore_drop_role_result'; } public function read($input) @@ -8531,18 +13461,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); } @@ -8567,22 +13487,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) { @@ -8597,53 +13505,53 @@ } -class metastore_ThriftHiveMetastore_get_partitions_by_filter_args { +class metastore_ThriftHiveMetastore_add_role_member_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $filter = null; - public $max_parts = -1; + public $role_name = null; + public $user_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' => '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, ), ); } 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']; } } } public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_args'; + return 'ThriftHiveMetastore_add_role_member_args'; } public function read($input) @@ -8663,28 +13571,28 @@ { 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); } @@ -8701,25 +13609,25 @@ 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(); } $xfer += $output->writeFieldStop(); @@ -8729,35 +13637,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)) { @@ -8767,14 +13664,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) @@ -8793,19 +13687,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); } @@ -8818,14 +13701,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; @@ -8838,22 +13713,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) { @@ -8861,11 +13724,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; @@ -8873,46 +13731,53 @@ } -class metastore_ThriftHiveMetastore_alter_partition_args { +class metastore_ThriftHiveMetastore_remove_role_member_args { static $_TSPEC; - public $db_name = null; - public $tbl_name = null; - public $new_part = null; + public $role_name = null; + public $user_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' => '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, ), ); } 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['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['new_part'])) { - $this->new_part = $vals['new_part']; + if (isset($vals['is_group'])) { + $this->is_group = $vals['is_group']; } } } public function getName() { - return 'ThriftHiveMetastore_alter_partition_args'; + return 'ThriftHiveMetastore_remove_role_member_args'; } public function read($input) @@ -8932,22 +13797,28 @@ { 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); } @@ -8964,23 +13835,25 @@ 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(); } $xfer += $output->writeFieldStop(); @@ -8990,39 +13863,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) @@ -9040,18 +13912,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); } @@ -9068,17 +13939,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; @@ -9086,37 +13957,45 @@ } -class metastore_ThriftHiveMetastore_get_config_value_args { +class metastore_ThriftHiveMetastore_list_security_user_grant_args { static $_TSPEC; - public $name = null; - public $defaultValue = 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' => 'name', + 'var' => 'principla_name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'defaultValue', - 'type' => TType::STRING, + 'var' => 'is_role', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'is_group', + 'type' => TType::BOOL, ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['principla_name'])) { + $this->principla_name = $vals['principla_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']; } } } public function getName() { - return 'ThriftHiveMetastore_get_config_value_args'; + return 'ThriftHiveMetastore_list_security_user_grant_args'; } public function read($input) @@ -9136,14 +14015,21 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->principla_name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->defaultValue); + 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); } @@ -9160,15 +14046,20 @@ 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_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->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(); } $xfer += $output->writeFieldStop(); @@ -9178,7 +14069,7 @@ } -class metastore_ThriftHiveMetastore_get_config_value_result { +class metastore_ThriftHiveMetastore_list_security_user_grant_result { static $_TSPEC; public $success = null; @@ -9189,12 +14080,17 @@ self::$_TSPEC = array( 0 => array( 'var' => 'success', - 'type' => TType::STRING, + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityUser', + ), ), 1 => array( 'var' => 'o1', 'type' => TType::STRUCT, - 'class' => 'metastore_ConfigValSecurityException', + 'class' => 'metastore_MetaException', ), ); } @@ -9209,7 +14105,7 @@ } public function getName() { - return 'ThriftHiveMetastore_get_config_value_result'; + return 'ThriftHiveMetastore_list_security_user_grant_result'; } public function read($input) @@ -9228,15 +14124,26 @@ switch ($fid) { case 0: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->success); + 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_SecurityUser(); + $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_ConfigValSecurityException(); + $this->o1 = new metastore_MetaException(); $xfer += $this->o1->read($input); } else { $xfer += $input->skip($ftype); @@ -9254,10 +14161,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_config_value_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_user_grant_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 $iter365) + { + $xfer += $iter365->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9272,29 +14191,53 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_vals_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_vals_args'; + return 'ThriftHiveMetastore_list_security_db_grant_args'; } public function read($input) @@ -9314,7 +14257,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); } @@ -9331,10 +14295,25 @@ 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_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(); @@ -9344,7 +14323,7 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_vals_result { +class metastore_ThriftHiveMetastore_list_security_db_grant_result { static $_TSPEC; public $success = null; @@ -9356,9 +14335,10 @@ 0 => array( 'var' => 'success', 'type' => TType::LST, - 'etype' => TType::STRING, + 'etype' => TType::STRUCT, 'elem' => array( - 'type' => TType::STRING, + 'type' => TType::STRUCT, + 'class' => 'metastore_SecurityDB', ), ), 1 => array( @@ -9379,7 +14359,7 @@ } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_result'; + return 'ThriftHiveMetastore_list_security_db_grant_result'; } public function read($input) @@ -9400,14 +14380,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) + $_size366 = 0; + $_etype369 = 0; + $xfer += $input->readListBegin($_etype369, $_size366); + for ($_i370 = 0; $_i370 < $_size366; ++$_i370) { - $elem229 = null; - $xfer += $input->readString($elem229); - $this->success []= $elem229; + $elem371 = null; + $elem371 = new metastore_SecurityDB(); + $xfer += $elem371->read($input); + $this->success []= $elem371; } $xfer += $input->readListEnd(); } else { @@ -9434,18 +14415,18 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_vals_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::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 $iter372) { - $xfer += $output->writeString($iter230); + $xfer += $iter372->write($output); } } $output->writeListEnd(); @@ -9464,29 +14445,61 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_spec_args { +class metastore_ThriftHiveMetastore_list_security_table_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 $table_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, + ), + 5 => array( + 'var' => 'table_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']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; } } } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_args'; + return 'ThriftHiveMetastore_list_security_table_grant_args'; } public function read($input) @@ -9506,7 +14519,35 @@ { 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); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); } else { $xfer += $input->skip($ftype); } @@ -9523,10 +14564,30 @@ 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_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->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(); @@ -9536,7 +14597,7 @@ } -class metastore_ThriftHiveMetastore_partition_name_to_spec_result { +class metastore_ThriftHiveMetastore_list_security_table_grant_result { static $_TSPEC; public $success = null; @@ -9547,14 +14608,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_SecurityTablePartition', ), ), 1 => array( @@ -9575,7 +14633,7 @@ } public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_result'; + return 'ThriftHiveMetastore_list_security_table_grant_result'; } public function read($input) @@ -9594,21 +14652,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) + $_size373 = 0; + $_etype376 = 0; + $xfer += $input->readListBegin($_etype376, $_size373); + for ($_i377 = 0; $_i377 < $_size373; ++$_i377) { - $key236 = ''; - $val237 = ''; - $xfer += $input->readString($key236); - $xfer += $input->readString($val237); - $this->success[$key236] = $val237; + $elem378 = null; + $elem378 = new metastore_SecurityTablePartition(); + $xfer += $elem378->read($input); + $this->success []= $elem378; } - $xfer += $input->readMapEnd(); + $xfer += $input->readListEnd(); } else { $xfer += $input->skip($ftype); } @@ -9633,22 +14689,21 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_partition_name_to_spec_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_table_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 $iter379) { - $xfer += $output->writeString($kiter238); - $xfer += $output->writeString($viter239); + $xfer += $iter379->write($output); } } - $output->writeMapEnd(); + $output->writeListEnd(); } $xfer += $output->writeFieldEnd(); } @@ -9664,39 +14719,69 @@ } -class metastore_ThriftHiveMetastore_add_index_args { +class metastore_ThriftHiveMetastore_list_security_partition_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 $part_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, + ), + 6 => array( + 'var' => 'part_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']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; } } } public function getName() { - return 'ThriftHiveMetastore_add_index_args'; + return 'ThriftHiveMetastore_list_security_partition_grant_args'; } public function read($input) @@ -9715,17 +14800,43 @@ 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); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); } else { $xfer += $input->skip($ftype); } @@ -9742,21 +14853,35 @@ 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_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->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(); + } + 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(); @@ -9766,35 +14891,27 @@ } -class metastore_ThriftHiveMetastore_add_index_result { +class metastore_ThriftHiveMetastore_list_security_partition_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', ), ); @@ -9806,17 +14923,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_partition_grant_result'; } public function read($input) @@ -9835,37 +14946,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(); + $_size380 = 0; + $_etype383 = 0; + $xfer += $input->readListBegin($_etype383, $_size380); + for ($_i384 = 0; $_i384 < $_size380; ++$_i384) + { + $elem385 = null; + $elem385 = new metastore_SecurityTablePartition(); + $xfer += $elem385->read($input); + $this->success []= $elem385; + } + $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; @@ -9878,13 +14983,22 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_add_index_result'); + $xfer += $output->writeStructBegin('ThriftHiveMetastore_list_security_partition_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 $iter386) + { + $xfer += $iter386->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -9892,16 +15006,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; @@ -9909,53 +15013,69 @@ } -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 $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' => '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['index_name'])) { - $this->index_name = $vals['index_name']; + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_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) @@ -9975,28 +15095,42 @@ { 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->column_name); } else { $xfer += $input->skip($ftype); } @@ -10013,25 +15147,35 @@ public function write($output) { $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_index_by_name_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); + $xfer += $output->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->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->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->index_name !== null) { - $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); - $xfer += $output->writeString($this->index_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->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); + 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->column_name !== null) { + $xfer += $output->writeFieldBegin('column_name', TType::STRING, 6); + $xfer += $output->writeString($this->column_name); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10041,28 +15185,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', ), ); @@ -10074,14 +15217,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) @@ -10100,28 +15240,31 @@ switch ($fid) { case 0: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->success); + if ($ftype == TType::LST) { + $this->success = array(); + $_size387 = 0; + $_etype390 = 0; + $xfer += $input->readListBegin($_etype390, $_size387); + for ($_i391 = 0; $_i391 < $_size387; ++$_i391) + { + $elem392 = null; + $elem392 = new metastore_SecurityColumn(); + $xfer += $elem392->read($input); + $this->success []= $elem392; + } + $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; @@ -10134,10 +15277,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 $iter393) + { + $xfer += $iter393->write($output); + } + } + $output->writeListEnd(); + } $xfer += $output->writeFieldEnd(); } if ($this->o1 !== null) { @@ -10145,11 +15300,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; @@ -10157,45 +15307,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) @@ -10215,21 +15382,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); } @@ -10246,20 +15428,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(); @@ -10269,31 +15464,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)) { @@ -10303,14 +15491,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) @@ -10329,9 +15514,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); } @@ -10344,14 +15528,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; @@ -10364,13 +15540,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) { @@ -10378,11 +15551,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; @@ -10390,45 +15558,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) @@ -10448,21 +15625,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); } @@ -10479,20 +15664,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(); @@ -10502,33 +15695,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', ), ); @@ -10540,14 +15722,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) @@ -10566,39 +15745,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; @@ -10611,22 +15771,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) { @@ -10634,11 +15782,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; @@ -10646,45 +15789,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) @@ -10704,21 +15915,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(); + $_size394 = 0; + $_etype397 = 0; + $xfer += $input->readListBegin($_etype397, $_size394); + for ($_i398 = 0; $_i398 < $_size394; ++$_i398) + { + $elem399 = null; + $elem399 = new metastore_Database(); + $xfer += $elem399->read($input); + $this->dbs []= $elem399; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->tables = array(); + $_size400 = 0; + $_etype403 = 0; + $xfer += $input->readListBegin($_etype403, $_size400); + for ($_i404 = 0; $_i404 < $_size400; ++$_i404) + { + $elem405 = null; + $elem405 = new metastore_Table(); + $xfer += $elem405->read($input); + $this->tables []= $elem405; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::LST) { + $this->parts = array(); + $_size406 = 0; + $_etype409 = 0; + $xfer += $input->readListBegin($_etype409, $_size406); + for ($_i410 = 0; $_i410 < $_size406; ++$_i410) + { + $elem411 = null; + $elem411 = new metastore_Partition(); + $xfer += $elem411->read($input); + $this->parts []= $elem411; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::MAP) { + $this->columns = array(); + $_size412 = 0; + $_ktype413 = 0; + $_vtype414 = 0; + $xfer += $input->readMapBegin($_ktype413, $_vtype414, $_size412); + for ($_i416 = 0; $_i416 < $_size412; ++$_i416) + { + $key417 = new metastore_Table(); + $val418 = array(); + $key417 = new metastore_Table(); + $xfer += $key417->read($input); + $val418 = array(); + $_size419 = 0; + $_etype422 = 0; + $xfer += $input->readListBegin($_etype422, $_size419); + for ($_i423 = 0; $_i423 < $_size419; ++$_i423) + { + $elem424 = null; + $xfer += $input->readString($elem424); + $val418 []= $elem424; + } + $xfer += $input->readListEnd(); + $this->columns[$key417] = $val418; + } + $xfer += $input->readMapEnd(); } else { $xfer += $input->skip($ftype); } @@ -10735,20 +16038,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 $iter425) + { + $xfer += $iter425->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 $iter426) + { + $xfer += $iter426->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 $iter427) + { + $xfer += $iter427->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 $kiter428 => $viter429) + { + $xfer += $kiter428->write($output); + { + $output->writeListBegin(TType::STRING, count($viter429)); + { + foreach ($viter429 as $iter430) + { + $xfer += $output->writeString($iter430); + } + } + $output->writeListEnd(); + } + } + } + $output->writeMapEnd(); + } $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -10758,25 +16144,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', ), @@ -10786,14 +16168,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) @@ -10812,26 +16194,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); } @@ -10848,27 +16220,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 1030336) +++ 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,53 +586,45 @@ } -class metastore_SerDeInfo { +class metastore_Role { static $_TSPEC; - public $name = null; - public $serializationLib = null; - public $parameters = null; + public $roleName = null; + public $createTime = null; + public $ownerName = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'name', + 'var' => 'roleName', 'type' => TType::STRING, ), 2 => array( - 'var' => 'serializationLib', - 'type' => TType::STRING, + 'var' => 'createTime', + 'type' => TType::I32, ), 3 => array( - 'var' => 'parameters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), + 'var' => 'ownerName', + 'type' => TType::STRING, ), ); } if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; + if (isset($vals['roleName'])) { + $this->roleName = $vals['roleName']; } - if (isset($vals['serializationLib'])) { - $this->serializationLib = $vals['serializationLib']; + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; } - if (isset($vals['parameters'])) { - $this->parameters = $vals['parameters']; + if (isset($vals['ownerName'])) { + $this->ownerName = $vals['ownerName']; } } } public function getName() { - return 'SerDeInfo'; + return 'Role'; } public function read($input) @@ -550,34 +644,21 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->name); + $xfer += $input->readString($this->roleName); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->serializationLib); + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); } 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->ownerName); } else { $xfer += $input->skip($ftype); } @@ -594,33 +675,20 @@ 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->writeStructBegin('Role'); + if ($this->roleName !== null) { + $xfer += $output->writeFieldBegin('roleName', TType::STRING, 1); + $xfer += $output->writeString($this->roleName); $xfer += $output->writeFieldEnd(); } - if ($this->serializationLib !== null) { - $xfer += $output->writeFieldBegin('serializationLib', TType::STRING, 2); - $xfer += $output->writeString($this->serializationLib); + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 2); + $xfer += $output->writeI32($this->createTime); $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 $kiter14 => $viter15) - { - $xfer += $output->writeString($kiter14); - $xfer += $output->writeString($viter15); - } - } - $output->writeMapEnd(); - } + if ($this->ownerName !== null) { + $xfer += $output->writeFieldBegin('ownerName', TType::STRING, 3); + $xfer += $output->writeString($this->ownerName); $xfer += $output->writeFieldEnd(); } $xfer += $output->writeFieldStop(); @@ -630,37 +698,54 @@ } -class metastore_Order { +class metastore_Database { static $_TSPEC; - public $col = null; - public $order = null; + public $name = null; + public $description = null; + public $locationUri = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array( 1 => array( - 'var' => 'col', + 'var' => 'name', 'type' => TType::STRING, ), 2 => array( - 'var' => 'order', - 'type' => TType::I32, + 'var' => 'description', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'locationUri', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', ), ); } if (is_array($vals)) { - if (isset($vals['col'])) { - $this->col = $vals['col']; + if (isset($vals['name'])) { + $this->name = $vals['name']; } - if (isset($vals['order'])) { - $this->order = $vals['order']; + if (isset($vals['description'])) { + $this->description = $vals['description']; + } + if (isset($vals['locationUri'])) { + $this->locationUri = $vals['locationUri']; + } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; } } } public function getName() { - return 'Order'; + return 'Database'; } public function read($input) @@ -680,14 +765,29 @@ { case 1: if ($ftype == TType::STRING) { - $xfer += $input->readString($this->col); + $xfer += $input->readString($this->name); } else { $xfer += $input->skip($ftype); } break; case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->order); + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->description); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->locationUri); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->privileges = new metastore_PrincipalPrivilegeSet(); + $xfer += $this->privileges->read($input); } else { $xfer += $input->skip($ftype); } @@ -704,15 +804,266 @@ 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('Database'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); $xfer += $output->writeFieldEnd(); } - if ($this->order !== null) { - $xfer += $output->writeFieldBegin('order', TType::I32, 2); - $xfer += $output->writeI32($this->order); + if ($this->description !== null) { + $xfer += $output->writeFieldBegin('description', TType::STRING, 2); + $xfer += $output->writeString($this->description); + $xfer += $output->writeFieldEnd(); + } + if ($this->locationUri !== null) { + $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3); + $xfer += $output->writeString($this->locationUri); + $xfer += $output->writeFieldEnd(); + } + if ($this->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(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_SerDeInfo { + static $_TSPEC; + + public $name = null; + public $serializationLib = null; + public $parameters = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'serializationLib', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['serializationLib'])) { + $this->serializationLib = $vals['serializationLib']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + } + } + + public function getName() { + return 'SerDeInfo'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->serializationLib); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_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(); @@ -860,15 +1211,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 +1272,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 +1289,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 +1307,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 +1345,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 +1395,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 +1412,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 +1429,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 +1461,7 @@ public $viewOriginalText = null; public $viewExpandedText = null; public $tableType = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -1176,6 +1528,11 @@ 'var' => 'tableType', 'type' => TType::STRING, ), + 13 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', + ), ); } if (is_array($vals)) { @@ -1215,6 +1572,9 @@ if (isset($vals['tableType'])) { $this->tableType = $vals['tableType']; } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } } } @@ -1290,15 +1650,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 +1668,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 +1706,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 +1773,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 +1790,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 +1815,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 +1840,7 @@ public $lastAccessTime = null; public $sd = null; public $parameters = null; + public $privileges = null; public function __construct($vals=null) { if (!isset(self::$_TSPEC)) { @@ -1509,6 +1886,11 @@ 'type' => TType::STRING, ), ), + 8 => array( + 'var' => 'privileges', + 'type' => TType::STRUCT, + 'class' => 'metastore_PrincipalPrivilegeSet', + ), ); } if (is_array($vals)) { @@ -1533,6 +1915,9 @@ if (isset($vals['parameters'])) { $this->parameters = $vals['parameters']; } + if (isset($vals['privileges'])) { + $this->privileges = $vals['privileges']; + } } } @@ -1558,14 +1943,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 +1996,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 +2042,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 +2087,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; @@ -1761,60 +2162,1285 @@ 'type' => TType::STRUCT, 'class' => 'metastore_StorageDescriptor', ), - 9 => array( - 'var' => 'parameters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, + 9 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 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 $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' => '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['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::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->columnPrivileges !== null) { + if (!is_array($this->columnPrivileges)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columnPrivileges', TType::MAP, 3); + { + $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, ), - 'val' => array( - 'type' => TType::STRING, - ), + 7 => array( + 'var' => 'table', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', ), - 10 => array( - 'var' => 'deferredRebuild', - 'type' => TType::BOOL, + 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 +3460,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 +3494,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 +3528,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 +3554,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 +3582,86 @@ } -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 $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' => '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['column'])) { + $this->column = $vals['column']; } } } public function getName() { - return 'Schema'; + return 'SecurityColumn'; } public function read($input) @@ -2064,39 +3680,58 @@ 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::STRING) { + $xfer += $input->readString($this->column); } else { $xfer += $input->skip($ftype); } @@ -2113,40 +3748,48 @@ 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 $iter100) - { - $xfer += $iter100->write($output); - } - } - $output->writeListEnd(); - } + $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->properties !== null) { - if (!is_array($this->properties)) { + 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('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('table', TType::STRUCT, 7); + $xfer += $this->table->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->column !== null) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 8); + $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 1030336) +++ metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote (working copy) @@ -59,6 +59,23 @@ 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)' + print ' bool drop_role(string role_name)' + print ' bool add_role_member(string role_name, string user_name, bool is_role, bool is_group)' + print ' bool remove_role_member(string role_name, string user_name, bool is_role, bool is_group)' + 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 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) @@ -335,4 +352,106 @@ 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) != 2: + print 'create_role requires 2 args' + sys.exit(1) + pp.pprint(client.create_role(args[0],args[1],)) + +elif cmd == 'drop_role': + if len(args) != 1: + print 'drop_role requires 1 args' + sys.exit(1) + pp.pprint(client.drop_role(args[0],)) + +elif cmd == 'add_role_member': + if len(args) != 4: + print 'add_role_member requires 4 args' + sys.exit(1) + pp.pprint(client.add_role_member(args[0],args[1],eval(args[2]),eval(args[3]),)) + +elif cmd == 'remove_role_member': + if len(args) != 4: + print 'remove_role_member requires 4 args' + sys.exit(1) + pp.pprint(client.remove_role_member(args[0],args[1],eval(args[2]),eval(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) != 6: + print 'list_security_column_grant requires 6 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],)) + +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 1030336) +++ metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py (working copy) @@ -331,6 +331,180 @@ """ 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): + """ + Parameters: + - role_name + - owner_name + """ + pass + + def drop_role(self, role_name): + """ + Parameters: + - role_name + """ + pass + + def add_role_member(self, role_name, user_name, is_role, is_group): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + """ + pass + + def remove_role_member(self, role_name, user_name, is_role, is_group): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + """ + 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, column_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_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): """ @@ -1710,686 +1884,4053 @@ 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() -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["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_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 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_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 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_db_privilege_set(self, db_name, user_name, group_names): + """ + Parameters: + - db_name + - user_name + - group_names + """ + self.send_get_db_privilege_set(db_name, user_name, group_names) + return self.recv_get_db_privilege_set() - def 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_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_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_db_privilege_set(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_db_privilege_set_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "get_db_privilege_set failed: unknown result"); + + def get_table_privilege_set(self, db_name, table_name, user_name, group_names): + """ + Parameters: + - db_name + - table_name + - user_name + - group_names + """ + self.send_get_table_privilege_set(db_name, table_name, user_name, group_names) + return self.recv_get_table_privilege_set() + + def send_get_table_privilege_set(self, db_name, table_name, user_name, group_names): + self._oprot.writeMessageBegin('get_table_privilege_set', TMessageType.CALL, self._seqid) + args = get_table_privilege_set_args() + args.db_name = db_name + args.table_name = table_name + args.user_name = user_name + args.group_names = group_names + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() - def 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 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_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 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_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 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_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 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_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 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_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 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_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 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_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 create_role(self, role_name, owner_name): + """ + Parameters: + - role_name + - owner_name + """ + self.send_create_role(role_name, owner_name) + return self.recv_create_role() - 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 send_create_role(self, role_name, owner_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.write(self._oprot) + self._oprot.writeMessageEnd() + self._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 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_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 drop_role(self, role_name): + """ + Parameters: + - role_name + """ + self.send_drop_role(role_name) + return self.recv_drop_role() + + def send_drop_role(self, role_name): + self._oprot.writeMessageBegin('drop_role', TMessageType.CALL, self._seqid) + args = drop_role_args() + args.role_name = role_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_drop_role(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = drop_role_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_role failed: unknown result"); + + def add_role_member(self, role_name, user_name, is_role, is_group): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + """ + self.send_add_role_member(role_name, user_name, is_role, is_group) + return self.recv_add_role_member() + + def send_add_role_member(self, role_name, user_name, is_role, is_group): + 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.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_add_role_member(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = add_role_member_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "add_role_member failed: unknown result"); + + def remove_role_member(self, role_name, user_name, is_role, is_group): + """ + Parameters: + - role_name + - user_name + - is_role + - is_group + """ + self.send_remove_role_member(role_name, user_name, is_role, is_group) + return self.recv_remove_role_member() + + def send_remove_role_member(self, role_name, user_name, is_role, is_group): + 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.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_remove_role_member(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = remove_role_member_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "remove_role_member failed: unknown result"); + + def list_security_user_grant(self, principla_name, is_role, is_group): + """ + Parameters: + - principla_name + - is_role + - is_group + """ + self.send_list_security_user_grant(principla_name, is_role, is_group) + return self.recv_list_security_user_grant() + + def send_list_security_user_grant(self, principla_name, is_role, is_group): + self._oprot.writeMessageBegin('list_security_user_grant', TMessageType.CALL, self._seqid) + args = list_security_user_grant_args() + args.principla_name = principla_name + args.is_role = is_role + args.is_group = is_group + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_user_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_user_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_user_grant failed: unknown result"); + + def list_security_db_grant(self, principal_name, is_group, is_role, db_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + """ + self.send_list_security_db_grant(principal_name, is_group, is_role, db_name) + return self.recv_list_security_db_grant() + + def send_list_security_db_grant(self, principal_name, is_group, is_role, db_name): + self._oprot.writeMessageBegin('list_security_db_grant', TMessageType.CALL, self._seqid) + args = list_security_db_grant_args() + args.principal_name = principal_name + args.is_group = is_group + args.is_role = is_role + args.db_name = db_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_db_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_db_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_db_grant failed: unknown result"); + + def list_security_table_grant(self, principal_name, is_group, is_role, db_name, table_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + """ + self.send_list_security_table_grant(principal_name, is_group, is_role, db_name, table_name) + return self.recv_list_security_table_grant() + + def send_list_security_table_grant(self, principal_name, is_group, is_role, db_name, table_name): + self._oprot.writeMessageBegin('list_security_table_grant', TMessageType.CALL, self._seqid) + args = list_security_table_grant_args() + args.principal_name = principal_name + args.is_group = is_group + args.is_role = is_role + args.db_name = db_name + args.table_name = table_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_table_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_table_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_table_grant failed: unknown result"); + + def list_security_partition_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_name + """ + self.send_list_security_partition_grant(principal_name, is_group, is_role, db_name, table_name, part_name) + return self.recv_list_security_partition_grant() + + def send_list_security_partition_grant(self, principal_name, is_group, is_role, db_name, table_name, part_name): + self._oprot.writeMessageBegin('list_security_partition_grant', TMessageType.CALL, self._seqid) + args = list_security_partition_grant_args() + args.principal_name = principal_name + args.is_group = is_group + args.is_role = is_role + args.db_name = db_name + args.table_name = table_name + args.part_name = part_name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_list_security_partition_grant(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = list_security_partition_grant_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success != None: + return result.success + if result.o1 != None: + raise result.o1 + raise TApplicationException(TApplicationException.MISSING_RESULT, "list_security_partition_grant failed: unknown result"); + + def list_security_column_grant(self, principal_name, is_group, is_role, db_name, table_name, column_name): + """ + Parameters: + - principal_name + - is_group + - is_role + - db_name + - table_name + - column_name + """ + self.send_list_security_column_grant(principal_name, is_group, is_role, db_name, table_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, 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.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_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["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_security_user_grant"] = Processor.process_list_security_user_grant + self._processMap["list_security_db_grant"] = Processor.process_list_security_db_grant + self._processMap["list_security_table_grant"] = Processor.process_list_security_table_grant + self._processMap["list_security_partition_grant"] = Processor.process_list_security_partition_grant + self._processMap["list_security_column_grant"] = Processor.process_list_security_column_grant + self._processMap["grant_privileges"] = Processor.process_grant_privileges + self._processMap["revoke_privileges"] = Processor.process_revoke_privileges + self._processMap["revoke_all_privileges"] = Processor.process_revoke_all_privileges + + def process(self, iprot, oprot): + (name, type, seqid) = iprot.readMessageBegin() + if name not in self._processMap: + iprot.skip(TType.STRUCT) + iprot.readMessageEnd() + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + return + else: + self._processMap[name](self, seqid, iprot, oprot) + return True + + def process_create_database(self, seqid, iprot, oprot): + args = create_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_database_result() + try: + self._handler.create_database(args.database) + except AlreadyExistsException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("create_database", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_database(self, seqid, iprot, oprot): + args = get_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_database_result() + try: + result.success = self._handler.get_database(args.name) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_database", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_database(self, seqid, iprot, oprot): + args = drop_database_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_database_result() + try: + self._handler.drop_database(args.name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except InvalidOperationException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_databases(self, seqid, iprot, oprot): + args = get_databases_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_databases_result() + try: + result.success = self._handler.get_databases(args.pattern) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_all_databases(self, seqid, iprot, oprot): + args = get_all_databases_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_all_databases_result() + try: + result.success = self._handler.get_all_databases() + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_all_databases", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_type(self, seqid, iprot, oprot): + args = get_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_type_result() + try: + result.success = self._handler.get_type(args.name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_type(self, seqid, iprot, oprot): + args = create_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_type_result() + try: + result.success = self._handler.create_type(args.type) + except AlreadyExistsException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("create_type", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_type(self, seqid, iprot, oprot): + args = drop_type_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_type_result() + try: + result.success = self._handler.drop_type(args.type) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_type_all(self, seqid, iprot, oprot): + args = get_type_all_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_type_all_result() + try: + result.success = self._handler.get_type_all(args.name) + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_type_all", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_fields(self, seqid, iprot, oprot): + args = get_fields_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_fields_result() + try: + result.success = self._handler.get_fields(args.db_name, args.table_name) + except MetaException, o1: + result.o1 = o1 + except UnknownTableException, o2: + result.o2 = o2 + except UnknownDBException, o3: + result.o3 = o3 + oprot.writeMessageBegin("get_fields", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_schema(self, seqid, iprot, oprot): + args = get_schema_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_schema_result() + try: + result.success = self._handler.get_schema(args.db_name, args.table_name) + except MetaException, o1: + result.o1 = o1 + except UnknownTableException, o2: + result.o2 = o2 + except UnknownDBException, o3: + result.o3 = o3 + oprot.writeMessageBegin("get_schema", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_create_table(self, seqid, iprot, oprot): + args = create_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = create_table_result() + try: + self._handler.create_table(args.tbl) + except AlreadyExistsException, o1: + result.o1 = o1 + except InvalidObjectException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + except NoSuchObjectException, o4: + result.o4 = o4 + oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_table(self, seqid, iprot, oprot): + args = drop_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_table_result() + try: + self._handler.drop_table(args.dbname, args.name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_tables(self, seqid, iprot, oprot): + args = get_tables_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_tables_result() + try: + result.success = self._handler.get_tables(args.db_name, args.pattern) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_tables", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() def process_get_all_tables(self, seqid, iprot, oprot): args = get_all_tables_args() args.read(iprot) iprot.readMessageEnd() - result = get_all_tables_result() + result = get_all_tables_result() + try: + result.success = self._handler.get_all_tables(args.db_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_table(self, seqid, iprot, oprot): + args = get_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_table_result() + try: + result.success = self._handler.get_table(args.dbname, args.tbl_name) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_alter_table(self, seqid, iprot, oprot): + args = alter_table_args() + args.read(iprot) + iprot.readMessageEnd() + result = alter_table_result() + try: + self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) + except InvalidOperationException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("alter_table", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_add_partition(self, seqid, iprot, oprot): + args = add_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = add_partition_result() + try: + result.success = self._handler.add_partition(args.new_part) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("add_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition(self, seqid, iprot, oprot): + args = append_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_result() + try: + result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("append_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append_partition_by_name(self, seqid, iprot, oprot): + args = append_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_partition_by_name_result() + try: + result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) + except InvalidObjectException, o1: + result.o1 = o1 + except AlreadyExistsException, o2: + result.o2 = o2 + except MetaException, o3: + result.o3 = o3 + oprot.writeMessageBegin("append_partition_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition(self, seqid, iprot, oprot): + args = drop_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_result() + try: + result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_partition_by_name(self, seqid, iprot, oprot): + args = drop_partition_by_name_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_partition_by_name_result() + try: + result.success = self._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) + except NoSuchObjectException, o1: + result.o1 = o1 + except MetaException, o2: + result.o2 = o2 + oprot.writeMessageBegin("drop_partition_by_name", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition(self, seqid, iprot, oprot): + args = get_partition_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_partition_result() + try: + result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals) + except MetaException, o1: + result.o1 = o1 + except NoSuchObjectException, o2: + result.o2 = o2 + oprot.writeMessageBegin("get_partition", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get_partition_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_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_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_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.get_all_tables(args.db_name) + 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 - oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid) + 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) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("create_role", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_drop_role(self, seqid, iprot, oprot): + args = drop_role_args() + args.read(iprot) + iprot.readMessageEnd() + result = drop_role_result() + try: + result.success = self._handler.drop_role(args.role_name) + except MetaException, o1: + result.o1 = o1 + oprot.writeMessageBegin("drop_role", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_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) + 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) + 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_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.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() - 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() + +# 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 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 __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - 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 __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - 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 __ne__(self, other): + return not (self == other) - 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() +class get_table_args: + """ + Attributes: + - dbname + - tbl_name + """ - 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() + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'dbname', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + ) - 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 __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 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 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 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 __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - def process_get_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 __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - 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 __ne__(self, other): + return not (self == other) - 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() +class alter_table_args: + """ + Attributes: + - dbname + - tbl_name + - new_tbl + """ - 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() + 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 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 __init__(self, dbname=None, tbl_name=None, new_tbl=None,): + self.dbname = dbname + self.tbl_name = tbl_name + self.new_tbl = new_tbl - 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 read(self, 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 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 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 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 __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - def process_partition_name_to_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 __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - 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 __ne__(self, other): + return not (self == other) - 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() +class alter_table_result: + """ + Attributes: + - o1 + - o2 + """ - def process_get_index_by_name(self, seqid, iprot, oprot): - args = get_index_by_name_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_index_by_name_result() - try: - result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) - except MetaException, o1: - result.o1 = o1 - except NoSuchObjectException, o2: - result.o2 = o2 - oprot.writeMessageBegin("get_index_by_name", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() + 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 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 __init__(self, o1=None, o2=None,): + self.o1 = o1 + self.o2 = o2 - 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 read(self, 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__ -# HELPER FUNCTIONS AND STRUCTURES + def __ne__(self, other): + return not (self == other) -class create_database_args: +class add_partition_args: """ Attributes: - - database + - new_part """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 1 + (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1 ) - def __init__(self, database=None,): - self.database = database + 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: @@ -2402,8 +5943,8 @@ break if fid == 1: if ftype == TType.STRUCT: - self.database = Database() - self.database.read(iprot) + self.new_part = Partition() + self.new_part.read(iprot) else: iprot.skip(ftype) else: @@ -2415,10 +5956,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('create_database_args') - if self.database != None: - oprot.writeFieldBegin('database', TType.STRUCT, 1) - self.database.write(oprot) + 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() @@ -2434,22 +5975,24 @@ def __ne__(self, other): return not (self == other) -class create_database_result: +class add_partition_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 + (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, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success self.o1 = o1 self.o2 = o2 self.o3 = o3 @@ -2463,15 +6006,21 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: + if fid == 0: if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() + 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 = InvalidObjectException() + self.o2 = AlreadyExistsException() self.o2.read(iprot) else: iprot.skip(ftype) @@ -2490,7 +6039,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('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) @@ -2517,19 +6070,25 @@ def __ne__(self, other): return not (self == other) -class get_database_args: +class append_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: @@ -2542,7 +6101,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 = [] + (_etype227, _size224) = iprot.readListBegin() + for _i228 in xrange(_size224): + _elem229 = iprot.readString(); + self.part_vals.append(_elem229) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -2554,10 +6128,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('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() @@ -2573,24 +6158,27 @@ def __ne__(self, other): return not (self == other) -class get_database_result: +class append_partition_result: """ Attributes: - success - o1 - o2 + - o3 """ 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', (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: @@ -2603,22 +6191,28 @@ 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 = InvalidObjectException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = MetaException() + 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() @@ -2628,7 +6222,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('append_partition_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -2641,6 +6235,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() @@ -2655,22 +6253,25 @@ def __ne__(self, other): return not (self == other) -class drop_database_args: +class append_partition_by_name_args: """ Attributes: - - name - - deleteData + - db_name + - tbl_name + - part_name """ 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.STRING, 'part_name', None, None, ), # 3 ) - def __init__(self, name=None, deleteData=None,): - self.name = name - self.deleteData = deleteData + 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: @@ -2683,12 +6284,17 @@ 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.STRING: + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -2700,14 +6306,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_database_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + 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.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_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 3) + oprot.writeString(self.part_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -2723,22 +6333,24 @@ def __ne__(self, other): return not (self == other) -class drop_database_result: +class append_partition_by_name_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 + (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, o1=None, o2=None, o3=None,): + def __init__(self, success=None, o1=None, o2=None, o3=None,): + self.success = success self.o1 = o1 self.o2 = o2 self.o3 = o3 @@ -2752,15 +6364,21 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: + if fid == 0: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() + 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 = InvalidOperationException() + self.o2 = AlreadyExistsException() self.o2.read(iprot) else: iprot.skip(ftype) @@ -2779,7 +6397,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('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) @@ -2806,19 +6428,28 @@ def __ne__(self, other): return not (self == other) -class get_databases_args: +class drop_partition_args: """ Attributes: - - pattern + - db_name + - tbl_name + - part_vals + - deleteData """ 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.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 ) - def __init__(self, pattern=None,): - self.pattern = pattern + 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: @@ -2831,7 +6462,27 @@ 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.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: @@ -2843,10 +6494,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_databases_args') - if self.pattern != None: - oprot.writeFieldBegin('pattern', TType.STRING, 1) - oprot.writeString(self.pattern) + 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() @@ -2862,21 +6528,24 @@ def __ne__(self, other): return not (self == other) -class get_databases_result: +class drop_partition_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.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 + self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -2888,21 +6557,22 @@ 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.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = MetaException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -2912,18 +6582,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('drop_partition_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.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() @@ -2938,11 +6609,29 @@ def __ne__(self, other): return not (self == other) -class get_all_databases_args: +class drop_partition_by_name_args: + """ + Attributes: + - db_name + - tbl_name + - part_name + - deleteData + """ thrift_spec = ( + None, # 0 + (1, TType.STRING, 'db_name', None, None, ), # 1 + (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (3, TType.STRING, 'part_name', None, None, ), # 3 + (4, TType.BOOL, 'deleteData', None, None, ), # 4 ) + 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: fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) @@ -2952,6 +6641,26 @@ (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) + elif fid == 4: + if ftype == TType.BOOL: + self.deleteData = iprot.readBool(); + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -2961,7 +6670,23 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_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('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() @@ -2976,21 +6701,24 @@ def __ne__(self, other): return not (self == other) -class get_all_databases_result: +class drop_partition_by_name_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.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2 ) - def __init__(self, success=None, o1=None,): + def __init__(self, success=None, o1=None, o2=None,): self.success = success self.o1 = o1 + self.o2 = o2 def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3002,21 +6730,22 @@ if ftype == TType.STOP: break 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) - iprot.readListEnd() + if ftype == TType.BOOL: + self.success = iprot.readBool(); else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = MetaException() + self.o1 = NoSuchObjectException() self.o1.read(iprot) else: iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.o2 = MetaException() + self.o2.read(iprot) + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3026,18 +6755,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_result') + oprot.writeStructBegin('drop_partition_by_name_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.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() @@ -3052,19 +6782,25 @@ def __ne__(self, other): return not (self == other) -class get_type_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: @@ -3077,7 +6813,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: @@ -3089,10 +6840,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_type_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() @@ -3108,7 +6870,7 @@ def __ne__(self, other): return not (self == other) -class get_type_result: +class get_partition_result: """ Attributes: - success @@ -3117,7 +6879,7 @@ """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), 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 ) @@ -3138,7 +6900,7 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Type() + self.success = Partition() self.success.read(iprot) else: iprot.skip(ftype) @@ -3163,7 +6925,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_type_result') + oprot.writeStructBegin('get_partition_result') if self.success != None: oprot.writeFieldBegin('success', TType.STRUCT, 0) self.success.write(oprot) @@ -3190,19 +6952,25 @@ def __ne__(self, other): return not (self == other) -class create_type_args: +class get_partition_by_name_args: """ Attributes: - - type + - db_name + - tbl_name + - part_name """ 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.STRING, 'part_name', None, None, ), # 3 ) - def __init__(self, type=None,): - self.type = type + 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: @@ -3214,9 +6982,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.STRING: + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -3228,10 +7005,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_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() @@ -3247,27 +7032,24 @@ def __ne__(self, other): return not (self == other) -class create_type_result: +class get_partition_by_name_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.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, 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: @@ -3279,28 +7061,23 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.STRUCT: + self.success = Partition() + self.success.read(iprot) else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() + 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() @@ -3310,10 +7087,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('create_type_result') + oprot.writeStructBegin('get_partition_by_name_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) @@ -3323,10 +7100,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() @@ -3341,19 +7114,25 @@ def __ne__(self, other): return not (self == other) -class drop_type_args: +class get_partitions_args: """ Attributes: - - type + - db_name + - tbl_name + - 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.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: @@ -3366,7 +7145,17 @@ 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.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3378,10 +7167,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_args') - if self.type != None: - oprot.writeFieldBegin('type', TType.STRING, 1) - oprot.writeString(self.type) + 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() @@ -3397,7 +7194,7 @@ def __ne__(self, other): return not (self == other) -class drop_type_result: +class get_partitions_result: """ Attributes: - success @@ -3406,9 +7203,9 @@ """ 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 + (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,): @@ -3426,19 +7223,25 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.LIST: + self.success = [] + (_etype248, _size245) = iprot.readListBegin() + for _i249 in xrange(_size245): + _elem250 = Partition() + _elem250.read(iprot) + self.success.append(_elem250) + 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) @@ -3451,10 +7254,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('drop_type_result') + oprot.writeStructBegin('get_partitions_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 iter251 in self.success: + iter251.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -3478,19 +7284,25 @@ def __ne__(self, other): return not (self == other) -class get_type_all_args: +class get_partition_names_args: """ Attributes: - - name + - db_name + - tbl_name + - max_parts """ 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 ) - def __init__(self, name=None,): - self.name = name + 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: @@ -3503,7 +7315,17 @@ 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) else: @@ -3515,10 +7337,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_type_all_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) + 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() @@ -3534,7 +7364,7 @@ def __ne__(self, other): return not (self == other) -class get_type_all_result: +class get_partition_names_result: """ Attributes: - success @@ -3542,7 +7372,7 @@ """ thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -3560,15 +7390,13 @@ 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 = [] + (_etype255, _size252) = iprot.readListBegin() + for _i256 in xrange(_size252): + _elem257 = iprot.readString(); + self.success.append(_elem257) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -3586,14 +7414,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_all_result') + oprot.writeStructBegin('get_partition_names_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.STRING, len(self.success)) + for iter258 in self.success: + oprot.writeString(iter258) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o2 != None: oprot.writeFieldBegin('o2', TType.STRUCT, 1) @@ -3613,22 +7440,28 @@ def __ne__(self, other): return not (self == other) -class get_fields_args: +class get_partitions_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: @@ -3646,7 +7479,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 = [] + (_etype262, _size259) = iprot.readListBegin() + for _i263 in xrange(_size259): + _elem264 = iprot.readString(); + self.part_vals.append(_elem264) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3658,14 +7506,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_partitions_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 iter265 in self.part_vals: + oprot.writeString(iter265) + 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() @@ -3681,27 +7540,21 @@ def __ne__(self, other): return not (self == other) -class get_fields_result: +class get_partitions_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.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 ) - 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: @@ -3715,11 +7568,11 @@ 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) + (_etype269, _size266) = iprot.readListBegin() + for _i270 in xrange(_size266): + _elem271 = Partition() + _elem271.read(iprot) + self.success.append(_elem271) iprot.readListEnd() else: iprot.skip(ftype) @@ -3729,18 +7582,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() @@ -3750,26 +7591,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_partitions_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) + for iter272 in self.success: + iter272.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() @@ -3784,22 +7617,28 @@ def __ne__(self, other): return not (self == other) -class get_schema_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: @@ -3817,7 +7656,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 = [] + (_etype276, _size273) = iprot.readListBegin() + for _i277 in xrange(_size273): + _elem278 = iprot.readString(); + self.part_vals.append(_elem278) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3829,14 +7683,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_schema_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 iter279 in self.part_vals: + oprot.writeString(iter279) + 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() @@ -3852,27 +7717,21 @@ def __ne__(self, other): return not (self == other) -class get_schema_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: @@ -3886,11 +7745,10 @@ 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) + (_etype283, _size280) = iprot.readListBegin() + for _i284 in xrange(_size280): + _elem285 = iprot.readString(); + self.success.append(_elem285) iprot.readListEnd() else: iprot.skip(ftype) @@ -3900,18 +7758,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() @@ -3921,26 +7767,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_schema_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 iter139 in self.success: - iter139.write(oprot) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter286 in self.success: + oprot.writeString(iter286) 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() @@ -3955,19 +7793,28 @@ def __ne__(self, other): return not (self == other) -class create_table_args: +class get_partitions_by_filter_args: """ Attributes: - - tbl + - db_name + - tbl_name + - filter + - max_parts """ 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.STRING, 'filter', None, None, ), # 3 + (4, TType.I16, 'max_parts', None, -1, ), # 4 ) - def __init__(self, tbl=None,): - self.tbl = tbl + def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): + self.db_name = db_name + self.tbl_name = tbl_name + self.filter = filter + self.max_parts = max_parts def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -3979,9 +7826,23 @@ if ftype == TType.STOP: break if fid == 1: - if ftype == TType.STRUCT: - self.tbl = Table() - self.tbl.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.filter = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I16: + self.max_parts = iprot.readI16(); else: iprot.skip(ftype) else: @@ -3993,10 +7854,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_table_args') - if self.tbl != None: - oprot.writeFieldBegin('tbl', TType.STRUCT, 1) - self.tbl.write(oprot) + oprot.writeStructBegin('get_partitions_by_filter_args') + if self.db_name != None: + oprot.writeFieldBegin('db_name', TType.STRING, 1) + oprot.writeString(self.db_name) + oprot.writeFieldEnd() + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) + oprot.writeFieldEnd() + if self.filter != None: + oprot.writeFieldBegin('filter', TType.STRING, 3) + oprot.writeString(self.filter) + oprot.writeFieldEnd() + if self.max_parts != None: + oprot.writeFieldBegin('max_parts', TType.I16, 4) + oprot.writeI16(self.max_parts) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4012,28 +7885,24 @@ def __ne__(self, other): return not (self == other) -class create_table_result: +class get_partitions_by_filter_result: """ Attributes: + - success - 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 + (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, o1=None, o2=None, o3=None, o4=None,): + def __init__(self, success=None, o1=None, o2=None,): + self.success = success 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: @@ -4044,30 +7913,29 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype290, _size287) = iprot.readListBegin() + for _i291 in xrange(_size287): + _elem292 = Partition() + _elem292.read(iprot) + self.success.append(_elem292) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: if ftype == TType.STRUCT: - self.o1 = AlreadyExistsException() + self.o1 = MetaException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = InvalidObjectException() + 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) - elif fid == 4: - if ftype == TType.STRUCT: - self.o4 = NoSuchObjectException() - self.o4.read(iprot) - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -4077,7 +7945,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('create_table_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 iter293 in self.success: + iter293.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) @@ -4086,14 +7961,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() @@ -4108,25 +7975,25 @@ def __ne__(self, other): return not (self == other) -class drop_table_args: +class alter_partition_args: """ Attributes: - - dbname - - name - - deleteData + - db_name + - tbl_name + - new_part """ 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, '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, dbname=None, name=None, deleteData=None,): - self.dbname = dbname - self.name = name - self.deleteData = deleteData + 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: @@ -4139,17 +8006,18 @@ break if fid == 1: if ftype == TType.STRING: - self.dbname = iprot.readString(); + self.db_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.name = iprot.readString(); + self.tbl_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 3: - if ftype == TType.BOOL: - self.deleteData = iprot.readBool(); + if ftype == TType.STRUCT: + self.new_part = Partition() + self.new_part.read(iprot) else: iprot.skip(ftype) else: @@ -4161,18 +8029,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_table_args') - if self.dbname != None: - oprot.writeFieldBegin('dbname', TType.STRING, 1) - oprot.writeString(self.dbname) + 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.name != None: - oprot.writeFieldBegin('name', TType.STRING, 2) - oprot.writeString(self.name) + if self.tbl_name != None: + oprot.writeFieldBegin('tbl_name', TType.STRING, 2) + oprot.writeString(self.tbl_name) oprot.writeFieldEnd() - if self.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 3) - oprot.writeBool(self.deleteData) + if self.new_part != None: + oprot.writeFieldBegin('new_part', TType.STRUCT, 3) + self.new_part.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4188,22 +8056,22 @@ def __ne__(self, other): return not (self == other) -class drop_table_result: +class alter_partition_result: """ Attributes: - o1 - - o3 + - o2 """ thrift_spec = ( None, # 0 - (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2 + (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, o3=None,): + def __init__(self, o1=None, o2=None,): self.o1 = o1 - self.o3 = o3 + 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: @@ -4216,14 +8084,14 @@ break if fid == 1: if ftype == TType.STRUCT: - self.o1 = NoSuchObjectException() + self.o1 = InvalidOperationException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o3 = MetaException() - self.o3.read(iprot) + self.o2 = MetaException() + self.o2.read(iprot) else: iprot.skip(ftype) else: @@ -4235,14 +8103,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_result') + oprot.writeStructBegin('alter_partition_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) + if self.o2 != None: + oprot.writeFieldBegin('o2', TType.STRUCT, 2) + self.o2.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4258,22 +8126,22 @@ def __ne__(self, other): return not (self == other) -class get_tables_args: +class get_config_value_args: """ Attributes: - - db_name - - pattern + - name + - defaultValue """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'pattern', None, None, ), # 2 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.STRING, 'defaultValue', None, None, ), # 2 ) - def __init__(self, db_name=None, pattern=None,): - self.db_name = db_name - self.pattern = pattern + def __init__(self, name=None, defaultValue=None,): + self.name = name + self.defaultValue = defaultValue def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -4286,12 +8154,12 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.pattern = iprot.readString(); + self.defaultValue = iprot.readString(); else: iprot.skip(ftype) else: @@ -4303,14 +8171,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_tables_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + oprot.writeStructBegin('get_config_value_args') + if self.name != None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) oprot.writeFieldEnd() - if self.pattern != None: - oprot.writeFieldBegin('pattern', TType.STRING, 2) - oprot.writeString(self.pattern) + if self.defaultValue != None: + oprot.writeFieldBegin('defaultValue', TType.STRING, 2) + oprot.writeString(self.defaultValue) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4326,7 +8194,7 @@ def __ne__(self, other): return not (self == other) -class get_tables_result: +class get_config_value_result: """ Attributes: - success @@ -4334,8 +8202,8 @@ """ thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 + (0, TType.STRING, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1 ) def __init__(self, success=None, o1=None,): @@ -4352,18 +8220,13 @@ if ftype == TType.STOP: break 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) - iprot.readListEnd() + if ftype == TType.STRING: + self.success = iprot.readString(); else: iprot.skip(ftype) elif fid == 1: if ftype == TType.STRUCT: - self.o1 = MetaException() + self.o1 = ConfigValSecurityException() self.o1.read(iprot) else: iprot.skip(ftype) @@ -4376,13 +8239,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_result') + oprot.writeStructBegin('get_config_value_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) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.STRING, 0) + oprot.writeString(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -4402,19 +8262,19 @@ def __ne__(self, other): return not (self == other) -class get_all_tables_args: +class partition_name_to_vals_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: @@ -4427,7 +8287,7 @@ break if fid == 1: if ftype == TType.STRING: - self.db_name = iprot.readString(); + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -4439,10 +8299,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_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() @@ -4458,7 +8318,7 @@ def __ne__(self, other): return not (self == other) -class get_all_tables_result: +class partition_name_to_vals_result: """ Attributes: - success @@ -4486,10 +8346,10 @@ 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) + (_etype297, _size294) = iprot.readListBegin() + for _i298 in xrange(_size294): + _elem299 = iprot.readString(); + self.success.append(_elem299) iprot.readListEnd() else: iprot.skip(ftype) @@ -4508,12 +8368,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_all_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 iter153 in self.success: - oprot.writeString(iter153) + for iter300 in self.success: + oprot.writeString(iter300) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -4534,22 +8394,19 @@ def __ne__(self, other): return not (self == other) -class get_table_args: +class partition_name_to_spec_args: """ Attributes: - - dbname - - tbl_name + - part_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'dbname', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 + (1, TType.STRING, 'part_name', None, None, ), # 1 ) - def __init__(self, dbname=None, tbl_name=None,): - self.dbname = dbname - self.tbl_name = tbl_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: @@ -4562,12 +8419,7 @@ 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(); + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -4579,14 +8431,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_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.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() @@ -4602,24 +8450,21 @@ def __ne__(self, other): return not (self == other) -class get_table_result: +class partition_name_to_spec_result: """ Attributes: - success - o1 - - o2 """ thrift_spec = ( - (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0 + (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,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: @@ -4631,9 +8476,14 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRUCT: - self.success = Table() - self.success.read(iprot) + if ftype == TType.MAP: + self.success = {} + (_ktype302, _vtype303, _size301 ) = iprot.readMapBegin() + for _i305 in xrange(_size301): + _key306 = iprot.readString(); + _val307 = iprot.readString(); + self.success[_key306] = _val307 + iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 1: @@ -4642,12 +8492,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() @@ -4657,19 +8501,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_table_result') + oprot.writeStructBegin('partition_name_to_spec_result') if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) + for kiter308,viter309 in self.success.items(): + oprot.writeString(kiter308) + oprot.writeString(viter309) + oprot.writeMapEnd() 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() @@ -4684,25 +8528,22 @@ def __ne__(self, other): return not (self == other) -class alter_table_args: +class add_index_args: """ Attributes: - - dbname - - tbl_name - - new_tbl + - new_index + - index_table """ 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 + (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, new_tbl=None,): - self.dbname = dbname - self.tbl_name = tbl_name - self.new_tbl = new_tbl + 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: @@ -4714,19 +8555,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(); - else: - iprot.skip(ftype) - elif fid == 3: if ftype == TType.STRUCT: - self.new_tbl = Table() - self.new_tbl.read(iprot) + self.index_table = Table() + self.index_table.read(iprot) else: iprot.skip(ftype) else: @@ -4738,18 +8575,14 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('alter_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.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.new_tbl != None: - oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3) - self.new_tbl.write(oprot) + if self.index_table != None: + oprot.writeFieldBegin('index_table', TType.STRUCT, 2) + self.index_table.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -4765,22 +8598,27 @@ def __ne__(self, other): return not (self == other) -class alter_table_result: +class add_index_result: """ Attributes: + - success - o1 - o2 + - o3 """ 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.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, 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: @@ -4791,18 +8629,30 @@ (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: + if fid == 0: if ftype == TType.STRUCT: - self.o1 = InvalidOperationException() + self.success = Index() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.o1 = InvalidObjectException() self.o1.read(iprot) else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRUCT: - self.o2 = MetaException() + 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() @@ -4812,7 +8662,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('alter_table_result') + oprot.writeStructBegin('add_index_result') + if self.success != None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) self.o1.write(oprot) @@ -4821,6 +8675,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() @@ -4835,19 +8693,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: @@ -4859,9 +8726,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: @@ -4873,10 +8754,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() @@ -4892,27 +8785,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: @@ -4924,29 +8814,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() @@ -4956,10 +8839,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) @@ -4969,10 +8852,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() @@ -4987,25 +8866,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: @@ -5027,13 +8906,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: @@ -5045,7 +8919,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) @@ -5054,12 +8928,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() @@ -5075,27 +8946,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: @@ -5108,28 +8976,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() @@ -5139,7 +9001,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) @@ -5152,10 +9014,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() @@ -5170,25 +9028,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: @@ -5210,8 +9068,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: @@ -5223,7 +9081,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) @@ -5232,9 +9090,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() @@ -5250,27 +9108,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: @@ -5282,29 +9137,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 = [] + (_etype313, _size310) = iprot.readListBegin() + for _i314 in xrange(_size310): + _elem315 = Index() + _elem315.read(iprot) + self.success.append(_elem315) + 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() @@ -5314,10 +9168,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 iter316 in self.success: + iter316.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -5327,10 +9184,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() @@ -5345,28 +9198,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: @@ -5388,18 +9238,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: @@ -5411,7 +9251,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) @@ -5420,16 +9260,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() @@ -5445,23 +9278,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): @@ -5474,18 +9304,17 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.LIST: + self.success = [] + (_etype320, _size317) = iprot.readListBegin() + for _i321 in xrange(_size317): + _elem322 = iprot.readString(); + self.success.append(_elem322) + 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: @@ -5499,17 +9328,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 iter323 in self.success: + oprot.writeString(iter323) + 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() @@ -5526,28 +9354,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: @@ -5560,22 +9382,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 = [] + (_etype327, _size324) = iprot.readListBegin() + for _i328 in xrange(_size324): + _elem329 = iprot.readString(); + self.group_names.append(_elem329) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -5587,22 +9404,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 iter330 in self.group_names: + oprot.writeString(iter330) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5618,24 +9430,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: @@ -5647,22 +9456,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() @@ -5672,19 +9476,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() @@ -5699,25 +9499,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: @@ -5735,16 +9535,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 = [] + (_etype334, _size331) = iprot.readListBegin() + for _i335 in xrange(_size331): + _elem336 = iprot.readString(); + self.group_names.append(_elem336) iprot.readListEnd() else: iprot.skip(ftype) @@ -5757,20 +9557,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 iter337 in self.group_names: + oprot.writeString(iter337) oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() @@ -5787,24 +9587,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: @@ -5817,20 +9614,14 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Partition() + self.success = PrincipalPrivilegeSet() 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: + elif fid == 1: if ftype == TType.STRUCT: - self.o2 = NoSuchObjectException() - self.o2.read(iprot) + self.o1 = MetaException() + self.o1.read(iprot) else: iprot.skip(ftype) else: @@ -5842,7 +9633,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) @@ -5851,10 +9642,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() @@ -5869,25 +9656,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: @@ -5905,12 +9695,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 = [] + (_etype341, _size338) = iprot.readListBegin() + for _i342 in xrange(_size338): + _elem343 = iprot.readString(); + self.group_names.append(_elem343) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -5922,18 +9722,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 iter344 in self.group_names: + oprot.writeString(iter344) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -5949,24 +9756,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: @@ -5979,7 +9783,7 @@ break if fid == 0: if ftype == TType.STRUCT: - self.success = Partition() + self.success = PrincipalPrivilegeSet() self.success.read(iprot) else: iprot.skip(ftype) @@ -5989,12 +9793,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() @@ -6004,7 +9802,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) @@ -6013,10 +9811,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() @@ -6031,25 +9825,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: @@ -6067,12 +9867,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.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.user_name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.LIST: + self.group_names = [] + (_etype348, _size345) = iprot.readListBegin() + for _i349 in xrange(_size345): + _elem350 = iprot.readString(); + self.group_names.append(_elem350) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -6084,18 +9899,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 iter351 in self.group_names: + oprot.writeString(iter351) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6111,24 +9937,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: @@ -6140,28 +9963,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() @@ -6171,22 +9983,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() @@ -6201,25 +10006,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: @@ -6237,12 +10051,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 = [] + (_etype355, _size352) = iprot.readListBegin() + for _i356 in xrange(_size352): + _elem357 = iprot.readString(); + self.group_names.append(_elem357) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -6254,18 +10088,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 iter358 in self.group_names: + oprot.writeString(iter358) + oprot.writeListEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6281,21 +10130,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: @@ -6307,19 +10156,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: @@ -6331,17 +10176,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() @@ -6357,28 +10199,22 @@ def __ne__(self, other): return not (self == other) -class get_partitions_ps_args: +class create_role_args: """ Attributes: - - db_name - - tbl_name - - part_vals - - max_parts + - role_name + - owner_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 + (1, TType.STRING, 'role_name', None, None, ), # 1 + (2, TType.STRING, 'owner_name', None, None, ), # 2 ) - 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 __init__(self, role_name=None, owner_name=None,): + self.role_name = role_name + self.owner_name = owner_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: @@ -6391,27 +10227,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 = [] - (_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(); + self.owner_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -6422,26 +10243,15 @@ def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_partitions_ps_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) - oprot.writeFieldEnd() - if self.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) - oprot.writeFieldEnd() - if self.part_vals != None: - oprot.writeFieldBegin('part_vals', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.part_vals)) - for iter195 in self.part_vals: - oprot.writeString(iter195) - oprot.writeListEnd() + return + 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.max_parts != None: - oprot.writeFieldBegin('max_parts', TType.I16, 4) - oprot.writeI16(self.max_parts) + if self.owner_name != None: + oprot.writeFieldBegin('owner_name', TType.STRING, 2) + oprot.writeString(self.owner_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6457,7 +10267,7 @@ def __ne__(self, other): return not (self == other) -class get_partitions_ps_result: +class create_role_result: """ Attributes: - success @@ -6465,7 +10275,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 ) @@ -6483,14 +10293,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: @@ -6508,13 +10312,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) @@ -6534,28 +10335,19 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_ps_args: +class drop_role_args: """ Attributes: - - db_name - - tbl_name - - part_vals - - max_parts + - role_name """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'db_name', None, None, ), # 1 - (2, TType.STRING, 'tbl_name', None, None, ), # 2 - (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3 - (4, TType.I16, 'max_parts', None, -1, ), # 4 + (1, TType.STRING, 'role_name', None, None, ), # 1 ) - 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 __init__(self, role_name=None,): + self.role_name = role_name def read(self, iprot): if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: @@ -6568,27 +10360,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.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.role_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -6600,25 +10372,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_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 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.writeStructBegin('drop_role_args') + if self.role_name != None: + oprot.writeFieldBegin('role_name', TType.STRING, 1) + oprot.writeString(self.role_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6634,7 +10391,7 @@ def __ne__(self, other): return not (self == other) -class get_partition_names_ps_result: +class drop_role_result: """ Attributes: - success @@ -6642,7 +10399,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 ) @@ -6660,13 +10417,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: @@ -6684,13 +10436,10 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('get_partition_names_ps_result') + oprot.writeStructBegin('drop_role_result') if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter216 in self.success: - oprot.writeString(iter216) - oprot.writeListEnd() + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -6710,28 +10459,28 @@ def __ne__(self, other): return not (self == other) -class get_partitions_by_filter_args: +class add_role_member_args: """ Attributes: - - db_name - - tbl_name - - filter - - max_parts + - role_name + - user_name + - is_role + - is_group """ 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 ) - def __init__(self, db_name=None, tbl_name=None, filter=None, max_parts=thrift_spec[4][4],): - self.db_name = db_name - self.tbl_name = tbl_name - self.filter = filter - self.max_parts = max_parts + def __init__(self, role_name=None, user_name=None, is_role=None, is_group=None,): + self.role_name = role_name + self.user_name = user_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: @@ -6744,22 +10493,22 @@ 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) else: @@ -6771,22 +10520,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_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() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6802,24 +10551,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: @@ -6831,14 +10577,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: @@ -6847,12 +10587,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() @@ -6862,22 +10596,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() @@ -6892,25 +10619,28 @@ def __ne__(self, other): return not (self == other) -class alter_partition_args: +class remove_role_member_args: """ Attributes: - - db_name - - tbl_name - - new_part + - role_name + - user_name + - is_role + - is_group """ 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 ) - 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 __init__(self, role_name=None, user_name=None, is_role=None, is_group=None,): + self.role_name = role_name + self.user_name = user_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: @@ -6923,18 +10653,22 @@ 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) else: @@ -6946,18 +10680,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_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() oprot.writeFieldStop() oprot.writeStructEnd() @@ -6973,22 +10711,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: @@ -6999,16 +10736,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: @@ -7020,15 +10756,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() @@ -7043,22 +10779,25 @@ def __ne__(self, other): return not (self == other) -class get_config_value_args: +class list_security_user_grant_args: """ Attributes: - - name - - defaultValue + - principla_name + - is_role + - is_group """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.STRING, 'defaultValue', None, None, ), # 2 + (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, name=None, defaultValue=None,): - self.name = name - self.defaultValue = defaultValue + 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: @@ -7071,12 +10810,17 @@ break if fid == 1: if ftype == TType.STRING: - self.name = iprot.readString(); + self.principla_name = iprot.readString(); else: iprot.skip(ftype) elif fid == 2: - if ftype == TType.STRING: - self.defaultValue = 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) else: @@ -7088,14 +10832,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_config_value_args') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.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.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() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7111,16 +10859,16 @@ def __ne__(self, other): return not (self == other) -class get_config_value_result: +class list_security_user_grant_result: """ Attributes: - success - o1 """ - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'o1', (ConfigValSecurityException, ConfigValSecurityException.thrift_spec), None, ), # 1 + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityUser, SecurityUser.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) def __init__(self, success=None, o1=None,): @@ -7137,13 +10885,19 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString(); + if ftype == TType.LIST: + self.success = [] + (_etype362, _size359) = iprot.readListBegin() + for _i363 in xrange(_size359): + _elem364 = SecurityUser() + _elem364.read(iprot) + self.success.append(_elem364) + 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) @@ -7156,10 +10910,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_security_user_grant_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 iter365 in self.success: + iter365.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -7179,19 +10936,28 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_vals_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: @@ -7204,7 +10970,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: @@ -7216,10 +10997,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_vals_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() @@ -7235,7 +11028,7 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_vals_result: +class list_security_db_grant_result: """ Attributes: - success @@ -7243,7 +11036,7 @@ """ thrift_spec = ( - (0, TType.LIST, 'success', (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 ) @@ -7263,10 +11056,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) + (_etype369, _size366) = iprot.readListBegin() + for _i370 in xrange(_size366): + _elem371 = SecurityDB() + _elem371.read(iprot) + self.success.append(_elem371) iprot.readListEnd() else: iprot.skip(ftype) @@ -7285,12 +11079,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_db_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 iter372 in self.success: + iter372.write(oprot) oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: @@ -7311,19 +11105,31 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_spec_args: +class list_security_table_grant_args: """ Attributes: - - part_name + - principal_name + - is_group + - is_role + - db_name + - table_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 + (5, TType.STRING, 'table_name', None, None, ), # 5 ) - 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, 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: @@ -7336,7 +11142,27 @@ 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) + elif fid == 5: + if ftype == TType.STRING: + self.table_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7348,10 +11174,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('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_table_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() + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 5) + oprot.writeString(self.table_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7367,7 +11209,7 @@ def __ne__(self, other): return not (self == other) -class partition_name_to_spec_result: +class list_security_table_grant_result: """ Attributes: - success @@ -7375,7 +11217,7 @@ """ thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 + (0, TType.LIST, 'success', (TType.STRUCT,(SecurityTablePartition, SecurityTablePartition.thrift_spec)), None, ), # 0 (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1 ) @@ -7393,14 +11235,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 = [] + (_etype376, _size373) = iprot.readListBegin() + for _i377 in xrange(_size373): + _elem378 = SecurityTablePartition() + _elem378.read(iprot) + self.success.append(_elem378) + iprot.readListEnd() else: iprot.skip(ftype) elif fid == 1: @@ -7418,14 +11260,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_table_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 iter379 in self.success: + iter379.write(oprot) + oprot.writeListEnd() oprot.writeFieldEnd() if self.o1 != None: oprot.writeFieldBegin('o1', TType.STRUCT, 1) @@ -7445,22 +11286,34 @@ def __ne__(self, other): return not (self == other) -class add_index_args: +class list_security_partition_grant_args: """ Attributes: - - new_index - - index_table + - principal_name + - is_group + - is_role + - db_name + - table_name + - part_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 + (6, TType.STRING, 'part_name', None, None, ), # 6 ) - 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, 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: @@ -7472,15 +11325,33 @@ 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) + elif fid == 6: + if ftype == TType.STRING: + self.part_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7492,14 +11363,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('add_index_args') - if self.new_index != None: - oprot.writeFieldBegin('new_index', TType.STRUCT, 1) - self.new_index.write(oprot) + 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.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() + if self.part_name != None: + oprot.writeFieldBegin('part_name', TType.STRING, 6) + oprot.writeString(self.part_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7515,27 +11402,21 @@ def __ne__(self, other): return not (self == other) -class add_index_result: +class list_security_partition_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: @@ -7547,29 +11428,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 = [] + (_etype383, _size380) = iprot.readListBegin() + for _i384 in xrange(_size380): + _elem385 = SecurityTablePartition() + _elem385.read(iprot) + self.success.append(_elem385) + 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() @@ -7579,23 +11453,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_partition_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 iter386 in self.success: + iter386.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() @@ -7610,28 +11479,34 @@ 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 + - 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, 'column_name', None, None, ), # 6 ) - 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, 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.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: @@ -7644,22 +11519,32 @@ 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.column_name = iprot.readString(); else: iprot.skip(ftype) else: @@ -7671,22 +11556,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('drop_index_by_name_args') - if self.db_name != None: - oprot.writeFieldBegin('db_name', TType.STRING, 1) - oprot.writeString(self.db_name) + 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.tbl_name != None: - oprot.writeFieldBegin('tbl_name', TType.STRING, 2) - oprot.writeString(self.tbl_name) + if self.is_group != None: + oprot.writeFieldBegin('is_group', TType.BOOL, 2) + oprot.writeBool(self.is_group) oprot.writeFieldEnd() - if self.index_name != None: - oprot.writeFieldBegin('index_name', TType.STRING, 3) - oprot.writeString(self.index_name) + 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.deleteData != None: - oprot.writeFieldBegin('deleteData', TType.BOOL, 4) - oprot.writeBool(self.deleteData) + if self.table_name != None: + oprot.writeFieldBegin('table_name', TType.STRING, 5) + oprot.writeString(self.table_name) + oprot.writeFieldEnd() + if self.column_name != None: + oprot.writeFieldBegin('column_name', TType.STRING, 6) + oprot.writeString(self.column_name) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -7702,24 +11595,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: @@ -7731,22 +11621,22 @@ if ftype == TType.STOP: break if fid == 0: - if ftype == TType.BOOL: - self.success = iprot.readBool(); + if ftype == TType.LIST: + self.success = [] + (_etype390, _size387) = iprot.readListBegin() + for _i391 in xrange(_size387): + _elem392 = SecurityColumn() + _elem392.read(iprot) + self.success.append(_elem392) + 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() @@ -7756,19 +11646,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 iter393 in self.success: + iter393.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() @@ -7783,25 +11672,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: @@ -7814,17 +11709,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: @@ -7836,18 +11742,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() @@ -7863,24 +11777,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: @@ -7892,9 +11803,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: @@ -7903,12 +11813,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() @@ -7918,19 +11822,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() @@ -7945,25 +11845,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: @@ -7976,17 +11879,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: @@ -7998,18 +11907,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() @@ -8025,24 +11938,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: @@ -8054,28 +11964,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() @@ -8085,22 +11983,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() @@ -8115,25 +12006,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: @@ -8146,17 +12052,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 = [] + (_etype397, _size394) = iprot.readListBegin() + for _i398 in xrange(_size394): + _elem399 = Database() + _elem399.read(iprot) + self.dbs.append(_elem399) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.LIST: + self.tables = [] + (_etype403, _size400) = iprot.readListBegin() + for _i404 in xrange(_size400): + _elem405 = Table() + _elem405.read(iprot) + self.tables.append(_elem405) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.LIST: + self.parts = [] + (_etype409, _size406) = iprot.readListBegin() + for _i410 in xrange(_size406): + _elem411 = Partition() + _elem411.read(iprot) + self.parts.append(_elem411) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.MAP: + self.columns = {} + (_ktype413, _vtype414, _size412 ) = iprot.readMapBegin() + for _i416 in xrange(_size412): + _key417 = Table() + _key417.read(iprot) + _val418 = [] + (_etype422, _size419) = iprot.readListBegin() + for _i423 in xrange(_size419): + _elem424 = iprot.readString(); + _val418.append(_elem424) + iprot.readListEnd() + self.columns[_key417] = _val418 + iprot.readMapEnd() else: iprot.skip(ftype) else: @@ -8168,18 +12129,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 iter425 in self.dbs: + iter425.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.tables != None: + oprot.writeFieldBegin('tables', TType.LIST, 6) + oprot.writeListBegin(TType.STRUCT, len(self.tables)) + for iter426 in self.tables: + iter426.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.parts != None: + oprot.writeFieldBegin('parts', TType.LIST, 7) + oprot.writeListBegin(TType.STRUCT, len(self.parts)) + for iter427 in self.parts: + iter427.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 kiter428,viter429 in self.columns.items(): + kiter428.write(oprot) + oprot.writeListBegin(TType.STRING, len(viter429)) + for iter430 in viter429: + oprot.writeString(iter430) + oprot.writeListEnd() + oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -8195,21 +12192,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: @@ -8221,19 +12218,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: @@ -8245,17 +12237,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 1030336) +++ metastore/src/gen-py/hive_metastore/ttypes.py (working copy) @@ -265,12 +265,203 @@ 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 Role: + """ + Attributes: + - roleName + - createTime + - ownerName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'roleName', None, None, ), # 1 + (2, TType.I32, 'createTime', None, None, ), # 2 + (3, TType.STRING, 'ownerName', None, None, ), # 3 + ) + + def __init__(self, roleName=None, createTime=None, ownerName=None,): + self.roleName = roleName + self.createTime = createTime + self.ownerName = ownerName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.roleName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.createTime = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.ownerName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Role') + if self.roleName != None: + oprot.writeFieldBegin('roleName', TType.STRING, 1) + oprot.writeString(self.roleName) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 2) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.ownerName != None: + oprot.writeFieldBegin('ownerName', TType.STRING, 3) + oprot.writeString(self.ownerName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def __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 +469,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 +502,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 +530,10 @@ 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() @@ -387,11 +590,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 +619,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 +759,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 +801,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 +843,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 +874,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 +922,7 @@ - viewOriginalText - viewExpandedText - tableType + - privileges """ thrift_spec = ( @@ -735,9 +939,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 +955,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 +1005,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 +1039,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 +1086,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 +1110,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 +1138,7 @@ - lastAccessTime - sd - parameters + - privileges """ thrift_spec = ( @@ -933,9 +1150,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 +1161,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 +1175,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 +1211,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 +1238,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 +1265,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 +1382,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 +1440,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 +1492,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 +1524,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 +1550,25 @@ def __ne__(self, other): return not (self == other) -class MetaException(Exception): +class ColumnPrivilegeBag: """ Attributes: - - message + - dbName + - tableName + - 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.MAP, 'columnPrivileges', (TType.STRING,None,TType.STRING,None), None, ), # 3 ) - def __init__(self, message=None,): - self.message = message + def __init__(self, dbName=None, tableName=None, columnPrivileges=None,): + self.dbName = dbName + self.tableName = tableName + 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 +1581,23 @@ 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.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 +1609,26 @@ if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return - oprot.writeStructBegin('MetaException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) + oprot.writeStructBegin('ColumnPrivilegeBag') + if self.dbName != None: + oprot.writeFieldBegin('dbName', TType.STRING, 1) + oprot.writeString(self.dbName) + oprot.writeFieldEnd() + if self.tableName != None: + oprot.writeFieldBegin('tableName', TType.STRING, 2) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.columnPrivileges != None: + oprot.writeFieldBegin('columnPrivileges', TType.MAP, 3) + 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 +1640,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 +1677,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 +1736,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 +1786,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 +1826,638 @@ 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: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('SecurityUser') + if self.principalName != None: + oprot.writeFieldBegin('principalName', TType.STRING, 1) + oprot.writeString(self.principalName) + oprot.writeFieldEnd() + if self.isRole != None: + oprot.writeFieldBegin('isRole', TType.BOOL, 2) + oprot.writeBool(self.isRole) + oprot.writeFieldEnd() + if self.isGroup != None: + oprot.writeFieldBegin('isGroup', TType.BOOL, 3) + oprot.writeBool(self.isGroup) + oprot.writeFieldEnd() + if self.privileges != None: + oprot.writeFieldBegin('privileges', TType.STRING, 4) + oprot.writeString(self.privileges) + oprot.writeFieldEnd() + if self.createTime != None: + oprot.writeFieldBegin('createTime', TType.I32, 5) + oprot.writeI32(self.createTime) + oprot.writeFieldEnd() + if self.grantor != None: + oprot.writeFieldBegin('grantor', TType.STRING, 6) + oprot.writeString(self.grantor) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + 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 + - 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.STRING, 'column', None, None, ), # 8 + ) + + def __init__(self, principalName=None, isRole=None, isGroup=None, privileges=None, createTime=None, grantor=None, table=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.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.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.column != None: + oprot.writeFieldBegin('column', TType.STRING, 8) + 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: Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (revision 1030336) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (working copy) @@ -48,12 +48,24 @@ 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.PrivilegeSet; +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.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.serde2.Deserializer; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.SerDeUtils; @@ -360,7 +372,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; } @@ -2122,6 +2134,466 @@ 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) throws MetaException, TException { + incrementCounter("add_role_member"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + Role role = ms.getRole(roleName); + return ms.addRoleMember(role, userName, isRole, isGroup); + } + }); + } 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) + 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); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean drop_role(final String roleName) + throws MetaException, TException { + incrementCounter("drop_role"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + return ms.removeRole(roleName); + } + }); + } catch (MetaException e) { + throw e; + } catch (Exception e) { + throw new RuntimeException(e); + } + return ret; + } + + @Override + public boolean grant_privileges(final 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) throws MetaException, TException { + incrementCounter("remove_role_member"); + + Boolean ret = null; + try { + ret = executeWithRetry(new Command() { + @Override + Boolean run(RawStore ms) throws Exception { + Role mRole = ms.getRole(roleName); + return ms.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 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.listMSecurityPrincipalColumnGrant( + principalName, isGroup, isRole, dbName, tableName, columnName); + Table tbl = ms.getTable(dbName, tableName); + 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, 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 1030336) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java (working copy) @@ -40,6 +40,12 @@ 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.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; @@ -867,4 +873,126 @@ return client.drop_index_by_name(dbName, tblName, name, deleteData); } + @Override + public boolean add_role_member(String roleName, String userName, + boolean isRole, boolean isGroup) throws MetaException, TException { + return client.add_role_member(roleName, userName, isRole, isGroup); + } + + @Override + public boolean create_role(String roleName, String ownerName) + throws MetaException, TException { + return client.create_role(roleName, ownerName); + } + + @Override + public boolean drop_role(String roleName) throws MetaException, TException { + return client.drop_role(roleName); + } + + @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, dbName, 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) throws MetaException, TException { + return client.remove_role_member(roleName, userName, isRole, isGroup); + } + + @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 columnName) throws MetaException, TException { + return client.list_security_column_grant(principalName, isGroup, isRole, + dbName, tableName, 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 1030336) +++ metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java (working copy) @@ -31,6 +31,12 @@ 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.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; @@ -475,4 +481,279 @@ 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 + * @return + * @throws MetaException + * @throws TException + */ + public boolean create_role(String role_name, String owner_name) + throws MetaException, TException; + + /** + * @param role_name + * role name + * @return + * @throws MetaException + * @throws TException + */ + public boolean drop_role(String role_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 + * @return + * @throws MetaException + * @throws TException + */ + public boolean add_role_member(String role_name, String user_name, + boolean is_role, boolean is_group) 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 + * @return + * @throws MetaException + * @throws TException + */ + public boolean remove_role_member(String role_name, String user_name, + boolean is_role, boolean is_group) 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 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 1030336) +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java (working copy) @@ -45,6 +45,7 @@ import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.conf.Configuration; 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 +54,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 +66,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; @@ -651,7 +661,7 @@ .getRetention(), convertToStorageDescriptor(mtbl.getSd()), convertToFieldSchemas(mtbl.getPartitionKeys()), mtbl.getParameters(), mtbl.getViewOriginalText(), mtbl.getViewExpandedText(), - tableType); + tableType, null); } private MTable convertToMTable(Table tbl) throws InvalidObjectException, @@ -863,7 +873,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, @@ -1395,4 +1405,1165 @@ } return pns; } + + @Override + public boolean addRole(String roleName, String ownerName) throws InvalidObjectException, + MetaException { + boolean success = false; + boolean commited = false; + try { + openTransaction(); + MSecurityRoleEntity nameCheck = this.getMRole(roleName); + if (nameCheck != null) { + throw new RuntimeException("Role " + roleName + " already exists."); + } + int now = (int)(System.currentTimeMillis()/1000); + MSecurityRoleEntity mRole = new MSecurityRoleEntity(roleName, now, + ownerName); + 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 { + openTransaction(); + MSecurityRoleEntity mRole = getMRole(role.getRoleName()); + 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()); + pm.deletePersistent(roleMember); + success = commitTransaction(); + } finally { + if (!success) { + rollbackTransaction(); + } + } + return success; + } + + @Override + public boolean removeRole(String roleName) throws MetaException, + NoSuchObjectException { + boolean success = false; + try { + openTransaction(); + MSecurityRoleEntity mRol = getMRole(roleName); + 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; + } + + @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) throws NoSuchObjectException { + MSecurityRoleEntity mRole = this.getMRole(roleName); + if (mRole == null) { + throw new NoSuchObjectException(roleName + " role can not be found."); + } + Role ret = new Role(mRole.getRoleName(), mRole.getCreateTime(), mRole + .getOwnerName()); + return ret; + } + + private MSecurityRoleEntity getMRole(String roleName) { + MSecurityRoleEntity mrole = null; + boolean commited = false; + try { + openTransaction(); + Query query = pm.newQuery(MSecurityRoleEntity.class, "roleName == t1"); + query.declareParameters("java.lang.String t1"); + query.setUnique(true); + mrole = (MSecurityRoleEntity) query.execute(roleName); + pm.retrieve(mrole); + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return mrole; + } + + private MSecurityUserRoleMap getMSecurityUserRoleMap(String userName, + boolean isRole, boolean isGroup, String roleName) { + MSecurityUserRoleMap mRoleMember = null; + boolean commited = false; + try { + openTransaction(); + Query query = pm.newQuery(MSecurityUserRoleMap.class, "principalName == t1, isRole==t2, isGroup == t3, role.roleName == t4"); + query.declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3, java.lang.String t4"); + query.setUnique(true); + mRoleMember = (MSecurityUserRoleMap) query.executeWithArray(userName, isRole, isGroup, roleName); + pm.retrieve(mRoleMember); + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return mRoleMember; + } + + @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); + } + List roles = listRoles(userName, groupNames); + if (roles != null && roles.size() > 0) { + Map rolePrivs = new HashMap(); + for(MSecurityUserRoleMap role: roles) { + List roleUserPrivs = this.listMSecurityPrincipalUserGrant(role.getRole().getRoleName(), true, false); + if(roleUserPrivs.size()>0) { + String rolePrivStr = roleUserPrivs.get(0).getPrivileges(); + for (int i = 1; i < roleUserPrivs.size(); i++) { + rolePrivStr = rolePrivStr + ";" + roleUserPrivs.get(i).getPrivileges(); + } + rolePrivs.put(role.getRole().getRoleName(), rolePrivStr); + } + } + ret.setRolePrivileges(rolePrivs); + } + 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); + if (roles != null && roles.size() > 0) { + Map roleDbPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String name = role.getPrincipalName(); + 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); + if (roles != null && roles.size() > 0) { + Map rolePartPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String roleName = role.getPrincipalName(); + 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); + if (roles != null && roles.size() > 0) { + Map rolePartPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String roleName = role.getPrincipalName(); + 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, 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, + groupName, false, true)); + } + ret.setGroupPrivileges(groupPartitionPriv); + } + List roles = listRoles(userName, groupNames); + if (roles != null && roles.size() > 0) { + Map rolePartPriv = new HashMap(); + for (MSecurityUserRoleMap role : roles) { + String roleName = role.getPrincipalName(); + rolePartPriv.put(roleName, getColumnPrivilege(dbName, tableName,columnName, + 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, 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.listMSecurityPrincipalColumnGrant(userName, isGroup, isRole, + table.getDbName(), table.getTableName(), col); + 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.getTableName(), part.getDbName(), + 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(); + Map colPrivMap = colPriv.getColumnPrivileges(); + for (Map.Entry column : colPrivMap.entrySet()) { + List mSecCol = this.listMSecurityPrincipalColumnGrant( + userName, isGroup, isRole, dbName, tabName, 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; + } + } + + private List listRoles(String userName, List groupNames) { + List ret = new ArrayList(); + if(userName != null) { + ret.addAll(listRoles(userName, false, false)); + } + if (groupNames != null) { + for (String groupName: groupNames) { + ret.addAll(listRoles(groupName, false, true)); + } + } + return ret; + } + + @SuppressWarnings("unchecked") + private List listRoles(String principalName, + boolean isRole, boolean isGroup) { + boolean success = false; + List mRoleMember = null; + try { + openTransaction(); + LOG.debug("Executing listRoles"); + Query query = pm.newQuery(MSecurityUserRoleMap.class, + "principalName == t1 && isGroup == t2 && isRole == t3"); + query + .declareParameters("java.lang.String t1, java.lang.Boolean t2, java.lang.Boolean t3"); + mRoleMember = (List) query.execute(principalName, + isGroup, isRole); + 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") + public String getDBPrivilege(String dbName, + String principlaName, boolean isRole, boolean isGroup) + throws InvalidObjectException, MetaException { + boolean commited = false; + String privileges = null; + try { + openTransaction(); + if (principlaName != null) { + Query query = pm.newQuery(MSecurityDB.class, + "database.name == t1 && principalName == t2 && isRole == t3 && isGroup== t4"); + query.declareParameters( + "java.lang.String t1, java.lang.String t2, java.lang.Boolean t3, java.lang.Boolean t4"); + List userNameDbPriv = (List) query + .executeWithArray(dbName, principlaName, isRole, isGroup); + pm.retrieveAll(userNameDbPriv); + 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(); + } + } + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return privileges; + } + + @SuppressWarnings("unchecked") + private String getTablePrivilege(String dbName, String tableName, + String principalName, boolean isRole, boolean isGroup) { + boolean commited = false; + String privileges = null; + try { + openTransaction(); + if (principalName != null) { + Query query = pm.newQuery(MSecurityTablePartition.class, + "table.database.name == t1 && tableName == t2 " + + "&& principalName == t3 && isRole == t4 && isGroup== t5"); + query + .declareParameters("java.lang.String t1, java.lang.String t2, java.lang.String t3, " + + "java.lang.Boolean t4, java.lang.Boolean t5"); + List userNameTabPartPriv = (List) query + .executeWithArray(dbName, tableName, principalName, isRole, isGroup); + pm.retrieveAll(userNameTabPartPriv); + 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(); + } + } + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return privileges; + } + + @SuppressWarnings("unchecked") + private String getPartitionPrivilege(String dbName, String principalName, + String tableName, String partName, boolean isRole, boolean isGroup) { + boolean commited = false; + String privileges = null; + try { + openTransaction(); + if (principalName != null) { + Query query = pm.newQuery( + MSecurityTablePartition.class, + "table.database.name == t1 && table.tableName == t2 && partition.partitionName == t3 " + + "&& principalName == t4 && isRole == t5 && isGroup== t6"); + query.declareParameters( + "java.lang.String t1, java.lang.String t2, java.lang.String t3, java.lang.String t4, " + + "java.lang.Boolean t5, java.lang.Boolean t6"); + List userNameTabPartPriv = (List) query + .executeWithArray(dbName, tableName, partName, principalName, + isRole, isGroup); + pm.retrieveAll(userNameTabPartPriv); + 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(); + } + } + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + return privileges; + } + + @SuppressWarnings("unchecked") + private String getColumnPrivilege(String dbName, String tableName, + String columnName, String principalName, boolean isRole, boolean isGroup) { + boolean commited = false; + String privileges = null; + try { + openTransaction(); + if (principalName != null) { + Query query = pm.newQuery(MSecurityColumn.class, + "table.database.name == t1 && table.tableName == t2 && columnName == t3 " + + "&& principalName == t4 && isRole == t5 && isGroup== t6"); + query.declareParameters("java.lang.String t1, java.lang.String t2, java.lang.String t3, " + + "java.lang.String t4, java.lang.Boolean t5, java.lang.Boolean t6"); + List userNameTabPartPriv = (List) query + .executeWithArray(dbName, tableName, columnName, principalName, + isRole, isGroup); + pm.retrieveAll(userNameTabPartPriv); + 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(); + } + } + } + commited = commitTransaction(); + } finally { + if (!commited) { + rollbackTransaction(); + } + } + 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 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"); + 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; + } + + @SuppressWarnings("unchecked") + public List listMSecurityPrincipalColumnGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, String columnName) { + boolean success = false; + List mSecurityColList = null; + try { + openTransaction(); + LOG.debug("Executing listMSecurityPrincipalColumnGrant"); + Query query = pm.newQuery( + MSecurityColumn.class, + "principalName == t1 && isGroup == t2 && isRole == t3 && table.tableName == t4 && table.database.name == t5 && columnName == 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"); + 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") + 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 1030336) +++ 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,15 @@ 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; public interface RawStore extends Configurable { @@ -128,5 +136,61 @@ public abstract List getPartitionsByFilter( String dbName, String tblName, String filter, short maxParts) throws MetaException, NoSuchObjectException; + + public abstract boolean addRole(String rowName, String ownerName) throws InvalidObjectException, MetaException; + + public abstract boolean removeRole(String roleName) 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 abstract List listMSecurityPrincipalColumnGrant( + String principalName, boolean isGroup, boolean isRole, String dbName, + String tableName, 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) throws NoSuchObjectException; + + public boolean revokeAllPrivileges(String userName, boolean isRole, + boolean isGroup, boolean removeUserPriv, List dbs, + List
tables, List parts, + Map> columns) throws MetaException; } Index: metastore/src/model/package.jdo =================================================================== --- metastore/src/model/package.jdo (revision 1030336) +++ metastore/src/model/package.jdo (working copy) @@ -298,13 +298,13 @@ - + - + @@ -345,5 +345,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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,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 MSecurityColumn { + + private String principalName; + + private boolean isRole; + + private boolean isGroup; + + private MTable table; + + private String columnName; + + private String privileges; + + private int createTime; + + private String grantor; + + public MSecurityColumn() { + } + + public MSecurityColumn(String principalName, boolean isRole, boolean isGroup, + MTable table, String columnName, String privileges, int createTime, + String grantor) { + super(); + this.principalName = principalName; + this.isRole = isRole; + this.isGroup = isGroup; + this.table = table; + 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 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,75 @@ +/** + * 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; + + public MSecurityRoleEntity() { + } + + public MSecurityRoleEntity(String roleName, int createTime, String ownerName) { + super(); + this.roleName = roleName; + this.createTime = createTime; + this.ownerName = ownerName; + } + + /** + * @return role name + */ + public String getRoleName() { + return roleName; + } + + /** + * @param roleName + */ + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + /** + * @return create time + */ + public int getCreateTime() { + return createTime; + } + + /** + * @param createTime + */ + public void setCreateTime(int createTime) { + this.createTime = createTime; + } + + public String getOwnerName() { + return ownerName; + } + + public void setOwnerName(String ownerName) { + this.ownerName = ownerName; + } + +} 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,127 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.metastore.model; + +/** + * User global level privileges + */ +public class MSecurityUser { + + 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/exec/DDLTask.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (revision 1030336) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (working copy) @@ -33,14 +33,15 @@ 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; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; +import java.util.Map.Entry; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -56,12 +57,18 @@ 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.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.PrivilegeBag; +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.ql.Context; import org.apache.hadoop.hive.ql.DriverContext; import org.apache.hadoop.hive.ql.QueryPlan; @@ -82,7 +89,6 @@ import org.apache.hadoop.hive.ql.metadata.Table; import org.apache.hadoop.hive.ql.plan.AddPartitionDesc; import org.apache.hadoop.hive.ql.plan.AlterTableDesc; -import org.apache.hadoop.hive.ql.plan.AlterTableDesc.AlterTableTypes; import org.apache.hadoop.hive.ql.plan.AlterTableSimpleDesc; import org.apache.hadoop.hive.ql.plan.CreateDatabaseDesc; import org.apache.hadoop.hive.ql.plan.CreateIndexDesc; @@ -95,17 +101,26 @@ 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.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.ShowLocksDesc; import org.apache.hadoop.hive.ql.plan.ShowPartitionsDesc; import org.apache.hadoop.hive.ql.plan.ShowTableStatusDesc; import org.apache.hadoop.hive.ql.plan.ShowTablesDesc; import org.apache.hadoop.hive.ql.plan.SwitchDatabaseDesc; 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; @@ -116,6 +131,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. @@ -280,6 +296,27 @@ 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); + } } catch (InvalidTableException e) { console.printError("Table " + e.getTableName() + " does not exist"); @@ -299,6 +336,382 @@ 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; + } + outStream.writeBytes("userName:" + principalName); + outStream.write(terminator); + outStream.writeBytes("isRole:" + isRole); + outStream.write(terminator); + outStream.writeBytes("isGroup:" + isGroup); + outStream.write(terminator); + outStream.writeBytes("privileges:" + usr.getPrivileges()); + outStream.write(terminator); + outStream.writeBytes("grantTime:" + usr.getCreateTime()); + outStream.write(terminator); + outStream.writeBytes("grantor:" + usr.getGrantor()); + outStream.write(terminator); + } + } + } 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"); + } + + 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; + } + outStream.writeBytes("dbName:" + dbName); + outStream.write(terminator); + outStream.writeBytes("userName:" + principalName); + outStream.write(terminator); + outStream.writeBytes("isRole:" + isRole); + outStream.write(terminator); + outStream.writeBytes("isGroup:" + isGroup); + outStream.write(terminator); + outStream.writeBytes("privileges:" + db.getPrivileges()); + outStream.write(terminator); + outStream.writeBytes("grantTime:" + db.getCreateTime()); + outStream.write(terminator); + outStream.writeBytes("grantor:" + db.getGrantor()); + outStream.write(terminator); + } + } + + } else { + if (hiveObjectDesc.getPartSpec() != null) { + // show partition level privileges + List parts = db.showPartitionGrant(principalName, + isGroup, isRole, dbName, tableName, Warehouse.makePartName(hiveObjectDesc.getPartSpec(), false)); + if (parts != null && parts.size() > 0) { + boolean first = true; + for(SecurityTablePartition part: parts) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + outStream.writeBytes("dbName:" + dbName); + outStream.write(terminator); + outStream.writeBytes("tableName:" + tableName); + outStream.write(terminator); + outStream.writeBytes("partName:" + + Warehouse.makePartName(part.getTable().getPartitionKeys(), part + .getPart().getValues())); + outStream.write(terminator); + outStream.writeBytes("userName:" + principalName); + outStream.write(terminator); + outStream.writeBytes("isRole:" + isRole); + outStream.write(terminator); + outStream.writeBytes("isGroup:" + isGroup); + outStream.write(terminator); + outStream.writeBytes("privileges:" + part.getPrivileges()); + outStream.write(terminator); + outStream.writeBytes("grantTime:" + part.getCreateTime()); + outStream.write(terminator); + outStream.writeBytes("grantor:" + part.getGrantor()); + outStream.write(terminator); + } + } + } else if (showGrantDesc.getColumns() != null) { + // show column level privileges + for (String columnName : showGrantDesc.getColumns()) { + List columnss = db.showColumnGrant(principalName, + isGroup, isRole, dbName, tableName, columnName); + if (columnss != null && columnss.size() > 0) { + boolean first = true; + for (SecurityColumn col : columnss) { + if (!first) { + outStream.write(terminator); + } else { + first = false; + } + outStream.writeBytes("dbName:" + dbName); + outStream.write(terminator); + outStream.writeBytes("tableName:" + tableName); + outStream.write(terminator); + outStream.writeBytes("columnName:" + columnName); + outStream.write(terminator); + outStream.writeBytes("userName:" + principalName); + outStream.write(terminator); + outStream.writeBytes("isRole:" + isRole); + outStream.write(terminator); + outStream.writeBytes("isGroup:" + isGroup); + outStream.write(terminator); + outStream.writeBytes("privileges:" + col.getPrivileges()); + outStream.write(terminator); + outStream.writeBytes("grantTime:" + col.getCreateTime()); + outStream.write(terminator); + outStream.writeBytes("grantor:" + col.getGrantor()); + outStream.write(terminator); + } + } + } + } 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; + } + outStream.writeBytes("dbName:" + dbName); + outStream.write(terminator); + outStream.writeBytes("tableName:" + tableName); + outStream.write(terminator); + outStream.writeBytes("userName:" + principalName); + outStream.write(terminator); + outStream.writeBytes("isRole:" + isRole); + outStream.write(terminator); + outStream.writeBytes("isGroup:" + isGroup); + outStream.write(terminator); + outStream.writeBytes("privileges:" + tbl.getPrivileges()); + outStream.write(terminator); + outStream.writeBytes("grantTime:" + tbl.getCreateTime()); + outStream.write(terminator); + outStream.writeBytes("grantor:" + tbl.getGrantor()); + outStream.write(terminator); + } + } + } + } + } + ((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 (privSubjectDesc.getPartSpec() != null) { + partObj = db.getPartition(tableObj, privSubjectDesc.getPartSpec(), false).getTPartition(); + } + + for (PrivilegeDesc privDesc : privileges) { + List columns = privDesc.getColumns(); + Privilege priv = privDesc.getPrivilege(); + if (columns != null && columns.size() > 0) { + if (!priv.getSupportColumnLevel()) { + throw new HiveException(priv.getPriv() + + " does not support column level."); + } + if (privSubjectDesc == null || tableName == null + || (privSubjectDesc.getPartSpec() != null)) { + throw new HiveException( + "For user-level/database-level/partition 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, 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 (HiveException e) { + e.printStackTrace(); + 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.getRoleName()); + } else if (operation.equals(RoleDDLDesc.RoleOperation.DROP_ROLE)) { + db.dropRole(roleDDLDesc.getRoleName()); + } 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.getRoleName() + ", error message " + e.getMessage()); + return 1; + } + + return 0; + } + private int dropIndex(Hive db, DropIndexDesc dropIdx) throws HiveException { db.dropIndex(db.getCurrentDatabase(), dropIdx.getTableName(), dropIdx.getIndexName(), true); Index: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java (revision 1030336) +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java (working copy) @@ -57,11 +57,18 @@ 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.PrivilegeBag; +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.serde2.Deserializer; @@ -724,7 +731,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) { @@ -864,6 +871,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. * @@ -1349,6 +1402,74 @@ public void setCurrentDatabase(String currentDatabase) { this.currentDatabase = currentDatabase; } + + public void createRole(String roleName) throws HiveException { + try { + getMSC().create_role(roleName, ""); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public void dropRole(String roleName) throws HiveException { + try { + getMSC().drop_role(roleName); + } catch (Exception e) { + throw new HiveException(e); + } + } + + public List 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); + } + } + + 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 columnName) throws HiveException { + try { + return getMSC().list_security_column_grant(principal_name, isGroup, + isRole, dbName, tableName, columnName); + } catch (Exception e) { + throw new HiveException(e); + } + } static private void checkPaths(FileSystem fs, FileStatus[] srcs, Path destf, boolean replace) throws HiveException { Index: ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java (revision 1030336) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java (working copy) @@ -68,6 +68,12 @@ 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.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; @@ -79,6 +85,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.ShowLocksDesc; import org.apache.hadoop.hive.ql.plan.ShowPartitionsDesc; import org.apache.hadoop.hive.ql.plan.ShowTableStatusDesc; @@ -87,9 +94,12 @@ 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.serde.Constants; import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe; import org.apache.hadoop.mapred.TextInputFormat; +import org.apache.hadoop.util.StringUtils; /** * DDLSemanticAnalyzer. @@ -242,11 +252,181 @@ 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_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 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) { + for (int i = 1; i < ast.getChildCount(); i++) { + ASTNode child = (ASTNode) ast.getChild(i); + if (child.getToken().getType() == HiveParser.TOK_PRIV_OBJECT) { + privHiveObj = analyzePrivilegeObject(child); + } else if (child.getToken().getType() == HiveParser.TOK_TABCOLNAME) { + cols = getColumnNames((ASTNode) child); + } + } + } + + 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.setTable(ast.getChild(0) != null); + subject.setObject(unescapeIdentifier(ast.getChild(1).getText())); + if (ast.getChildCount() > 2) { + ASTNode astChild = (ASTNode) ast.getChild(2); + if (astChild.getToken().getType() == HiveParser.TOK_PARTSPEC) { + subject.setPartSpec(DDLSemanticAnalyzer.getPartSpec(astChild)); + } + } + 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 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 1030336) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g (working copy) @@ -188,6 +188,19 @@ 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; } @@ -258,6 +271,11 @@ | analyzeStatement | lockStatement | unlockStatement + | createRoleStatement + | dropRoleStatement + | grantPrivileges + | revokePrivileges + | showGrants ; ifExists @@ -681,6 +699,86 @@ : 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?) + ; + +showGrants +@init {msgs.push("show grants");} +@after {msgs.pop();} + : KW_SHOW KW_GRANT principalName privilegeObject? (LPAREN cols=columnNameList RPAREN)? + -> ^(TOK_SHOW_GRANT principalName privilegeObject? $cols?) + ; + +privilegeObject +@init {msgs.push("privilege subject");} +@after {msgs.pop();} + : KW_ON (table=KW_TABLE|KW_DATABASE) Identifier partitionSpec? + -> ^(TOK_PRIV_OBJECT $table Identifier 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(); } @@ -1923,6 +2021,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 1030336) +++ 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; @@ -885,7 +883,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); } } @@ -921,7 +919,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); @@ -6106,7 +6104,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); } Index: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java (revision 1030336) +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java (working copy) @@ -72,6 +72,11 @@ commandType.put(HiveParser.TOK_QUERY, "QUERY"); commandType.put(HiveParser.TOK_LOCKTABLE, "LOCKTABLE"); commandType.put(HiveParser.TOK_UNLOCKTABLE, "UNLOCKTABLE"); + commandType.put(HiveParser.TOK_CREATEROLE, "CREATEROLE"); + commandType.put(HiveParser.TOK_DROPROLE, "DROPROLE"); + commandType.put(HiveParser.TOK_GRANT, "GRANT_PRIVILEGE"); + commandType.put(HiveParser.TOK_REVOKE, "REVOKE_PRIVILEGE"); + commandType.put(HiveParser.TOK_SHOW_GRANT, "SHOW_GRANT"); } static { @@ -129,6 +134,11 @@ 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: return new DDLSemanticAnalyzer(conf); case HiveParser.TOK_ALTERTABLE_PARTITION: String commandType = null; Index: ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java (revision 1030336) +++ ql/src/java/org/apache/hadoop/hive/ql/plan/DDLWork.java (working copy) @@ -53,7 +53,12 @@ private AlterTableSimpleDesc alterTblSimpleDesc; private MsckDesc msckDesc; private ShowTableStatusDesc showTblStatusDesc; - + + private RoleDDLDesc roleDDLDesc; + private GrantDesc grantDesc; + private ShowGrantDesc showGrantDesc; + private RevokeDesc revokeDesc; + /** * ReadEntitites that are passed to the hooks. */ @@ -295,6 +300,30 @@ this.dropIdxDesc = dropIndexDesc; } + 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; + } + /** * @return Create Database descriptor */ @@ -668,4 +697,54 @@ 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; + } + } 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/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,79 @@ +/** + * 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 roleName; + + private RoleOperation operation; + + public static enum RoleOperation { + DROP_ROLE("drop_role"), CREATE_ROLE("create_role"); + 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) { + super(); + this.roleName = roleName; + this.operation = operation; + } + + @Explain(displayName = "role name") + public String getRoleName() { + return roleName; + } + + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + @Explain(displayName = "role operation") + public RoleOperation getOperation() { + return operation; + } + + public void setOperation(RoleOperation operation) { + this.operation = operation; + } + +} 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,34 @@ +/** + * 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 java.util.Properties; + +public interface Authenticator { + + public boolean init(Properties props); + + public String getUserName(); + + public List getGroupNames(); + + public boolean detroy(); + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationFactory.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationFactory.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/AuthorizationFactory.java (revision 0) @@ -0,0 +1,54 @@ +/** + * 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; + +public class AuthorizationFactory { + + @SuppressWarnings("unchecked") + public AuthorizationProviderManager getAuthorizeProviderManager( + Configuration conf) 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 (ret != 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/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,39 @@ +/** + * 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.metastore.api.FieldSchema; +import org.apache.hadoop.hive.metastore.api.Partition; +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, List privs); + + public boolean access(Partition part, List privs); + + public boolean access(FieldSchema column, List 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,82 @@ +/** + * 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.ArrayList; +import java.util.List; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.metadata.Hive; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.security.Authenticator; + +public abstract class AuthorizationProviderManager { + + public static String PROVIDER_LIST_CONF_PREFIX = "hive.security.authorization.providers."; + + protected Authenticator authenticator; + + protected Hive hive_db; + + public void init(Configuration conf) throws HiveException { + hive_db = Hive.get(new HiveConf(conf, AuthorizationProviderManager.class)); + initSelf(conf); + } + + protected abstract void initSelf(Configuration conf) throws HiveException; + + public Authenticator getAuthenticator() { + return authenticator; + } + + public void setAuthenticator(Authenticator authenticator) { + this.authenticator = authenticator; + } + +// public PrivilegeBag getPrivilegeBag(List partitions, +// List
tables, List columns) { +// +// } + + @SuppressWarnings("unchecked") + public List getProviderList( + Class managerImplCls, + Configuration conf) throws HiveException { + String providerList = conf.get(PROVIDER_LIST_CONF_PREFIX + + managerImplCls.getSimpleName().toLowerCase()); + + List ret = new ArrayList(); + if (providerList != null && !providerList.trim().equals("")) { + try { + String[] providers = providerList.split(","); + if (providers != null) { + for (String authStr : providers) { + Class cls = (Class) Class + .forName(authStr); + ret.add(cls.newInstance()); + } + } + } catch (Exception e) { + throw new HiveException(e); + } + } + return ret; + } +} 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,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 java.util.List; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +public class DefaultAuthorizationProviderManager extends + AuthorizationProviderManager { + + private List authProviders; + + @SuppressWarnings("unchecked") + @Override + public void initSelf(Configuration conf) throws HiveException { + authProviders = super.getProviderList( + DefaultAuthorizationProviderManager.class, conf); + if (authProviders == null || authProviders.size() == 0) { + String[] providers = new String[1]; + providers[0] = HiveAuthorizationProvider.class.getCanonicalName(); + for (String authStr : providers) { + Class cls; + try { + cls = (Class) Class.forName(authStr); + authProviders.add(cls.newInstance()); + } catch (Exception e) { + throw new HiveException(e); + } + } + + for (AuthorizationProvider auth: authProviders) { + auth.init(conf); + } + } + } + + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/HDFSAuthorizationProvider.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/HDFSAuthorizationProvider.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/HDFSAuthorizationProvider.java (revision 0) @@ -0,0 +1,36 @@ +package org.apache.hadoop.hive.ql.security.authorization; + +import java.util.List; + +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.Table; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +public class HDFSAuthorizationProvider implements AuthorizationProvider{ + + @Override + public boolean access(Table table, List privs) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean access(Partition part, List privs) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean access(FieldSchema column, List privs) { + return true; + } + + @Override + public void init(Configuration conf) throws HiveException { + // TODO Auto-generated method stub + + } + +} Index: ql/src/java/org/apache/hadoop/hive/ql/security/authorization/HiveAuthorizationProvider.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/security/authorization/HiveAuthorizationProvider.java (revision 0) +++ ql/src/java/org/apache/hadoop/hive/ql/security/authorization/HiveAuthorizationProvider.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.security.authorization; + +import java.util.List; + +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.Table; +import org.apache.hadoop.hive.ql.metadata.HiveException; + +public class HiveAuthorizationProvider implements AuthorizationProvider { + + @Override + public boolean access(Table table, List privs) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean access(Partition part, List privs) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean access(FieldSchema column, List privs) { + // TODO Auto-generated method stub + return false; + } + + @Override + public void init(Configuration conf) throws HiveException { + // TODO Auto-generated method stub + + } + +} 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,76 @@ +/** + * 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; + +public class Privilege { + + private String priv; + + private boolean supportColumnLevel; + + private Privilege(String priv, boolean supportColumnLevel) { + super(); + this.priv = priv; + this.supportColumnLevel = supportColumnLevel; + } + + public Privilege(String priv) { + super(); + this.priv = priv; + this.supportColumnLevel = false; + } + + public String getPriv() { + return priv; + } + + public void setPriv(String priv) { + this.priv = priv; + } + + public boolean getSupportColumnLevel() { + return supportColumnLevel; + } + + public void setSupportColumnLevel(boolean supportColumnLevel) { + this.supportColumnLevel = supportColumnLevel; + } + + public Privilege() { + } + + public static Privilege ALL = new Privilege("All Privileges"); + + public static Privilege ALTER = new Privilege("Alter"); + + public static Privilege CREATE = new Privilege("Create"); + + public static Privilege DROP = new Privilege("Drop"); + + public static Privilege INDEX = new Privilege("Index"); + + public static Privilege LOCK = new Privilege("Lock"); + + public static Privilege SELECT = new Privilege("Select", true); + + public static Privilege SHOW_DATABASE = new Privilege("Show Database"); + + public static Privilege SUPER = new Privilege("Super"); + +} 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,45 @@ +/** + * 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.getPriv().toLowerCase(), Privilege.ALTER); + 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); + Registry.put(Privilege.SUPER.getPriv().toLowerCase(), Privilege.SUPER); + } + + public static Privilege getPrivilege(String privilegeName) { + return Registry.get(privilegeName.toLowerCase()); + } + +}