You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by jc...@apache.org on 2017/05/25 10:29:12 UTC
[17/21] hive git commit: HIVE-16575: Support for 'UNIQUE' and 'NOT
NULL' constraints (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
http://git-wip-us.apache.org/repos/asf/hive/blob/696be9f5/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
----------------------------------------------------------------------
diff --git a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
index e3725a5..1e46ac4 100644
--- a/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
+++ b/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
@@ -990,30 +990,43 @@ void SQLForeignKey::printTo(std::ostream& out) const {
}
-Type::~Type() throw() {
+SQLUniqueConstraint::~SQLUniqueConstraint() throw() {
}
-void Type::__set_name(const std::string& val) {
- this->name = val;
+void SQLUniqueConstraint::__set_table_db(const std::string& val) {
+ this->table_db = val;
}
-void Type::__set_type1(const std::string& val) {
- this->type1 = val;
-__isset.type1 = true;
+void SQLUniqueConstraint::__set_table_name(const std::string& val) {
+ this->table_name = val;
}
-void Type::__set_type2(const std::string& val) {
- this->type2 = val;
-__isset.type2 = true;
+void SQLUniqueConstraint::__set_column_name(const std::string& val) {
+ this->column_name = val;
}
-void Type::__set_fields(const std::vector<FieldSchema> & val) {
- this->fields = val;
-__isset.fields = true;
+void SQLUniqueConstraint::__set_key_seq(const int32_t val) {
+ this->key_seq = val;
}
-uint32_t Type::read(::apache::thrift::protocol::TProtocol* iprot) {
+void SQLUniqueConstraint::__set_uk_name(const std::string& val) {
+ this->uk_name = val;
+}
+
+void SQLUniqueConstraint::__set_enable_cstr(const bool val) {
+ this->enable_cstr = val;
+}
+
+void SQLUniqueConstraint::__set_validate_cstr(const bool val) {
+ this->validate_cstr = val;
+}
+
+void SQLUniqueConstraint::__set_rely_cstr(const bool val) {
+ this->rely_cstr = val;
+}
+
+uint32_t SQLUniqueConstraint::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
uint32_t xfer = 0;
@@ -1036,44 +1049,64 @@ uint32_t Type::read(::apache::thrift::protocol::TProtocol* iprot) {
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->name);
- this->__isset.name = true;
+ xfer += iprot->readString(this->table_db);
+ this->__isset.table_db = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->type1);
- this->__isset.type1 = true;
+ 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->type2);
- this->__isset.type2 = true;
+ xfer += iprot->readString(this->column_name);
+ this->__isset.column_name = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
- if (ftype == ::apache::thrift::protocol::T_LIST) {
- {
- this->fields.clear();
- uint32_t _size8;
- ::apache::thrift::protocol::TType _etype11;
- xfer += iprot->readListBegin(_etype11, _size8);
- this->fields.resize(_size8);
- uint32_t _i12;
- for (_i12 = 0; _i12 < _size8; ++_i12)
- {
- xfer += this->fields[_i12].read(iprot);
- }
- xfer += iprot->readListEnd();
- }
- this->__isset.fields = true;
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->key_seq);
+ this->__isset.key_seq = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->uk_name);
+ this->__isset.uk_name = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 6:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->enable_cstr);
+ this->__isset.enable_cstr = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 7:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->validate_cstr);
+ this->__isset.validate_cstr = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 8:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->rely_cstr);
+ this->__isset.rely_cstr = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -1090,103 +1123,132 @@ uint32_t Type::read(::apache::thrift::protocol::TProtocol* iprot) {
return xfer;
}
-uint32_t Type::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t SQLUniqueConstraint::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("Type");
+ xfer += oprot->writeStructBegin("SQLUniqueConstraint");
- xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
- xfer += oprot->writeString(this->name);
+ xfer += oprot->writeFieldBegin("table_db", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->table_db);
+ 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("column_name", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->column_name);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("key_seq", ::apache::thrift::protocol::T_I32, 4);
+ xfer += oprot->writeI32(this->key_seq);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("uk_name", ::apache::thrift::protocol::T_STRING, 5);
+ xfer += oprot->writeString(this->uk_name);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 6);
+ xfer += oprot->writeBool(this->enable_cstr);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 7);
+ xfer += oprot->writeBool(this->validate_cstr);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 8);
+ xfer += oprot->writeBool(this->rely_cstr);
xfer += oprot->writeFieldEnd();
- if (this->__isset.type1) {
- xfer += oprot->writeFieldBegin("type1", ::apache::thrift::protocol::T_STRING, 2);
- xfer += oprot->writeString(this->type1);
- xfer += oprot->writeFieldEnd();
- }
- if (this->__isset.type2) {
- xfer += oprot->writeFieldBegin("type2", ::apache::thrift::protocol::T_STRING, 3);
- xfer += oprot->writeString(this->type2);
- xfer += oprot->writeFieldEnd();
- }
- if (this->__isset.fields) {
- xfer += oprot->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST, 4);
- {
- xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->fields.size()));
- std::vector<FieldSchema> ::const_iterator _iter13;
- for (_iter13 = this->fields.begin(); _iter13 != this->fields.end(); ++_iter13)
- {
- xfer += (*_iter13).write(oprot);
- }
- xfer += oprot->writeListEnd();
- }
- xfer += oprot->writeFieldEnd();
- }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
-void swap(Type &a, Type &b) {
+void swap(SQLUniqueConstraint &a, SQLUniqueConstraint &b) {
using ::std::swap;
- swap(a.name, b.name);
- swap(a.type1, b.type1);
- swap(a.type2, b.type2);
- swap(a.fields, b.fields);
+ swap(a.table_db, b.table_db);
+ swap(a.table_name, b.table_name);
+ swap(a.column_name, b.column_name);
+ swap(a.key_seq, b.key_seq);
+ swap(a.uk_name, b.uk_name);
+ swap(a.enable_cstr, b.enable_cstr);
+ swap(a.validate_cstr, b.validate_cstr);
+ swap(a.rely_cstr, b.rely_cstr);
swap(a.__isset, b.__isset);
}
-Type::Type(const Type& other14) {
- name = other14.name;
- type1 = other14.type1;
- type2 = other14.type2;
- fields = other14.fields;
- __isset = other14.__isset;
-}
-Type& Type::operator=(const Type& other15) {
- name = other15.name;
- type1 = other15.type1;
- type2 = other15.type2;
- fields = other15.fields;
- __isset = other15.__isset;
+SQLUniqueConstraint::SQLUniqueConstraint(const SQLUniqueConstraint& other8) {
+ table_db = other8.table_db;
+ table_name = other8.table_name;
+ column_name = other8.column_name;
+ key_seq = other8.key_seq;
+ uk_name = other8.uk_name;
+ enable_cstr = other8.enable_cstr;
+ validate_cstr = other8.validate_cstr;
+ rely_cstr = other8.rely_cstr;
+ __isset = other8.__isset;
+}
+SQLUniqueConstraint& SQLUniqueConstraint::operator=(const SQLUniqueConstraint& other9) {
+ table_db = other9.table_db;
+ table_name = other9.table_name;
+ column_name = other9.column_name;
+ key_seq = other9.key_seq;
+ uk_name = other9.uk_name;
+ enable_cstr = other9.enable_cstr;
+ validate_cstr = other9.validate_cstr;
+ rely_cstr = other9.rely_cstr;
+ __isset = other9.__isset;
return *this;
}
-void Type::printTo(std::ostream& out) const {
+void SQLUniqueConstraint::printTo(std::ostream& out) const {
using ::apache::thrift::to_string;
- out << "Type(";
- out << "name=" << to_string(name);
- out << ", " << "type1="; (__isset.type1 ? (out << to_string(type1)) : (out << "<null>"));
- out << ", " << "type2="; (__isset.type2 ? (out << to_string(type2)) : (out << "<null>"));
- out << ", " << "fields="; (__isset.fields ? (out << to_string(fields)) : (out << "<null>"));
+ out << "SQLUniqueConstraint(";
+ out << "table_db=" << to_string(table_db);
+ out << ", " << "table_name=" << to_string(table_name);
+ out << ", " << "column_name=" << to_string(column_name);
+ out << ", " << "key_seq=" << to_string(key_seq);
+ out << ", " << "uk_name=" << to_string(uk_name);
+ out << ", " << "enable_cstr=" << to_string(enable_cstr);
+ out << ", " << "validate_cstr=" << to_string(validate_cstr);
+ out << ", " << "rely_cstr=" << to_string(rely_cstr);
out << ")";
}
-HiveObjectRef::~HiveObjectRef() throw() {
+SQLNotNullConstraint::~SQLNotNullConstraint() throw() {
}
-void HiveObjectRef::__set_objectType(const HiveObjectType::type val) {
- this->objectType = val;
+void SQLNotNullConstraint::__set_table_db(const std::string& val) {
+ this->table_db = val;
}
-void HiveObjectRef::__set_dbName(const std::string& val) {
- this->dbName = val;
+void SQLNotNullConstraint::__set_table_name(const std::string& val) {
+ this->table_name = val;
}
-void HiveObjectRef::__set_objectName(const std::string& val) {
- this->objectName = val;
+void SQLNotNullConstraint::__set_column_name(const std::string& val) {
+ this->column_name = val;
}
-void HiveObjectRef::__set_partValues(const std::vector<std::string> & val) {
- this->partValues = val;
+void SQLNotNullConstraint::__set_nn_name(const std::string& val) {
+ this->nn_name = val;
}
-void HiveObjectRef::__set_columnName(const std::string& val) {
- this->columnName = val;
+void SQLNotNullConstraint::__set_enable_cstr(const bool val) {
+ this->enable_cstr = val;
}
-uint32_t HiveObjectRef::read(::apache::thrift::protocol::TProtocol* iprot) {
+void SQLNotNullConstraint::__set_validate_cstr(const bool val) {
+ this->validate_cstr = val;
+}
+
+void SQLNotNullConstraint::__set_rely_cstr(const bool val) {
+ this->rely_cstr = val;
+}
+
+uint32_t SQLNotNullConstraint::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
uint32_t xfer = 0;
@@ -1208,55 +1270,57 @@ uint32_t HiveObjectRef::read(::apache::thrift::protocol::TProtocol* iprot) {
switch (fid)
{
case 1:
- if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast16;
- xfer += iprot->readI32(ecast16);
- this->objectType = (HiveObjectType::type)ecast16;
- this->__isset.objectType = true;
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->table_db);
+ this->__isset.table_db = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->dbName);
- this->__isset.dbName = true;
+ 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->objectName);
- this->__isset.objectName = true;
+ xfer += iprot->readString(this->column_name);
+ this->__isset.column_name = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
- if (ftype == ::apache::thrift::protocol::T_LIST) {
- {
- this->partValues.clear();
- uint32_t _size17;
- ::apache::thrift::protocol::TType _etype20;
- xfer += iprot->readListBegin(_etype20, _size17);
- this->partValues.resize(_size17);
- uint32_t _i21;
- for (_i21 = 0; _i21 < _size17; ++_i21)
- {
- xfer += iprot->readString(this->partValues[_i21]);
- }
- xfer += iprot->readListEnd();
- }
- this->__isset.partValues = true;
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->nn_name);
+ this->__isset.nn_name = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 5:
- if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->columnName);
- this->__isset.columnName = true;
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->enable_cstr);
+ this->__isset.enable_cstr = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 6:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->validate_cstr);
+ this->__isset.validate_cstr = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 7:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->rely_cstr);
+ this->__isset.rely_cstr = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -1273,37 +1337,37 @@ uint32_t HiveObjectRef::read(::apache::thrift::protocol::TProtocol* iprot) {
return xfer;
}
-uint32_t HiveObjectRef::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t SQLNotNullConstraint::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("HiveObjectRef");
+ xfer += oprot->writeStructBegin("SQLNotNullConstraint");
- xfer += oprot->writeFieldBegin("objectType", ::apache::thrift::protocol::T_I32, 1);
- xfer += oprot->writeI32((int32_t)this->objectType);
+ xfer += oprot->writeFieldBegin("table_db", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->table_db);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
- xfer += oprot->writeString(this->dbName);
+ xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->table_name);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("objectName", ::apache::thrift::protocol::T_STRING, 3);
- xfer += oprot->writeString(this->objectName);
+ xfer += oprot->writeFieldBegin("column_name", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->column_name);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("partValues", ::apache::thrift::protocol::T_LIST, 4);
- {
- xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partValues.size()));
- std::vector<std::string> ::const_iterator _iter22;
- for (_iter22 = this->partValues.begin(); _iter22 != this->partValues.end(); ++_iter22)
- {
- xfer += oprot->writeString((*_iter22));
- }
- xfer += oprot->writeListEnd();
- }
+ xfer += oprot->writeFieldBegin("nn_name", ::apache::thrift::protocol::T_STRING, 4);
+ xfer += oprot->writeString(this->nn_name);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("columnName", ::apache::thrift::protocol::T_STRING, 5);
- xfer += oprot->writeString(this->columnName);
+ xfer += oprot->writeFieldBegin("enable_cstr", ::apache::thrift::protocol::T_BOOL, 5);
+ xfer += oprot->writeBool(this->enable_cstr);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("validate_cstr", ::apache::thrift::protocol::T_BOOL, 6);
+ xfer += oprot->writeBool(this->validate_cstr);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("rely_cstr", ::apache::thrift::protocol::T_BOOL, 7);
+ xfer += oprot->writeBool(this->rely_cstr);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
@@ -1311,70 +1375,77 @@ uint32_t HiveObjectRef::write(::apache::thrift::protocol::TProtocol* oprot) cons
return xfer;
}
-void swap(HiveObjectRef &a, HiveObjectRef &b) {
+void swap(SQLNotNullConstraint &a, SQLNotNullConstraint &b) {
using ::std::swap;
- swap(a.objectType, b.objectType);
- swap(a.dbName, b.dbName);
- swap(a.objectName, b.objectName);
- swap(a.partValues, b.partValues);
- swap(a.columnName, b.columnName);
+ swap(a.table_db, b.table_db);
+ swap(a.table_name, b.table_name);
+ swap(a.column_name, b.column_name);
+ swap(a.nn_name, b.nn_name);
+ swap(a.enable_cstr, b.enable_cstr);
+ swap(a.validate_cstr, b.validate_cstr);
+ swap(a.rely_cstr, b.rely_cstr);
swap(a.__isset, b.__isset);
}
-HiveObjectRef::HiveObjectRef(const HiveObjectRef& other23) {
- objectType = other23.objectType;
- dbName = other23.dbName;
- objectName = other23.objectName;
- partValues = other23.partValues;
- columnName = other23.columnName;
- __isset = other23.__isset;
-}
-HiveObjectRef& HiveObjectRef::operator=(const HiveObjectRef& other24) {
- objectType = other24.objectType;
- dbName = other24.dbName;
- objectName = other24.objectName;
- partValues = other24.partValues;
- columnName = other24.columnName;
- __isset = other24.__isset;
+SQLNotNullConstraint::SQLNotNullConstraint(const SQLNotNullConstraint& other10) {
+ table_db = other10.table_db;
+ table_name = other10.table_name;
+ column_name = other10.column_name;
+ nn_name = other10.nn_name;
+ enable_cstr = other10.enable_cstr;
+ validate_cstr = other10.validate_cstr;
+ rely_cstr = other10.rely_cstr;
+ __isset = other10.__isset;
+}
+SQLNotNullConstraint& SQLNotNullConstraint::operator=(const SQLNotNullConstraint& other11) {
+ table_db = other11.table_db;
+ table_name = other11.table_name;
+ column_name = other11.column_name;
+ nn_name = other11.nn_name;
+ enable_cstr = other11.enable_cstr;
+ validate_cstr = other11.validate_cstr;
+ rely_cstr = other11.rely_cstr;
+ __isset = other11.__isset;
return *this;
}
-void HiveObjectRef::printTo(std::ostream& out) const {
+void SQLNotNullConstraint::printTo(std::ostream& out) const {
using ::apache::thrift::to_string;
- out << "HiveObjectRef(";
- out << "objectType=" << to_string(objectType);
- out << ", " << "dbName=" << to_string(dbName);
- out << ", " << "objectName=" << to_string(objectName);
- out << ", " << "partValues=" << to_string(partValues);
- out << ", " << "columnName=" << to_string(columnName);
+ out << "SQLNotNullConstraint(";
+ out << "table_db=" << to_string(table_db);
+ out << ", " << "table_name=" << to_string(table_name);
+ out << ", " << "column_name=" << to_string(column_name);
+ out << ", " << "nn_name=" << to_string(nn_name);
+ out << ", " << "enable_cstr=" << to_string(enable_cstr);
+ out << ", " << "validate_cstr=" << to_string(validate_cstr);
+ out << ", " << "rely_cstr=" << to_string(rely_cstr);
out << ")";
}
-PrivilegeGrantInfo::~PrivilegeGrantInfo() throw() {
+Type::~Type() throw() {
}
-void PrivilegeGrantInfo::__set_privilege(const std::string& val) {
- this->privilege = val;
-}
-
-void PrivilegeGrantInfo::__set_createTime(const int32_t val) {
- this->createTime = val;
+void Type::__set_name(const std::string& val) {
+ this->name = val;
}
-void PrivilegeGrantInfo::__set_grantor(const std::string& val) {
- this->grantor = val;
+void Type::__set_type1(const std::string& val) {
+ this->type1 = val;
+__isset.type1 = true;
}
-void PrivilegeGrantInfo::__set_grantorType(const PrincipalType::type val) {
- this->grantorType = val;
+void Type::__set_type2(const std::string& val) {
+ this->type2 = val;
+__isset.type2 = true;
}
-void PrivilegeGrantInfo::__set_grantOption(const bool val) {
- this->grantOption = val;
+void Type::__set_fields(const std::vector<FieldSchema> & val) {
+ this->fields = val;
+__isset.fields = true;
}
-uint32_t PrivilegeGrantInfo::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t Type::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
uint32_t xfer = 0;
@@ -1397,42 +1468,44 @@ uint32_t PrivilegeGrantInfo::read(::apache::thrift::protocol::TProtocol* iprot)
{
case 1:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->privilege);
- this->__isset.privilege = true;
+ xfer += iprot->readString(this->name);
+ this->__isset.name = 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;
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->type1);
+ this->__isset.type1 = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->grantor);
- this->__isset.grantor = true;
+ xfer += iprot->readString(this->type2);
+ this->__isset.type2 = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
- if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast25;
- xfer += iprot->readI32(ecast25);
- this->grantorType = (PrincipalType::type)ecast25;
- this->__isset.grantorType = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- case 5:
- if (ftype == ::apache::thrift::protocol::T_BOOL) {
- xfer += iprot->readBool(this->grantOption);
- this->__isset.grantOption = true;
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->fields.clear();
+ uint32_t _size12;
+ ::apache::thrift::protocol::TType _etype15;
+ xfer += iprot->readListBegin(_etype15, _size12);
+ this->fields.resize(_size12);
+ uint32_t _i16;
+ for (_i16 = 0; _i16 < _size12; ++_i16)
+ {
+ xfer += this->fields[_i16].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ this->__isset.fields = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -1449,96 +1522,103 @@ uint32_t PrivilegeGrantInfo::read(::apache::thrift::protocol::TProtocol* iprot)
return xfer;
}
-uint32_t PrivilegeGrantInfo::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t Type::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("PrivilegeGrantInfo");
-
- xfer += oprot->writeFieldBegin("privilege", ::apache::thrift::protocol::T_STRING, 1);
- xfer += oprot->writeString(this->privilege);
- xfer += oprot->writeFieldEnd();
-
- xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2);
- xfer += oprot->writeI32(this->createTime);
- xfer += oprot->writeFieldEnd();
-
- xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 3);
- xfer += oprot->writeString(this->grantor);
- xfer += oprot->writeFieldEnd();
-
- xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 4);
- xfer += oprot->writeI32((int32_t)this->grantorType);
- xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeStructBegin("Type");
- xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 5);
- xfer += oprot->writeBool(this->grantOption);
+ xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->name);
xfer += oprot->writeFieldEnd();
+ if (this->__isset.type1) {
+ xfer += oprot->writeFieldBegin("type1", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->type1);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.type2) {
+ xfer += oprot->writeFieldBegin("type2", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->type2);
+ xfer += oprot->writeFieldEnd();
+ }
+ if (this->__isset.fields) {
+ xfer += oprot->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST, 4);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->fields.size()));
+ std::vector<FieldSchema> ::const_iterator _iter17;
+ for (_iter17 = this->fields.begin(); _iter17 != this->fields.end(); ++_iter17)
+ {
+ xfer += (*_iter17).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+ }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
-void swap(PrivilegeGrantInfo &a, PrivilegeGrantInfo &b) {
+void swap(Type &a, Type &b) {
using ::std::swap;
- swap(a.privilege, b.privilege);
- swap(a.createTime, b.createTime);
- swap(a.grantor, b.grantor);
- swap(a.grantorType, b.grantorType);
- swap(a.grantOption, b.grantOption);
+ swap(a.name, b.name);
+ swap(a.type1, b.type1);
+ swap(a.type2, b.type2);
+ swap(a.fields, b.fields);
swap(a.__isset, b.__isset);
}
-PrivilegeGrantInfo::PrivilegeGrantInfo(const PrivilegeGrantInfo& other26) {
- privilege = other26.privilege;
- createTime = other26.createTime;
- grantor = other26.grantor;
- grantorType = other26.grantorType;
- grantOption = other26.grantOption;
- __isset = other26.__isset;
-}
-PrivilegeGrantInfo& PrivilegeGrantInfo::operator=(const PrivilegeGrantInfo& other27) {
- privilege = other27.privilege;
- createTime = other27.createTime;
- grantor = other27.grantor;
- grantorType = other27.grantorType;
- grantOption = other27.grantOption;
- __isset = other27.__isset;
+Type::Type(const Type& other18) {
+ name = other18.name;
+ type1 = other18.type1;
+ type2 = other18.type2;
+ fields = other18.fields;
+ __isset = other18.__isset;
+}
+Type& Type::operator=(const Type& other19) {
+ name = other19.name;
+ type1 = other19.type1;
+ type2 = other19.type2;
+ fields = other19.fields;
+ __isset = other19.__isset;
return *this;
}
-void PrivilegeGrantInfo::printTo(std::ostream& out) const {
+void Type::printTo(std::ostream& out) const {
using ::apache::thrift::to_string;
- out << "PrivilegeGrantInfo(";
- out << "privilege=" << to_string(privilege);
- out << ", " << "createTime=" << to_string(createTime);
- out << ", " << "grantor=" << to_string(grantor);
- out << ", " << "grantorType=" << to_string(grantorType);
- out << ", " << "grantOption=" << to_string(grantOption);
+ out << "Type(";
+ out << "name=" << to_string(name);
+ out << ", " << "type1="; (__isset.type1 ? (out << to_string(type1)) : (out << "<null>"));
+ out << ", " << "type2="; (__isset.type2 ? (out << to_string(type2)) : (out << "<null>"));
+ out << ", " << "fields="; (__isset.fields ? (out << to_string(fields)) : (out << "<null>"));
out << ")";
}
-HiveObjectPrivilege::~HiveObjectPrivilege() throw() {
+HiveObjectRef::~HiveObjectRef() throw() {
}
-void HiveObjectPrivilege::__set_hiveObject(const HiveObjectRef& val) {
- this->hiveObject = val;
+void HiveObjectRef::__set_objectType(const HiveObjectType::type val) {
+ this->objectType = val;
}
-void HiveObjectPrivilege::__set_principalName(const std::string& val) {
- this->principalName = val;
+void HiveObjectRef::__set_dbName(const std::string& val) {
+ this->dbName = val;
}
-void HiveObjectPrivilege::__set_principalType(const PrincipalType::type val) {
- this->principalType = val;
+void HiveObjectRef::__set_objectName(const std::string& val) {
+ this->objectName = val;
}
-void HiveObjectPrivilege::__set_grantInfo(const PrivilegeGrantInfo& val) {
- this->grantInfo = val;
+void HiveObjectRef::__set_partValues(const std::vector<std::string> & val) {
+ this->partValues = val;
}
-uint32_t HiveObjectPrivilege::read(::apache::thrift::protocol::TProtocol* iprot) {
+void HiveObjectRef::__set_columnName(const std::string& val) {
+ this->columnName = val;
+}
+
+uint32_t HiveObjectRef::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
uint32_t xfer = 0;
@@ -1560,35 +1640,55 @@ uint32_t HiveObjectPrivilege::read(::apache::thrift::protocol::TProtocol* iprot)
switch (fid)
{
case 1:
- if (ftype == ::apache::thrift::protocol::T_STRUCT) {
- xfer += this->hiveObject.read(iprot);
- this->__isset.hiveObject = true;
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast20;
+ xfer += iprot->readI32(ecast20);
+ this->objectType = (HiveObjectType::type)ecast20;
+ this->__isset.objectType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->principalName);
- this->__isset.principalName = true;
+ xfer += iprot->readString(this->dbName);
+ this->__isset.dbName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
- if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast28;
- xfer += iprot->readI32(ecast28);
- this->principalType = (PrincipalType::type)ecast28;
- this->__isset.principalType = true;
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->objectName);
+ this->__isset.objectName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 4:
- if (ftype == ::apache::thrift::protocol::T_STRUCT) {
- xfer += this->grantInfo.read(iprot);
- this->__isset.grantInfo = true;
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->partValues.clear();
+ uint32_t _size21;
+ ::apache::thrift::protocol::TType _etype24;
+ xfer += iprot->readListBegin(_etype24, _size21);
+ this->partValues.resize(_size21);
+ uint32_t _i25;
+ for (_i25 = 0; _i25 < _size21; ++_i25)
+ {
+ xfer += iprot->readString(this->partValues[_i25]);
+ }
+ xfer += iprot->readListEnd();
+ }
+ this->__isset.partValues = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->columnName);
+ this->__isset.columnName = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -1605,25 +1705,37 @@ uint32_t HiveObjectPrivilege::read(::apache::thrift::protocol::TProtocol* iprot)
return xfer;
}
-uint32_t HiveObjectPrivilege::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t HiveObjectRef::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("HiveObjectPrivilege");
+ xfer += oprot->writeStructBegin("HiveObjectRef");
- xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1);
- xfer += this->hiveObject.write(oprot);
+ xfer += oprot->writeFieldBegin("objectType", ::apache::thrift::protocol::T_I32, 1);
+ xfer += oprot->writeI32((int32_t)this->objectType);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 2);
- xfer += oprot->writeString(this->principalName);
+ xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->dbName);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 3);
- xfer += oprot->writeI32((int32_t)this->principalType);
+ xfer += oprot->writeFieldBegin("objectName", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->objectName);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("grantInfo", ::apache::thrift::protocol::T_STRUCT, 4);
- xfer += this->grantInfo.write(oprot);
+ xfer += oprot->writeFieldBegin("partValues", ::apache::thrift::protocol::T_LIST, 4);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->partValues.size()));
+ std::vector<std::string> ::const_iterator _iter26;
+ for (_iter26 = this->partValues.begin(); _iter26 != this->partValues.end(); ++_iter26)
+ {
+ xfer += oprot->writeString((*_iter26));
+ }
+ xfer += oprot->writeListEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("columnName", ::apache::thrift::protocol::T_STRING, 5);
+ xfer += oprot->writeString(this->columnName);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
@@ -1631,50 +1743,70 @@ uint32_t HiveObjectPrivilege::write(::apache::thrift::protocol::TProtocol* oprot
return xfer;
}
-void swap(HiveObjectPrivilege &a, HiveObjectPrivilege &b) {
+void swap(HiveObjectRef &a, HiveObjectRef &b) {
using ::std::swap;
- swap(a.hiveObject, b.hiveObject);
- swap(a.principalName, b.principalName);
- swap(a.principalType, b.principalType);
- swap(a.grantInfo, b.grantInfo);
+ swap(a.objectType, b.objectType);
+ swap(a.dbName, b.dbName);
+ swap(a.objectName, b.objectName);
+ swap(a.partValues, b.partValues);
+ swap(a.columnName, b.columnName);
swap(a.__isset, b.__isset);
}
-HiveObjectPrivilege::HiveObjectPrivilege(const HiveObjectPrivilege& other29) {
- hiveObject = other29.hiveObject;
- principalName = other29.principalName;
- principalType = other29.principalType;
- grantInfo = other29.grantInfo;
- __isset = other29.__isset;
+HiveObjectRef::HiveObjectRef(const HiveObjectRef& other27) {
+ objectType = other27.objectType;
+ dbName = other27.dbName;
+ objectName = other27.objectName;
+ partValues = other27.partValues;
+ columnName = other27.columnName;
+ __isset = other27.__isset;
}
-HiveObjectPrivilege& HiveObjectPrivilege::operator=(const HiveObjectPrivilege& other30) {
- hiveObject = other30.hiveObject;
- principalName = other30.principalName;
- principalType = other30.principalType;
- grantInfo = other30.grantInfo;
- __isset = other30.__isset;
+HiveObjectRef& HiveObjectRef::operator=(const HiveObjectRef& other28) {
+ objectType = other28.objectType;
+ dbName = other28.dbName;
+ objectName = other28.objectName;
+ partValues = other28.partValues;
+ columnName = other28.columnName;
+ __isset = other28.__isset;
return *this;
}
-void HiveObjectPrivilege::printTo(std::ostream& out) const {
+void HiveObjectRef::printTo(std::ostream& out) const {
using ::apache::thrift::to_string;
- out << "HiveObjectPrivilege(";
- out << "hiveObject=" << to_string(hiveObject);
- out << ", " << "principalName=" << to_string(principalName);
- out << ", " << "principalType=" << to_string(principalType);
- out << ", " << "grantInfo=" << to_string(grantInfo);
+ out << "HiveObjectRef(";
+ out << "objectType=" << to_string(objectType);
+ out << ", " << "dbName=" << to_string(dbName);
+ out << ", " << "objectName=" << to_string(objectName);
+ out << ", " << "partValues=" << to_string(partValues);
+ out << ", " << "columnName=" << to_string(columnName);
out << ")";
}
-PrivilegeBag::~PrivilegeBag() throw() {
+PrivilegeGrantInfo::~PrivilegeGrantInfo() throw() {
}
-void PrivilegeBag::__set_privileges(const std::vector<HiveObjectPrivilege> & val) {
- this->privileges = val;
+void PrivilegeGrantInfo::__set_privilege(const std::string& val) {
+ this->privilege = val;
}
-uint32_t PrivilegeBag::read(::apache::thrift::protocol::TProtocol* iprot) {
+void PrivilegeGrantInfo::__set_createTime(const int32_t val) {
+ this->createTime = val;
+}
+
+void PrivilegeGrantInfo::__set_grantor(const std::string& val) {
+ this->grantor = val;
+}
+
+void PrivilegeGrantInfo::__set_grantorType(const PrincipalType::type val) {
+ this->grantorType = val;
+}
+
+void PrivilegeGrantInfo::__set_grantOption(const bool val) {
+ this->grantOption = val;
+}
+
+uint32_t PrivilegeGrantInfo::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
uint32_t xfer = 0;
@@ -1696,21 +1828,43 @@ uint32_t PrivilegeBag::read(::apache::thrift::protocol::TProtocol* iprot) {
switch (fid)
{
case 1:
- if (ftype == ::apache::thrift::protocol::T_LIST) {
- {
- this->privileges.clear();
- uint32_t _size31;
- ::apache::thrift::protocol::TType _etype34;
- xfer += iprot->readListBegin(_etype34, _size31);
- this->privileges.resize(_size31);
- uint32_t _i35;
- for (_i35 = 0; _i35 < _size31; ++_i35)
- {
- xfer += this->privileges[_i35].read(iprot);
- }
- xfer += iprot->readListEnd();
- }
- this->__isset.privileges = true;
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->privilege);
+ this->__isset.privilege = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ xfer += iprot->readI32(this->createTime);
+ this->__isset.createTime = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->grantor);
+ this->__isset.grantor = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast29;
+ xfer += iprot->readI32(ecast29);
+ this->grantorType = (PrincipalType::type)ecast29;
+ this->__isset.grantorType = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 5:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->grantOption);
+ this->__isset.grantOption = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -1727,21 +1881,29 @@ uint32_t PrivilegeBag::read(::apache::thrift::protocol::TProtocol* iprot) {
return xfer;
}
-uint32_t PrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t PrivilegeGrantInfo::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("PrivilegeBag");
+ xfer += oprot->writeStructBegin("PrivilegeGrantInfo");
- xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_LIST, 1);
- {
- xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->privileges.size()));
- std::vector<HiveObjectPrivilege> ::const_iterator _iter36;
- for (_iter36 = this->privileges.begin(); _iter36 != this->privileges.end(); ++_iter36)
- {
- xfer += (*_iter36).write(oprot);
- }
- xfer += oprot->writeListEnd();
- }
+ xfer += oprot->writeFieldBegin("privilege", ::apache::thrift::protocol::T_STRING, 1);
+ xfer += oprot->writeString(this->privilege);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 2);
+ xfer += oprot->writeI32(this->createTime);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("grantor", ::apache::thrift::protocol::T_STRING, 3);
+ xfer += oprot->writeString(this->grantor);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("grantorType", ::apache::thrift::protocol::T_I32, 4);
+ xfer += oprot->writeI32((int32_t)this->grantorType);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("grantOption", ::apache::thrift::protocol::T_BOOL, 5);
+ xfer += oprot->writeBool(this->grantOption);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
@@ -1749,46 +1911,66 @@ uint32_t PrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const
return xfer;
}
-void swap(PrivilegeBag &a, PrivilegeBag &b) {
+void swap(PrivilegeGrantInfo &a, PrivilegeGrantInfo &b) {
using ::std::swap;
- swap(a.privileges, b.privileges);
+ swap(a.privilege, b.privilege);
+ swap(a.createTime, b.createTime);
+ swap(a.grantor, b.grantor);
+ swap(a.grantorType, b.grantorType);
+ swap(a.grantOption, b.grantOption);
swap(a.__isset, b.__isset);
}
-PrivilegeBag::PrivilegeBag(const PrivilegeBag& other37) {
- privileges = other37.privileges;
- __isset = other37.__isset;
+PrivilegeGrantInfo::PrivilegeGrantInfo(const PrivilegeGrantInfo& other30) {
+ privilege = other30.privilege;
+ createTime = other30.createTime;
+ grantor = other30.grantor;
+ grantorType = other30.grantorType;
+ grantOption = other30.grantOption;
+ __isset = other30.__isset;
}
-PrivilegeBag& PrivilegeBag::operator=(const PrivilegeBag& other38) {
- privileges = other38.privileges;
- __isset = other38.__isset;
+PrivilegeGrantInfo& PrivilegeGrantInfo::operator=(const PrivilegeGrantInfo& other31) {
+ privilege = other31.privilege;
+ createTime = other31.createTime;
+ grantor = other31.grantor;
+ grantorType = other31.grantorType;
+ grantOption = other31.grantOption;
+ __isset = other31.__isset;
return *this;
}
-void PrivilegeBag::printTo(std::ostream& out) const {
+void PrivilegeGrantInfo::printTo(std::ostream& out) const {
using ::apache::thrift::to_string;
- out << "PrivilegeBag(";
- out << "privileges=" << to_string(privileges);
+ out << "PrivilegeGrantInfo(";
+ out << "privilege=" << to_string(privilege);
+ out << ", " << "createTime=" << to_string(createTime);
+ out << ", " << "grantor=" << to_string(grantor);
+ out << ", " << "grantorType=" << to_string(grantorType);
+ out << ", " << "grantOption=" << to_string(grantOption);
out << ")";
}
-PrincipalPrivilegeSet::~PrincipalPrivilegeSet() throw() {
+HiveObjectPrivilege::~HiveObjectPrivilege() throw() {
}
-void PrincipalPrivilegeSet::__set_userPrivileges(const std::map<std::string, std::vector<PrivilegeGrantInfo> > & val) {
- this->userPrivileges = val;
+void HiveObjectPrivilege::__set_hiveObject(const HiveObjectRef& val) {
+ this->hiveObject = val;
}
-void PrincipalPrivilegeSet::__set_groupPrivileges(const std::map<std::string, std::vector<PrivilegeGrantInfo> > & val) {
- this->groupPrivileges = val;
+void HiveObjectPrivilege::__set_principalName(const std::string& val) {
+ this->principalName = val;
}
-void PrincipalPrivilegeSet::__set_rolePrivileges(const std::map<std::string, std::vector<PrivilegeGrantInfo> > & val) {
- this->rolePrivileges = val;
+void HiveObjectPrivilege::__set_principalType(const PrincipalType::type val) {
+ this->principalType = val;
}
-uint32_t PrincipalPrivilegeSet::read(::apache::thrift::protocol::TProtocol* iprot) {
+void HiveObjectPrivilege::__set_grantInfo(const PrivilegeGrantInfo& val) {
+ this->grantInfo = val;
+}
+
+uint32_t HiveObjectPrivilege::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
uint32_t xfer = 0;
@@ -1810,106 +1992,35 @@ uint32_t PrincipalPrivilegeSet::read(::apache::thrift::protocol::TProtocol* ipro
switch (fid)
{
case 1:
- if (ftype == ::apache::thrift::protocol::T_MAP) {
- {
- this->userPrivileges.clear();
- uint32_t _size39;
- ::apache::thrift::protocol::TType _ktype40;
- ::apache::thrift::protocol::TType _vtype41;
- xfer += iprot->readMapBegin(_ktype40, _vtype41, _size39);
- uint32_t _i43;
- for (_i43 = 0; _i43 < _size39; ++_i43)
- {
- std::string _key44;
- xfer += iprot->readString(_key44);
- std::vector<PrivilegeGrantInfo> & _val45 = this->userPrivileges[_key44];
- {
- _val45.clear();
- uint32_t _size46;
- ::apache::thrift::protocol::TType _etype49;
- xfer += iprot->readListBegin(_etype49, _size46);
- _val45.resize(_size46);
- uint32_t _i50;
- for (_i50 = 0; _i50 < _size46; ++_i50)
- {
- xfer += _val45[_i50].read(iprot);
- }
- xfer += iprot->readListEnd();
- }
- }
- xfer += iprot->readMapEnd();
- }
- this->__isset.userPrivileges = true;
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->hiveObject.read(iprot);
+ this->__isset.hiveObject = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
- if (ftype == ::apache::thrift::protocol::T_MAP) {
- {
- this->groupPrivileges.clear();
- uint32_t _size51;
- ::apache::thrift::protocol::TType _ktype52;
- ::apache::thrift::protocol::TType _vtype53;
- xfer += iprot->readMapBegin(_ktype52, _vtype53, _size51);
- uint32_t _i55;
- for (_i55 = 0; _i55 < _size51; ++_i55)
- {
- std::string _key56;
- xfer += iprot->readString(_key56);
- std::vector<PrivilegeGrantInfo> & _val57 = this->groupPrivileges[_key56];
- {
- _val57.clear();
- uint32_t _size58;
- ::apache::thrift::protocol::TType _etype61;
- xfer += iprot->readListBegin(_etype61, _size58);
- _val57.resize(_size58);
- uint32_t _i62;
- for (_i62 = 0; _i62 < _size58; ++_i62)
- {
- xfer += _val57[_i62].read(iprot);
- }
- xfer += iprot->readListEnd();
- }
- }
- xfer += iprot->readMapEnd();
- }
- this->__isset.groupPrivileges = true;
+ if (ftype == ::apache::thrift::protocol::T_STRING) {
+ xfer += iprot->readString(this->principalName);
+ this->__isset.principalName = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 3:
- if (ftype == ::apache::thrift::protocol::T_MAP) {
- {
- this->rolePrivileges.clear();
- uint32_t _size63;
- ::apache::thrift::protocol::TType _ktype64;
- ::apache::thrift::protocol::TType _vtype65;
- xfer += iprot->readMapBegin(_ktype64, _vtype65, _size63);
- uint32_t _i67;
- for (_i67 = 0; _i67 < _size63; ++_i67)
- {
- std::string _key68;
- xfer += iprot->readString(_key68);
- std::vector<PrivilegeGrantInfo> & _val69 = this->rolePrivileges[_key68];
- {
- _val69.clear();
- uint32_t _size70;
- ::apache::thrift::protocol::TType _etype73;
- xfer += iprot->readListBegin(_etype73, _size70);
- _val69.resize(_size70);
- uint32_t _i74;
- for (_i74 = 0; _i74 < _size70; ++_i74)
- {
- xfer += _val69[_i74].read(iprot);
- }
- xfer += iprot->readListEnd();
- }
- }
- xfer += iprot->readMapEnd();
- }
- this->__isset.rolePrivileges = true;
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast32;
+ xfer += iprot->readI32(ecast32);
+ this->principalType = (PrincipalType::type)ecast32;
+ this->__isset.principalType = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 4:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->grantInfo.read(iprot);
+ this->__isset.grantInfo = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -1926,72 +2037,25 @@ uint32_t PrincipalPrivilegeSet::read(::apache::thrift::protocol::TProtocol* ipro
return xfer;
}
-uint32_t PrincipalPrivilegeSet::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t HiveObjectPrivilege::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("PrincipalPrivilegeSet");
+ xfer += oprot->writeStructBegin("HiveObjectPrivilege");
- xfer += oprot->writeFieldBegin("userPrivileges", ::apache::thrift::protocol::T_MAP, 1);
- {
- xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->userPrivileges.size()));
- std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter75;
- for (_iter75 = this->userPrivileges.begin(); _iter75 != this->userPrivileges.end(); ++_iter75)
- {
- xfer += oprot->writeString(_iter75->first);
- {
- xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter75->second.size()));
- std::vector<PrivilegeGrantInfo> ::const_iterator _iter76;
- for (_iter76 = _iter75->second.begin(); _iter76 != _iter75->second.end(); ++_iter76)
- {
- xfer += (*_iter76).write(oprot);
- }
- xfer += oprot->writeListEnd();
- }
- }
- xfer += oprot->writeMapEnd();
- }
+ xfer += oprot->writeFieldBegin("hiveObject", ::apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->hiveObject.write(oprot);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("groupPrivileges", ::apache::thrift::protocol::T_MAP, 2);
- {
- xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->groupPrivileges.size()));
- std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter77;
- for (_iter77 = this->groupPrivileges.begin(); _iter77 != this->groupPrivileges.end(); ++_iter77)
- {
- xfer += oprot->writeString(_iter77->first);
- {
- xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter77->second.size()));
- std::vector<PrivilegeGrantInfo> ::const_iterator _iter78;
- for (_iter78 = _iter77->second.begin(); _iter78 != _iter77->second.end(); ++_iter78)
- {
- xfer += (*_iter78).write(oprot);
- }
- xfer += oprot->writeListEnd();
- }
- }
- xfer += oprot->writeMapEnd();
- }
+ xfer += oprot->writeFieldBegin("principalName", ::apache::thrift::protocol::T_STRING, 2);
+ xfer += oprot->writeString(this->principalName);
xfer += oprot->writeFieldEnd();
- xfer += oprot->writeFieldBegin("rolePrivileges", ::apache::thrift::protocol::T_MAP, 3);
- {
- xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->rolePrivileges.size()));
- std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter79;
- for (_iter79 = this->rolePrivileges.begin(); _iter79 != this->rolePrivileges.end(); ++_iter79)
- {
- xfer += oprot->writeString(_iter79->first);
- {
- xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter79->second.size()));
- std::vector<PrivilegeGrantInfo> ::const_iterator _iter80;
- for (_iter80 = _iter79->second.begin(); _iter80 != _iter79->second.end(); ++_iter80)
- {
- xfer += (*_iter80).write(oprot);
- }
- xfer += oprot->writeListEnd();
- }
- }
- xfer += oprot->writeMapEnd();
- }
+ xfer += oprot->writeFieldBegin("principalType", ::apache::thrift::protocol::T_I32, 3);
+ xfer += oprot->writeI32((int32_t)this->principalType);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("grantInfo", ::apache::thrift::protocol::T_STRUCT, 4);
+ xfer += this->grantInfo.write(oprot);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
@@ -1999,55 +2063,50 @@ uint32_t PrincipalPrivilegeSet::write(::apache::thrift::protocol::TProtocol* opr
return xfer;
}
-void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b) {
+void swap(HiveObjectPrivilege &a, HiveObjectPrivilege &b) {
using ::std::swap;
- swap(a.userPrivileges, b.userPrivileges);
- swap(a.groupPrivileges, b.groupPrivileges);
- swap(a.rolePrivileges, b.rolePrivileges);
+ swap(a.hiveObject, b.hiveObject);
+ swap(a.principalName, b.principalName);
+ swap(a.principalType, b.principalType);
+ swap(a.grantInfo, b.grantInfo);
swap(a.__isset, b.__isset);
}
-PrincipalPrivilegeSet::PrincipalPrivilegeSet(const PrincipalPrivilegeSet& other81) {
- userPrivileges = other81.userPrivileges;
- groupPrivileges = other81.groupPrivileges;
- rolePrivileges = other81.rolePrivileges;
- __isset = other81.__isset;
+HiveObjectPrivilege::HiveObjectPrivilege(const HiveObjectPrivilege& other33) {
+ hiveObject = other33.hiveObject;
+ principalName = other33.principalName;
+ principalType = other33.principalType;
+ grantInfo = other33.grantInfo;
+ __isset = other33.__isset;
}
-PrincipalPrivilegeSet& PrincipalPrivilegeSet::operator=(const PrincipalPrivilegeSet& other82) {
- userPrivileges = other82.userPrivileges;
- groupPrivileges = other82.groupPrivileges;
- rolePrivileges = other82.rolePrivileges;
- __isset = other82.__isset;
+HiveObjectPrivilege& HiveObjectPrivilege::operator=(const HiveObjectPrivilege& other34) {
+ hiveObject = other34.hiveObject;
+ principalName = other34.principalName;
+ principalType = other34.principalType;
+ grantInfo = other34.grantInfo;
+ __isset = other34.__isset;
return *this;
}
-void PrincipalPrivilegeSet::printTo(std::ostream& out) const {
+void HiveObjectPrivilege::printTo(std::ostream& out) const {
using ::apache::thrift::to_string;
- out << "PrincipalPrivilegeSet(";
- out << "userPrivileges=" << to_string(userPrivileges);
- out << ", " << "groupPrivileges=" << to_string(groupPrivileges);
- out << ", " << "rolePrivileges=" << to_string(rolePrivileges);
+ out << "HiveObjectPrivilege(";
+ out << "hiveObject=" << to_string(hiveObject);
+ out << ", " << "principalName=" << to_string(principalName);
+ out << ", " << "principalType=" << to_string(principalType);
+ out << ", " << "grantInfo=" << to_string(grantInfo);
out << ")";
}
-GrantRevokePrivilegeRequest::~GrantRevokePrivilegeRequest() throw() {
+PrivilegeBag::~PrivilegeBag() throw() {
}
-void GrantRevokePrivilegeRequest::__set_requestType(const GrantRevokeType::type val) {
- this->requestType = val;
-}
-
-void GrantRevokePrivilegeRequest::__set_privileges(const PrivilegeBag& val) {
+void PrivilegeBag::__set_privileges(const std::vector<HiveObjectPrivilege> & val) {
this->privileges = val;
}
-void GrantRevokePrivilegeRequest::__set_revokeGrantOption(const bool val) {
- this->revokeGrantOption = val;
-__isset.revokeGrantOption = true;
-}
-
-uint32_t GrantRevokePrivilegeRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t PrivilegeBag::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
uint32_t xfer = 0;
@@ -2069,31 +2128,25 @@ uint32_t GrantRevokePrivilegeRequest::read(::apache::thrift::protocol::TProtocol
switch (fid)
{
case 1:
- if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast83;
- xfer += iprot->readI32(ecast83);
- this->requestType = (GrantRevokeType::type)ecast83;
- this->__isset.requestType = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
- case 2:
- if (ftype == ::apache::thrift::protocol::T_STRUCT) {
- xfer += this->privileges.read(iprot);
+ if (ftype == ::apache::thrift::protocol::T_LIST) {
+ {
+ this->privileges.clear();
+ uint32_t _size35;
+ ::apache::thrift::protocol::TType _etype38;
+ xfer += iprot->readListBegin(_etype38, _size35);
+ this->privileges.resize(_size35);
+ uint32_t _i39;
+ for (_i39 = 0; _i39 < _size35; ++_i39)
+ {
+ xfer += this->privileges[_i39].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
this->__isset.privileges = true;
} else {
xfer += iprot->skip(ftype);
}
break;
- case 3:
- if (ftype == ::apache::thrift::protocol::T_BOOL) {
- xfer += iprot->readBool(this->revokeGrantOption);
- this->__isset.revokeGrantOption = true;
- } else {
- xfer += iprot->skip(ftype);
- }
- break;
default:
xfer += iprot->skip(ftype);
break;
@@ -2106,70 +2159,68 @@ uint32_t GrantRevokePrivilegeRequest::read(::apache::thrift::protocol::TProtocol
return xfer;
}
-uint32_t GrantRevokePrivilegeRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t PrivilegeBag::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("GrantRevokePrivilegeRequest");
-
- xfer += oprot->writeFieldBegin("requestType", ::apache::thrift::protocol::T_I32, 1);
- xfer += oprot->writeI32((int32_t)this->requestType);
- xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeStructBegin("PrivilegeBag");
- xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 2);
- xfer += this->privileges.write(oprot);
+ xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_LIST, 1);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->privileges.size()));
+ std::vector<HiveObjectPrivilege> ::const_iterator _iter40;
+ for (_iter40 = this->privileges.begin(); _iter40 != this->privileges.end(); ++_iter40)
+ {
+ xfer += (*_iter40).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
xfer += oprot->writeFieldEnd();
- if (this->__isset.revokeGrantOption) {
- xfer += oprot->writeFieldBegin("revokeGrantOption", ::apache::thrift::protocol::T_BOOL, 3);
- xfer += oprot->writeBool(this->revokeGrantOption);
- xfer += oprot->writeFieldEnd();
- }
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
-void swap(GrantRevokePrivilegeRequest &a, GrantRevokePrivilegeRequest &b) {
+void swap(PrivilegeBag &a, PrivilegeBag &b) {
using ::std::swap;
- swap(a.requestType, b.requestType);
swap(a.privileges, b.privileges);
- swap(a.revokeGrantOption, b.revokeGrantOption);
swap(a.__isset, b.__isset);
}
-GrantRevokePrivilegeRequest::GrantRevokePrivilegeRequest(const GrantRevokePrivilegeRequest& other84) {
- requestType = other84.requestType;
- privileges = other84.privileges;
- revokeGrantOption = other84.revokeGrantOption;
- __isset = other84.__isset;
+PrivilegeBag::PrivilegeBag(const PrivilegeBag& other41) {
+ privileges = other41.privileges;
+ __isset = other41.__isset;
}
-GrantRevokePrivilegeRequest& GrantRevokePrivilegeRequest::operator=(const GrantRevokePrivilegeRequest& other85) {
- requestType = other85.requestType;
- privileges = other85.privileges;
- revokeGrantOption = other85.revokeGrantOption;
- __isset = other85.__isset;
+PrivilegeBag& PrivilegeBag::operator=(const PrivilegeBag& other42) {
+ privileges = other42.privileges;
+ __isset = other42.__isset;
return *this;
}
-void GrantRevokePrivilegeRequest::printTo(std::ostream& out) const {
+void PrivilegeBag::printTo(std::ostream& out) const {
using ::apache::thrift::to_string;
- out << "GrantRevokePrivilegeRequest(";
- out << "requestType=" << to_string(requestType);
- out << ", " << "privileges=" << to_string(privileges);
- out << ", " << "revokeGrantOption="; (__isset.revokeGrantOption ? (out << to_string(revokeGrantOption)) : (out << "<null>"));
+ out << "PrivilegeBag(";
+ out << "privileges=" << to_string(privileges);
out << ")";
}
-GrantRevokePrivilegeResponse::~GrantRevokePrivilegeResponse() throw() {
+PrincipalPrivilegeSet::~PrincipalPrivilegeSet() throw() {
}
-void GrantRevokePrivilegeResponse::__set_success(const bool val) {
- this->success = val;
-__isset.success = true;
+void PrincipalPrivilegeSet::__set_userPrivileges(const std::map<std::string, std::vector<PrivilegeGrantInfo> > & val) {
+ this->userPrivileges = val;
}
-uint32_t GrantRevokePrivilegeResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
+void PrincipalPrivilegeSet::__set_groupPrivileges(const std::map<std::string, std::vector<PrivilegeGrantInfo> > & val) {
+ this->groupPrivileges = val;
+}
+
+void PrincipalPrivilegeSet::__set_rolePrivileges(const std::map<std::string, std::vector<PrivilegeGrantInfo> > & val) {
+ this->rolePrivileges = val;
+}
+
+uint32_t PrincipalPrivilegeSet::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
uint32_t xfer = 0;
@@ -2191,9 +2242,106 @@ uint32_t GrantRevokePrivilegeResponse::read(::apache::thrift::protocol::TProtoco
switch (fid)
{
case 1:
- if (ftype == ::apache::thrift::protocol::T_BOOL) {
- xfer += iprot->readBool(this->success);
- this->__isset.success = true;
+ if (ftype == ::apache::thrift::protocol::T_MAP) {
+ {
+ this->userPrivileges.clear();
+ uint32_t _size43;
+ ::apache::thrift::protocol::TType _ktype44;
+ ::apache::thrift::protocol::TType _vtype45;
+ xfer += iprot->readMapBegin(_ktype44, _vtype45, _size43);
+ uint32_t _i47;
+ for (_i47 = 0; _i47 < _size43; ++_i47)
+ {
+ std::string _key48;
+ xfer += iprot->readString(_key48);
+ std::vector<PrivilegeGrantInfo> & _val49 = this->userPrivileges[_key48];
+ {
+ _val49.clear();
+ uint32_t _size50;
+ ::apache::thrift::protocol::TType _etype53;
+ xfer += iprot->readListBegin(_etype53, _size50);
+ _val49.resize(_size50);
+ uint32_t _i54;
+ for (_i54 = 0; _i54 < _size50; ++_i54)
+ {
+ xfer += _val49[_i54].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ }
+ xfer += 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 _size55;
+ ::apache::thrift::protocol::TType _ktype56;
+ ::apache::thrift::protocol::TType _vtype57;
+ xfer += iprot->readMapBegin(_ktype56, _vtype57, _size55);
+ uint32_t _i59;
+ for (_i59 = 0; _i59 < _size55; ++_i59)
+ {
+ std::string _key60;
+ xfer += iprot->readString(_key60);
+ std::vector<PrivilegeGrantInfo> & _val61 = this->groupPrivileges[_key60];
+ {
+ _val61.clear();
+ uint32_t _size62;
+ ::apache::thrift::protocol::TType _etype65;
+ xfer += iprot->readListBegin(_etype65, _size62);
+ _val61.resize(_size62);
+ uint32_t _i66;
+ for (_i66 = 0; _i66 < _size62; ++_i66)
+ {
+ xfer += _val61[_i66].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ }
+ xfer += 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 _size67;
+ ::apache::thrift::protocol::TType _ktype68;
+ ::apache::thrift::protocol::TType _vtype69;
+ xfer += iprot->readMapBegin(_ktype68, _vtype69, _size67);
+ uint32_t _i71;
+ for (_i71 = 0; _i71 < _size67; ++_i71)
+ {
+ std::string _key72;
+ xfer += iprot->readString(_key72);
+ std::vector<PrivilegeGrantInfo> & _val73 = this->rolePrivileges[_key72];
+ {
+ _val73.clear();
+ uint32_t _size74;
+ ::apache::thrift::protocol::TType _etype77;
+ xfer += iprot->readListBegin(_etype77, _size74);
+ _val73.resize(_size74);
+ uint32_t _i78;
+ for (_i78 = 0; _i78 < _size74; ++_i78)
+ {
+ xfer += _val73[_i78].read(iprot);
+ }
+ xfer += iprot->readListEnd();
+ }
+ }
+ xfer += iprot->readMapEnd();
+ }
+ this->__isset.rolePrivileges = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -2210,61 +2358,128 @@ uint32_t GrantRevokePrivilegeResponse::read(::apache::thrift::protocol::TProtoco
return xfer;
}
-uint32_t GrantRevokePrivilegeResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
+uint32_t PrincipalPrivilegeSet::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
- xfer += oprot->writeStructBegin("GrantRevokePrivilegeResponse");
+ xfer += oprot->writeStructBegin("PrincipalPrivilegeSet");
- if (this->__isset.success) {
- xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 1);
- xfer += oprot->writeBool(this->success);
- xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("userPrivileges", ::apache::thrift::protocol::T_MAP, 1);
+ {
+ xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->userPrivileges.size()));
+ std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter79;
+ for (_iter79 = this->userPrivileges.begin(); _iter79 != this->userPrivileges.end(); ++_iter79)
+ {
+ xfer += oprot->writeString(_iter79->first);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter79->second.size()));
+ std::vector<PrivilegeGrantInfo> ::const_iterator _iter80;
+ for (_iter80 = _iter79->second.begin(); _iter80 != _iter79->second.end(); ++_iter80)
+ {
+ xfer += (*_iter80).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
+ }
+ xfer += oprot->writeMapEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("groupPrivileges", ::apache::thrift::protocol::T_MAP, 2);
+ {
+ xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->groupPrivileges.size()));
+ std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter81;
+ for (_iter81 = this->groupPrivileges.begin(); _iter81 != this->groupPrivileges.end(); ++_iter81)
+ {
+ xfer += oprot->writeString(_iter81->first);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter81->second.size()));
+ std::vector<PrivilegeGrantInfo> ::const_iterator _iter82;
+ for (_iter82 = _iter81->second.begin(); _iter82 != _iter81->second.end(); ++_iter82)
+ {
+ xfer += (*_iter82).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
+ }
+ xfer += oprot->writeMapEnd();
+ }
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("rolePrivileges", ::apache::thrift::protocol::T_MAP, 3);
+ {
+ xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_LIST, static_cast<uint32_t>(this->rolePrivileges.size()));
+ std::map<std::string, std::vector<PrivilegeGrantInfo> > ::const_iterator _iter83;
+ for (_iter83 = this->rolePrivileges.begin(); _iter83 != this->rolePrivileges.end(); ++_iter83)
+ {
+ xfer += oprot->writeString(_iter83->first);
+ {
+ xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(_iter83->second.size()));
+ std::vector<PrivilegeGrantInfo> ::const_iterator _iter84;
+ for (_iter84 = _iter83->second.begin(); _iter84 != _iter83->second.end(); ++_iter84)
+ {
+ xfer += (*_iter84).write(oprot);
+ }
+ xfer += oprot->writeListEnd();
+ }
+ }
+ xfer += oprot->writeMapEnd();
}
+ xfer += oprot->writeFieldEnd();
+
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
}
-void swap(GrantRevokePrivilegeResponse &a, GrantRevokePrivilegeResponse &b) {
+void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b) {
using ::std::swap;
- swap(a.success, b.success);
+ swap(a.userPrivileges, b.userPrivileges);
+ swap(a.groupPrivileges, b.groupPrivileges);
+ swap(a.rolePrivileges, b.rolePrivileges);
swap(a.__isset, b.__isset);
}
-GrantRevokePrivilegeResponse::GrantRevokePrivilegeResponse(const GrantRevokePrivilegeResponse& other86) {
- success = other86.success;
- __isset = other86.__isset;
+PrincipalPrivilegeSet::PrincipalPrivilegeSet(const PrincipalPrivilegeSet& other85) {
+ userPrivileges = other85.userPrivileges;
+ groupPrivileges = other85.groupPrivileges;
+ rolePrivileges = other85.rolePrivileges;
+ __isset = other85.__isset;
}
-GrantRevokePrivilegeResponse& GrantRevokePrivilegeResponse::operator=(const GrantRevokePrivilegeResponse& other87) {
- success = other87.success;
- __isset = other87.__isset;
+PrincipalPrivilegeSet& PrincipalPrivilegeSet::operator=(const PrincipalPrivilegeSet& other86) {
+ userPrivileges = other86.userPrivileges;
+ groupPrivileges = other86.groupPrivileges;
+ rolePrivileges = other86.rolePrivileges;
+ __isset = other86.__isset;
return *this;
}
-void GrantRevokePrivilegeResponse::printTo(std::ostream& out) const {
+void PrincipalPrivilegeSet::printTo(std::ostream& out) const {
using ::apache::thrift::to_string;
- out << "GrantRevokePrivilegeResponse(";
- out << "success="; (__isset.success ? (out << to_string(success)) : (out << "<null>"));
+ out << "PrincipalPrivilegeSet(";
+ out << "userPrivileges=" << to_string(userPrivileges);
+ out << ", " << "groupPrivileges=" << to_string(groupPrivileges);
+ out << ", " << "rolePrivileges=" << to_string(rolePrivileges);
out << ")";
}
-Role::~Role() throw() {
+GrantRevokePrivilegeRequest::~GrantRevokePrivilegeRequest() throw() {
}
-void Role::__set_roleName(const std::string& val) {
- this->roleName = val;
+void GrantRevokePrivilegeRequest::__set_requestType(const GrantRevokeType::type val) {
+ this->requestType = val;
}
-void Role::__set_createTime(const int32_t val) {
- this->createTime = val;
+void GrantRevokePrivilegeRequest::__set_privileges(const PrivilegeBag& val) {
+ this->privileges = val;
}
-void Role::__set_ownerName(const std::string& val) {
- this->ownerName = val;
+void GrantRevokePrivilegeRequest::__set_revokeGrantOption(const bool val) {
+ this->revokeGrantOption = val;
+__isset.revokeGrantOption = true;
}
-uint32_t Role::read(::apache::thrift::protocol::TProtocol* iprot) {
+uint32_t GrantRevokePrivilegeRequest::read(::apache::thrift::protocol::TProtocol* iprot) {
apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
uint32_t xfer = 0;
@@ -2286,15 +2501,232 @@ uint32_t Role::read(::apache::thrift::protocol::TProtocol* iprot) {
switch (fid)
{
case 1:
- if (ftype == ::apache::thrift::protocol::T_STRING) {
- xfer += iprot->readString(this->roleName);
- this->__isset.roleName = true;
+ if (ftype == ::apache::thrift::protocol::T_I32) {
+ int32_t ecast87;
+ xfer += iprot->readI32(ecast87);
+ this->requestType = (GrantRevokeType::type)ecast87;
+ this->__isset.requestType = true;
} else {
xfer += iprot->skip(ftype);
}
break;
case 2:
- if (ftype == ::apache::thrift::protocol::T_I32) {
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->privileges.read(iprot);
+ this->__isset.privileges = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 3:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->revokeGrantOption);
+ this->__isset.revokeGrantOption = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t GrantRevokePrivilegeRequest::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+ xfer += oprot->writeStructBegin("GrantRevokePrivilegeRequest");
+
+ xfer += oprot->writeFieldBegin("requestType", ::apache::thrift::protocol::T_I32, 1);
+ xfer += oprot->writeI32((int32_t)this->requestType);
+ xfer += oprot->writeFieldEnd();
+
+ xfer += oprot->writeFieldBegin("privileges", ::apache::thrift::protocol::T_STRUCT, 2);
+ xfer += this->privileges.write(oprot);
+ xfer += oprot->writeFieldEnd();
+
+ if (this->__isset.revokeGrantOption) {
+ xfer += oprot->writeFieldBegin("revokeGrantOption", ::apache::thrift::protocol::T_BOOL, 3);
+ xfer += oprot->writeBool(this->revokeGrantOption);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(GrantRevokePrivilegeRequest &a, GrantRevokePrivilegeRequest &b) {
+ using ::std::swap;
+ swap(a.requestType, b.requestType);
+ swap(a.privileges, b.privileges);
+ swap(a.revokeGrantOption, b.revokeGrantOption);
+ swap(a.__isset, b.__isset);
+}
+
+GrantRevokePrivilegeRequest::GrantRevokePrivilegeRequest(const GrantRevokePrivilegeRequest& other88) {
+ requestType = other88.requestType;
+ privileges = other88.privileges;
+ revokeGrantOption = other88.revokeGrantOption;
+ __isset = other88.__isset;
+}
+GrantRevokePrivilegeRequest& GrantRevokePrivilegeRequest::operator=(const GrantRevokePrivilegeRequest& other89) {
+ requestType = other89.requestType;
+ privileges = other89.privileges;
+ revokeGrantOption = other89.revokeGrantOption;
+ __isset = other89.__isset;
+ return *this;
+}
+void GrantRevokePrivilegeRequest::printTo(std::ostream& out) const {
+ using ::apache::thrift::to_string;
+ out << "GrantRevokePrivilegeRequest(";
+ out << "requestType=" << to_string(requestType);
+ out << ", " << "privileges=" << to_string(privileges);
+ out << ", " << "revokeGrantOption="; (__isset.revokeGrantOption ? (out << to_string(revokeGrantOption)) : (out << "<null>"));
+ out << ")";
+}
+
+
+GrantRevokePrivilegeResponse::~GrantRevokePrivilegeResponse() throw() {
+}
+
+
+void GrantRevokePrivilegeResponse::__set_success(const bool val) {
+ this->success = val;
+__isset.success = true;
+}
+
+uint32_t GrantRevokePrivilegeResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->success);
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t GrantRevokePrivilegeResponse::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
+ xfer += oprot->writeStructBegin("GrantRevokePrivilegeResponse");
+
+ if (this->__isset.success) {
+ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 1);
+ xfer += oprot->writeBool(this->success);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+void swap(GrantRevokePrivilegeResponse &a, GrantRevokePrivilegeResponse &b) {
+ using ::std::swap;
+ swap(a.success, b.success);
+ swap(a.__isset, b.__isset);
+}
+
+GrantRevokePrivilegeResponse::GrantRevokePrivilegeResponse(const GrantRevokePrivilegeResponse& other90) {
+ success = other90.success;
+ __isset = other90.__isset;
+}
+GrantRevokePrivilegeResponse& GrantRevokePrivilegeResponse::operator=(const GrantRevokePrivilegeResponse& other91) {
+ success = other91.success;
+ __isset = other91.__isset;
+ return *this;
+}
+void GrantRevokePrivilegeResponse::printTo(std::ostream& out) const {
+ using ::apache::thrift::to_string;
+ out << "GrantRevokePrivilegeResponse(";
+ out << "success="; (__isset.success ? (out << to_string(success)) : (out << "<null>"));
+ out << ")";
+}
+
+
+Role::~Role() throw() {
+}
+
+
+void Role::__set_roleName(const std::string& val) {
+ this->roleName = val;
+}
+
+void Role::__set_createTime(const int32_t val) {
+ this->createTime = val;
+}
+
+void Role::__set_ownerName(const std::string& val) {
+ this->ownerName = val;
+}
+
+uint32_t Role::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ apache::thrift::protocol::TInputRecursionTracker tracker(*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 {
@@ -2351,17 +2783,17 @@ void swap(Role &a, Role &b) {
swap(a.__isset, b.__isset);
}
-Role::Role(const Role& other88) {
- roleName = other88.roleName;
- createTime = other88.createTime;
- ownerName = other88.ownerName;
- __isset = other88.__isset;
+Role::Role(const Role& other92) {
+ roleName = other92.roleName;
+ createTime = other92.createTime;
+ ownerName = other92.ownerName;
+ __isset = other92.__isset;
}
-Role& Role::operator=(const Role& other89) {
- roleName = other89.roleName;
- createTime = other89.createTime;
- ownerName = other89.ownerName;
- __isset = other89.__isset;
+Role& Role::operator=(const Role& other93) {
+ roleName = other93.roleName;
+ createTime = other93.createTime;
+ ownerName = other93.ownerName;
+ __isset = other93.__isset;
return *this;
}
void Role::printTo(std::ostream& out) const {
@@ -2445,9 +2877,9 @@ uint32_t RolePrincipalGrant::read(::apache::thrift::protocol::TProtocol* iprot)
break;
case 3:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast90;
- xfer += iprot->readI32(ecast90);
- this->principalType = (PrincipalType::type)ecast90;
+ int32_t ecast94;
+ xfer += iprot->readI32(ecast94);
+ this->principalType = (PrincipalType::type)ecast94;
this->__isset.principalType = true;
} else {
xfer += iprot->skip(ftype);
@@ -2479,9 +2911,9 @@ uint32_t RolePrincipalGrant::read(::apache::thrift::protocol::TProtocol* iprot)
break;
case 7:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast91;
- xfer += iprot->readI32(ecast91);
- this->grantorPrincipalType = (PrincipalType::type)ecast91;
+ int32_t ecast95;
+ xfer += iprot->readI32(ecast95);
+ this->grantorPrincipalType = (PrincipalType::type)ecast95;
this->__isset.grantorPrincipalType = true;
} else {
xfer += iprot->skip(ftype);
@@ -2549,25 +2981,25 @@ void swap(RolePrincipalGrant &a, RolePrincipalGrant &b) {
swap(a.__isset, b.__isset);
}
-RolePrincipalGrant::RolePrincipalGrant(const RolePrincipalGrant& other92) {
- roleName = other92.roleName;
- principalName = other92.principalName;
- principalType = other92.principalType;
- grantOption = other92.grantOption;
- grantTime = other92.grantTime;
- grantorName = other92.grantorName;
- grantorPrincipalType = other92.grantorPrincipalType;
- __isset = other92.__isset;
-}
-RolePrincipalGrant& RolePrincipalGrant::operator=(const RolePrincipalGrant& other93) {
- roleName = other93.roleName;
- principalName = other93.principalName;
- principalType = other93.principalType;
- grantOption = other93.grantOption;
- grantTime = other93.grantTime;
- grantorName = other93.grantorName;
- grantorPrincipalType = other93.grantorPrincipalType;
- __isset = other93.__isset;
+RolePrincipalGrant::RolePrincipalGrant(const RolePrincipalGrant& other96) {
+ roleName = other96.roleName;
+ principalName = other96.principalName;
+ principalType = other96.principalType;
+ grantOption = other96.grantOption;
+ grantTime = other96.grantTime;
+ grantorName = other96.grantorName;
+ grantorPrincipalType = other96.grantorPrincipalType;
+ __isset = other96.__isset;
+}
+RolePrincipalGrant& RolePrincipalGrant::operator=(const RolePrincipalGrant& other97) {
+ roleName = other97.roleName;
+ principalName = other97.principalName;
+ principalType = other97.principalType;
+ grantOption = other97.grantOption;
+ grantTime = other97.grantTime;
+ grantorName = other97.grantorName;
+ grantorPrincipalType = other97.grantorPrincipalType;
+ __isset = other97.__isset;
return *this;
}
void RolePrincipalGrant::printTo(std::ostream& out) const {
@@ -2629,9 +3061,9 @@ uint32_t GetRoleGrantsForPrincipalRequest::read(::apache::thrift::protocol::TPro
break;
case 2:
if (ftype == ::apache::thrift::protocol::T_I32) {
- int32_t ecast94;
- xfer += iprot->readI32(ecast94);
- this->principal_type = (PrincipalType::type)ecast94;
+ int32_t ecast98;
+ xfer += iprot->readI32(ecast98);
+ this->principal_type = (PrincipalType::type)ecast98;
isset_principal_type = true;
} else {
xfer += iprot->skip(ftype);
@@ -2677,13 +3109,13 @@ void swap(GetRoleGrantsForPrincipalRequest &a, GetRoleGrantsForPrincipalRequest
swap(a.principal_type, b.principal_type);
}
-GetRoleGrantsForPrincipalRequest::GetRoleGrantsForPrincipalRequest(const GetRoleGrantsForPrincipalRequest& other95) {
- principal_name = other95.principal_name;
- principal_type = other95.principal_type;
+GetRoleGrantsForPrincipalRequest::GetRoleGrantsForPrincipalRequest(const GetRoleGrantsForPrincipalRequest& other99) {
+ principal_name = other99.principal_name;
+ principal_type = other99.principal_type;
}
-GetRoleGrantsForPrincipalRequest& GetRoleGrantsForPrincipalRequest::operator=(const GetRoleGrantsForPrincipalRequest& other96) {
- principal_name = other96.principal_name;
- principal_type = other96.principal_type;
+GetRoleGrantsForPrincipalRequest& GetRoleGrantsForPrincipalRequest::operator=(const GetRoleGrantsForPrincipalRequest& other100) {
+ principal_name = other100.principal_name;
+ principal_type = other100.principal_type;
return *this;
}
void GetRoleGrantsForPrincipalRequest::printTo(std::ostream& out) const {
@@ -2729,14 +3161,14 @@ uint32_t GetRoleGrantsForPrincipalResponse::read(::apache::thrift::protocol::TPr
if (ftype == ::apache::thrift::protocol::T_LIST) {
{
this->principalGrants.clear();
- uint32_t _size97;
- ::apache::thrift::protocol::TType _etype100;
- xfer += iprot->readListBegin(_etype100, _size97);
- this->principalGrants.resize(_size97);
- uint32_t _i101;
- for (_i101 = 0; _i101 < _size97; ++_i101)
+ uint32_t _size101;
+ ::apache::thrift::protocol::TType _etype104;
+ xfer += iprot->readListBegin(_etype104, _size101);
+ this->principalGrants.resize(_size101);
+ uint32_t _i105;
+ for (_i105 = 0; _i105 < _size101; ++_i105)
{
- xfer += this->principalGrants[_i101].read(iprot);
+ xfer += this->principalGrants[_i105].read(iprot);
}
xfer += iprot->readListEnd();
}
@@ -2767,10 +3199,10 @@ uint32_t GetRoleGrantsForPrincipalResponse::write(::apache::thrift::protocol::TP
xfer += oprot->writeFieldBegin("principalGrants", ::apache::thrift::protocol::T_LIST, 1);
{
xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->principalGrants.size()));
- std::vector<RolePrincipalGrant> ::const_iterator _iter102;
- for (_iter102 = this->principalGrants.begin(); _iter102 != this->principalGrants.end(); ++_iter102)
+ std::vector<RolePrincipalGrant> ::const_iterator _iter106;
+ for (_iter106 = this->principalGrants.begin(); _iter106 != this->principalGrants.end(); ++_iter1
<TRUNCATED>