You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by th...@apache.org on 2014/03/29 00:33:08 UTC
svn commit: r1582911 [5/13] - in /hive/trunk: metastore/if/
metastore/src/gen/thrift/gen-cpp/
metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/
metastore/src/gen/thrift/gen-php/metastore/
metastore/src/gen/thrift/gen-py/hive_m...
Modified: hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h Fri Mar 28 23:33:07 2014
@@ -621,24 +621,19 @@ class PrincipalPrivilegeSet {
void swap(PrincipalPrivilegeSet &a, PrincipalPrivilegeSet &b);
typedef struct _Role__isset {
- _Role__isset() : roleName(false), createTime(false), ownerName(false), principalName(false), principalType(false), grantOption(false), grantTime(false), grantor(false) {}
+ _Role__isset() : roleName(false), createTime(false), ownerName(false) {}
bool roleName;
bool createTime;
bool ownerName;
- bool principalName;
- bool principalType;
- bool grantOption;
- bool grantTime;
- bool grantor;
} _Role__isset;
class Role {
public:
- static const char* ascii_fingerprint; // = "8DEBC3096AEF414FFF38C357ECEEA8BC";
- static const uint8_t binary_fingerprint[16]; // = {0x8D,0xEB,0xC3,0x09,0x6A,0xEF,0x41,0x4F,0xFF,0x38,0xC3,0x57,0xEC,0xEE,0xA8,0xBC};
+ 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(), principalName(), principalType(), grantOption(0), grantTime(0), grantor() {
+ Role() : roleName(), createTime(0), ownerName() {
}
virtual ~Role() throw() {}
@@ -646,11 +641,6 @@ class Role {
std::string roleName;
int32_t createTime;
std::string ownerName;
- std::string principalName;
- std::string principalType;
- bool grantOption;
- int32_t grantTime;
- std::string grantor;
_Role__isset __isset;
@@ -666,31 +656,6 @@ class Role {
ownerName = val;
}
- void __set_principalName(const std::string& val) {
- principalName = val;
- __isset.principalName = true;
- }
-
- void __set_principalType(const std::string& val) {
- principalType = val;
- __isset.principalType = true;
- }
-
- void __set_grantOption(const bool val) {
- grantOption = val;
- __isset.grantOption = true;
- }
-
- void __set_grantTime(const int32_t val) {
- grantTime = val;
- __isset.grantTime = true;
- }
-
- void __set_grantor(const std::string& val) {
- grantor = val;
- __isset.grantor = true;
- }
-
bool operator == (const Role & rhs) const
{
if (!(roleName == rhs.roleName))
@@ -699,26 +664,6 @@ class Role {
return false;
if (!(ownerName == rhs.ownerName))
return false;
- if (__isset.principalName != rhs.__isset.principalName)
- return false;
- else if (__isset.principalName && !(principalName == rhs.principalName))
- return false;
- if (__isset.principalType != rhs.__isset.principalType)
- return false;
- else if (__isset.principalType && !(principalType == rhs.principalType))
- return false;
- if (__isset.grantOption != rhs.__isset.grantOption)
- return false;
- else if (__isset.grantOption && !(grantOption == rhs.grantOption))
- return false;
- if (__isset.grantTime != rhs.__isset.grantTime)
- return false;
- else if (__isset.grantTime && !(grantTime == rhs.grantTime))
- return false;
- if (__isset.grantor != rhs.__isset.grantor)
- return false;
- else if (__isset.grantor && !(grantor == rhs.grantor))
- return false;
return true;
}
bool operator != (const Role &rhs) const {
@@ -825,10 +770,87 @@ class RolePrincipalGrant {
void swap(RolePrincipalGrant &a, RolePrincipalGrant &b);
-typedef struct _GetPrincipalsInRoleRequest__isset {
- _GetPrincipalsInRoleRequest__isset() : roleName(false) {}
- bool roleName;
-} _GetPrincipalsInRoleRequest__isset;
+
+class GetRoleGrantsForPrincipalRequest {
+ public:
+
+ static const char* ascii_fingerprint; // = "D6FD826D949221396F4FFC3ECCD3D192";
+ static const uint8_t binary_fingerprint[16]; // = {0xD6,0xFD,0x82,0x6D,0x94,0x92,0x21,0x39,0x6F,0x4F,0xFC,0x3E,0xCC,0xD3,0xD1,0x92};
+
+ GetRoleGrantsForPrincipalRequest() : principal_name(), principal_type((PrincipalType::type)0) {
+ }
+
+ virtual ~GetRoleGrantsForPrincipalRequest() throw() {}
+
+ std::string principal_name;
+ PrincipalType::type principal_type;
+
+ void __set_principal_name(const std::string& val) {
+ principal_name = val;
+ }
+
+ void __set_principal_type(const PrincipalType::type val) {
+ principal_type = val;
+ }
+
+ bool operator == (const GetRoleGrantsForPrincipalRequest & rhs) const
+ {
+ if (!(principal_name == rhs.principal_name))
+ return false;
+ if (!(principal_type == rhs.principal_type))
+ return false;
+ return true;
+ }
+ bool operator != (const GetRoleGrantsForPrincipalRequest &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const GetRoleGrantsForPrincipalRequest & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(GetRoleGrantsForPrincipalRequest &a, GetRoleGrantsForPrincipalRequest &b);
+
+
+class GetRoleGrantsForPrincipalResponse {
+ public:
+
+ static const char* ascii_fingerprint; // = "5926B4B3541A62E17663820C7E3BE690";
+ static const uint8_t binary_fingerprint[16]; // = {0x59,0x26,0xB4,0xB3,0x54,0x1A,0x62,0xE1,0x76,0x63,0x82,0x0C,0x7E,0x3B,0xE6,0x90};
+
+ GetRoleGrantsForPrincipalResponse() {
+ }
+
+ virtual ~GetRoleGrantsForPrincipalResponse() throw() {}
+
+ std::vector<RolePrincipalGrant> principalGrants;
+
+ void __set_principalGrants(const std::vector<RolePrincipalGrant> & val) {
+ principalGrants = val;
+ }
+
+ bool operator == (const GetRoleGrantsForPrincipalResponse & rhs) const
+ {
+ if (!(principalGrants == rhs.principalGrants))
+ return false;
+ return true;
+ }
+ bool operator != (const GetRoleGrantsForPrincipalResponse &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const GetRoleGrantsForPrincipalResponse & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+void swap(GetRoleGrantsForPrincipalResponse &a, GetRoleGrantsForPrincipalResponse &b);
+
class GetPrincipalsInRoleRequest {
public:
@@ -843,8 +865,6 @@ class GetPrincipalsInRoleRequest {
std::string roleName;
- _GetPrincipalsInRoleRequest__isset __isset;
-
void __set_roleName(const std::string& val) {
roleName = val;
}
@@ -868,10 +888,6 @@ class GetPrincipalsInRoleRequest {
void swap(GetPrincipalsInRoleRequest &a, GetPrincipalsInRoleRequest &b);
-typedef struct _GetPrincipalsInRoleResponse__isset {
- _GetPrincipalsInRoleResponse__isset() : principalGrants(false) {}
- bool principalGrants;
-} _GetPrincipalsInRoleResponse__isset;
class GetPrincipalsInRoleResponse {
public:
@@ -886,8 +902,6 @@ class GetPrincipalsInRoleResponse {
std::vector<RolePrincipalGrant> principalGrants;
- _GetPrincipalsInRoleResponse__isset __isset;
-
void __set_principalGrants(const std::vector<RolePrincipalGrant> & val) {
principalGrants = val;
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsRequest.java Fri Mar 28 23:33:07 2014
@@ -700,14 +700,14 @@ public class AddPartitionsRequest implem
case 3: // PARTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list330 = iprot.readListBegin();
- struct.parts = new ArrayList<Partition>(_list330.size);
- for (int _i331 = 0; _i331 < _list330.size; ++_i331)
+ org.apache.thrift.protocol.TList _list338 = iprot.readListBegin();
+ struct.parts = new ArrayList<Partition>(_list338.size);
+ for (int _i339 = 0; _i339 < _list338.size; ++_i339)
{
- Partition _elem332; // optional
- _elem332 = new Partition();
- _elem332.read(iprot);
- struct.parts.add(_elem332);
+ Partition _elem340; // optional
+ _elem340 = new Partition();
+ _elem340.read(iprot);
+ struct.parts.add(_elem340);
}
iprot.readListEnd();
}
@@ -759,9 +759,9 @@ public class AddPartitionsRequest implem
oprot.writeFieldBegin(PARTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.parts.size()));
- for (Partition _iter333 : struct.parts)
+ for (Partition _iter341 : struct.parts)
{
- _iter333.write(oprot);
+ _iter341.write(oprot);
}
oprot.writeListEnd();
}
@@ -796,9 +796,9 @@ public class AddPartitionsRequest implem
oprot.writeString(struct.tblName);
{
oprot.writeI32(struct.parts.size());
- for (Partition _iter334 : struct.parts)
+ for (Partition _iter342 : struct.parts)
{
- _iter334.write(oprot);
+ _iter342.write(oprot);
}
}
oprot.writeBool(struct.ifNotExists);
@@ -820,14 +820,14 @@ public class AddPartitionsRequest implem
struct.tblName = iprot.readString();
struct.setTblNameIsSet(true);
{
- org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.parts = new ArrayList<Partition>(_list335.size);
- for (int _i336 = 0; _i336 < _list335.size; ++_i336)
+ org.apache.thrift.protocol.TList _list343 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.parts = new ArrayList<Partition>(_list343.size);
+ for (int _i344 = 0; _i344 < _list343.size; ++_i344)
{
- Partition _elem337; // optional
- _elem337 = new Partition();
- _elem337.read(iprot);
- struct.parts.add(_elem337);
+ Partition _elem345; // optional
+ _elem345 = new Partition();
+ _elem345.read(iprot);
+ struct.parts.add(_elem345);
}
}
struct.setPartsIsSet(true);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/AddPartitionsResult.java Fri Mar 28 23:33:07 2014
@@ -342,14 +342,14 @@ public class AddPartitionsResult impleme
case 1: // PARTITIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list322 = iprot.readListBegin();
- struct.partitions = new ArrayList<Partition>(_list322.size);
- for (int _i323 = 0; _i323 < _list322.size; ++_i323)
+ org.apache.thrift.protocol.TList _list330 = iprot.readListBegin();
+ struct.partitions = new ArrayList<Partition>(_list330.size);
+ for (int _i331 = 0; _i331 < _list330.size; ++_i331)
{
- Partition _elem324; // optional
- _elem324 = new Partition();
- _elem324.read(iprot);
- struct.partitions.add(_elem324);
+ Partition _elem332; // optional
+ _elem332 = new Partition();
+ _elem332.read(iprot);
+ struct.partitions.add(_elem332);
}
iprot.readListEnd();
}
@@ -376,9 +376,9 @@ public class AddPartitionsResult impleme
oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
- for (Partition _iter325 : struct.partitions)
+ for (Partition _iter333 : struct.partitions)
{
- _iter325.write(oprot);
+ _iter333.write(oprot);
}
oprot.writeListEnd();
}
@@ -410,9 +410,9 @@ public class AddPartitionsResult impleme
if (struct.isSetPartitions()) {
{
oprot.writeI32(struct.partitions.size());
- for (Partition _iter326 : struct.partitions)
+ for (Partition _iter334 : struct.partitions)
{
- _iter326.write(oprot);
+ _iter334.write(oprot);
}
}
}
@@ -424,14 +424,14 @@ public class AddPartitionsResult impleme
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list327 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.partitions = new ArrayList<Partition>(_list327.size);
- for (int _i328 = 0; _i328 < _list327.size; ++_i328)
+ org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.partitions = new ArrayList<Partition>(_list335.size);
+ for (int _i336 = 0; _i336 < _list335.size; ++_i336)
{
- Partition _elem329; // optional
- _elem329 = new Partition();
- _elem329.read(iprot);
- struct.partitions.add(_elem329);
+ Partition _elem337; // optional
+ _elem337 = new Partition();
+ _elem337.read(iprot);
+ struct.partitions.add(_elem337);
}
}
struct.setPartitionsIsSet(true);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ColumnStatistics.java Fri Mar 28 23:33:07 2014
@@ -447,14 +447,14 @@ public class ColumnStatistics implements
case 2: // STATS_OBJ
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list228 = iprot.readListBegin();
- struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list228.size);
- for (int _i229 = 0; _i229 < _list228.size; ++_i229)
+ org.apache.thrift.protocol.TList _list236 = iprot.readListBegin();
+ struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list236.size);
+ for (int _i237 = 0; _i237 < _list236.size; ++_i237)
{
- ColumnStatisticsObj _elem230; // optional
- _elem230 = new ColumnStatisticsObj();
- _elem230.read(iprot);
- struct.statsObj.add(_elem230);
+ ColumnStatisticsObj _elem238; // optional
+ _elem238 = new ColumnStatisticsObj();
+ _elem238.read(iprot);
+ struct.statsObj.add(_elem238);
}
iprot.readListEnd();
}
@@ -485,9 +485,9 @@ public class ColumnStatistics implements
oprot.writeFieldBegin(STATS_OBJ_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.statsObj.size()));
- for (ColumnStatisticsObj _iter231 : struct.statsObj)
+ for (ColumnStatisticsObj _iter239 : struct.statsObj)
{
- _iter231.write(oprot);
+ _iter239.write(oprot);
}
oprot.writeListEnd();
}
@@ -513,9 +513,9 @@ public class ColumnStatistics implements
struct.statsDesc.write(oprot);
{
oprot.writeI32(struct.statsObj.size());
- for (ColumnStatisticsObj _iter232 : struct.statsObj)
+ for (ColumnStatisticsObj _iter240 : struct.statsObj)
{
- _iter232.write(oprot);
+ _iter240.write(oprot);
}
}
}
@@ -527,14 +527,14 @@ public class ColumnStatistics implements
struct.statsDesc.read(iprot);
struct.setStatsDescIsSet(true);
{
- org.apache.thrift.protocol.TList _list233 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list233.size);
- for (int _i234 = 0; _i234 < _list233.size; ++_i234)
+ org.apache.thrift.protocol.TList _list241 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.statsObj = new ArrayList<ColumnStatisticsObj>(_list241.size);
+ for (int _i242 = 0; _i242 < _list241.size; ++_i242)
{
- ColumnStatisticsObj _elem235; // optional
- _elem235 = new ColumnStatisticsObj();
- _elem235.read(iprot);
- struct.statsObj.add(_elem235);
+ ColumnStatisticsObj _elem243; // optional
+ _elem243 = new ColumnStatisticsObj();
+ _elem243.read(iprot);
+ struct.statsObj.add(_elem243);
}
}
struct.setStatsObjIsSet(true);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java Fri Mar 28 23:33:07 2014
@@ -877,15 +877,15 @@ public class Database implements org.apa
case 4: // PARAMETERS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map86 = iprot.readMapBegin();
- struct.parameters = new HashMap<String,String>(2*_map86.size);
- for (int _i87 = 0; _i87 < _map86.size; ++_i87)
+ org.apache.thrift.protocol.TMap _map94 = iprot.readMapBegin();
+ struct.parameters = new HashMap<String,String>(2*_map94.size);
+ for (int _i95 = 0; _i95 < _map94.size; ++_i95)
{
- String _key88; // required
- String _val89; // required
- _key88 = iprot.readString();
- _val89 = iprot.readString();
- struct.parameters.put(_key88, _val89);
+ String _key96; // required
+ String _val97; // required
+ _key96 = iprot.readString();
+ _val97 = iprot.readString();
+ struct.parameters.put(_key96, _val97);
}
iprot.readMapEnd();
}
@@ -951,10 +951,10 @@ public class Database implements org.apa
oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size()));
- for (Map.Entry<String, String> _iter90 : struct.parameters.entrySet())
+ for (Map.Entry<String, String> _iter98 : struct.parameters.entrySet())
{
- oprot.writeString(_iter90.getKey());
- oprot.writeString(_iter90.getValue());
+ oprot.writeString(_iter98.getKey());
+ oprot.writeString(_iter98.getValue());
}
oprot.writeMapEnd();
}
@@ -1033,10 +1033,10 @@ public class Database implements org.apa
if (struct.isSetParameters()) {
{
oprot.writeI32(struct.parameters.size());
- for (Map.Entry<String, String> _iter91 : struct.parameters.entrySet())
+ for (Map.Entry<String, String> _iter99 : struct.parameters.entrySet())
{
- oprot.writeString(_iter91.getKey());
- oprot.writeString(_iter91.getValue());
+ oprot.writeString(_iter99.getKey());
+ oprot.writeString(_iter99.getValue());
}
}
}
@@ -1069,15 +1069,15 @@ public class Database implements org.apa
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TMap _map92 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.parameters = new HashMap<String,String>(2*_map92.size);
- for (int _i93 = 0; _i93 < _map92.size; ++_i93)
+ org.apache.thrift.protocol.TMap _map100 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.parameters = new HashMap<String,String>(2*_map100.size);
+ for (int _i101 = 0; _i101 < _map100.size; ++_i101)
{
- String _key94; // required
- String _val95; // required
- _key94 = iprot.readString();
- _val95 = iprot.readString();
- struct.parameters.put(_key94, _val95);
+ String _key102; // required
+ String _val103; // required
+ _key102 = iprot.readString();
+ _val103 = iprot.readString();
+ struct.parameters.put(_key102, _val103);
}
}
struct.setParametersIsSet(true);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/DropPartitionsResult.java Fri Mar 28 23:33:07 2014
@@ -342,14 +342,14 @@ public class DropPartitionsResult implem
case 1: // PARTITIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list338 = iprot.readListBegin();
- struct.partitions = new ArrayList<Partition>(_list338.size);
- for (int _i339 = 0; _i339 < _list338.size; ++_i339)
+ org.apache.thrift.protocol.TList _list346 = iprot.readListBegin();
+ struct.partitions = new ArrayList<Partition>(_list346.size);
+ for (int _i347 = 0; _i347 < _list346.size; ++_i347)
{
- Partition _elem340; // optional
- _elem340 = new Partition();
- _elem340.read(iprot);
- struct.partitions.add(_elem340);
+ Partition _elem348; // optional
+ _elem348 = new Partition();
+ _elem348.read(iprot);
+ struct.partitions.add(_elem348);
}
iprot.readListEnd();
}
@@ -376,9 +376,9 @@ public class DropPartitionsResult implem
oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
- for (Partition _iter341 : struct.partitions)
+ for (Partition _iter349 : struct.partitions)
{
- _iter341.write(oprot);
+ _iter349.write(oprot);
}
oprot.writeListEnd();
}
@@ -410,9 +410,9 @@ public class DropPartitionsResult implem
if (struct.isSetPartitions()) {
{
oprot.writeI32(struct.partitions.size());
- for (Partition _iter342 : struct.partitions)
+ for (Partition _iter350 : struct.partitions)
{
- _iter342.write(oprot);
+ _iter350.write(oprot);
}
}
}
@@ -424,14 +424,14 @@ public class DropPartitionsResult implem
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list343 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.partitions = new ArrayList<Partition>(_list343.size);
- for (int _i344 = 0; _i344 < _list343.size; ++_i344)
+ org.apache.thrift.protocol.TList _list351 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.partitions = new ArrayList<Partition>(_list351.size);
+ for (int _i352 = 0; _i352 < _list351.size; ++_i352)
{
- Partition _elem345; // optional
- _elem345 = new Partition();
- _elem345.read(iprot);
- struct.partitions.add(_elem345);
+ Partition _elem353; // optional
+ _elem353 = new Partition();
+ _elem353.read(iprot);
+ struct.partitions.add(_elem353);
}
}
struct.setPartitionsIsSet(true);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/EnvironmentContext.java Fri Mar 28 23:33:07 2014
@@ -351,15 +351,15 @@ public class EnvironmentContext implemen
case 1: // PROPERTIES
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map254 = iprot.readMapBegin();
- struct.properties = new HashMap<String,String>(2*_map254.size);
- for (int _i255 = 0; _i255 < _map254.size; ++_i255)
+ org.apache.thrift.protocol.TMap _map262 = iprot.readMapBegin();
+ struct.properties = new HashMap<String,String>(2*_map262.size);
+ for (int _i263 = 0; _i263 < _map262.size; ++_i263)
{
- String _key256; // required
- String _val257; // required
- _key256 = iprot.readString();
- _val257 = iprot.readString();
- struct.properties.put(_key256, _val257);
+ String _key264; // required
+ String _val265; // required
+ _key264 = iprot.readString();
+ _val265 = iprot.readString();
+ struct.properties.put(_key264, _val265);
}
iprot.readMapEnd();
}
@@ -385,10 +385,10 @@ public class EnvironmentContext implemen
oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
- for (Map.Entry<String, String> _iter258 : struct.properties.entrySet())
+ for (Map.Entry<String, String> _iter266 : struct.properties.entrySet())
{
- oprot.writeString(_iter258.getKey());
- oprot.writeString(_iter258.getValue());
+ oprot.writeString(_iter266.getKey());
+ oprot.writeString(_iter266.getValue());
}
oprot.writeMapEnd();
}
@@ -419,10 +419,10 @@ public class EnvironmentContext implemen
if (struct.isSetProperties()) {
{
oprot.writeI32(struct.properties.size());
- for (Map.Entry<String, String> _iter259 : struct.properties.entrySet())
+ for (Map.Entry<String, String> _iter267 : struct.properties.entrySet())
{
- oprot.writeString(_iter259.getKey());
- oprot.writeString(_iter259.getValue());
+ oprot.writeString(_iter267.getKey());
+ oprot.writeString(_iter267.getValue());
}
}
}
@@ -434,15 +434,15 @@ public class EnvironmentContext implemen
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TMap _map260 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.properties = new HashMap<String,String>(2*_map260.size);
- for (int _i261 = 0; _i261 < _map260.size; ++_i261)
+ org.apache.thrift.protocol.TMap _map268 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.properties = new HashMap<String,String>(2*_map268.size);
+ for (int _i269 = 0; _i269 < _map268.size; ++_i269)
{
- String _key262; // required
- String _val263; // required
- _key262 = iprot.readString();
- _val263 = iprot.readString();
- struct.properties.put(_key262, _val263);
+ String _key270; // required
+ String _val271; // required
+ _key270 = iprot.readString();
+ _val271 = iprot.readString();
+ struct.properties.put(_key270, _val271);
}
}
struct.setPropertiesIsSet(true);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Function.java Fri Mar 28 23:33:07 2014
@@ -993,14 +993,14 @@ public class Function implements org.apa
case 8: // RESOURCE_URIS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list362 = iprot.readListBegin();
- struct.resourceUris = new ArrayList<ResourceUri>(_list362.size);
- for (int _i363 = 0; _i363 < _list362.size; ++_i363)
+ org.apache.thrift.protocol.TList _list370 = iprot.readListBegin();
+ struct.resourceUris = new ArrayList<ResourceUri>(_list370.size);
+ for (int _i371 = 0; _i371 < _list370.size; ++_i371)
{
- ResourceUri _elem364; // optional
- _elem364 = new ResourceUri();
- _elem364.read(iprot);
- struct.resourceUris.add(_elem364);
+ ResourceUri _elem372; // optional
+ _elem372 = new ResourceUri();
+ _elem372.read(iprot);
+ struct.resourceUris.add(_elem372);
}
iprot.readListEnd();
}
@@ -1059,9 +1059,9 @@ public class Function implements org.apa
oprot.writeFieldBegin(RESOURCE_URIS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.resourceUris.size()));
- for (ResourceUri _iter365 : struct.resourceUris)
+ for (ResourceUri _iter373 : struct.resourceUris)
{
- _iter365.write(oprot);
+ _iter373.write(oprot);
}
oprot.writeListEnd();
}
@@ -1134,9 +1134,9 @@ public class Function implements org.apa
if (struct.isSetResourceUris()) {
{
oprot.writeI32(struct.resourceUris.size());
- for (ResourceUri _iter366 : struct.resourceUris)
+ for (ResourceUri _iter374 : struct.resourceUris)
{
- _iter366.write(oprot);
+ _iter374.write(oprot);
}
}
}
@@ -1176,14 +1176,14 @@ public class Function implements org.apa
}
if (incoming.get(7)) {
{
- org.apache.thrift.protocol.TList _list367 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.resourceUris = new ArrayList<ResourceUri>(_list367.size);
- for (int _i368 = 0; _i368 < _list367.size; ++_i368)
+ org.apache.thrift.protocol.TList _list375 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.resourceUris = new ArrayList<ResourceUri>(_list375.size);
+ for (int _i376 = 0; _i376 < _list375.size; ++_i376)
{
- ResourceUri _elem369; // optional
- _elem369 = new ResourceUri();
- _elem369.read(iprot);
- struct.resourceUris.add(_elem369);
+ ResourceUri _elem377; // optional
+ _elem377 = new ResourceUri();
+ _elem377.read(iprot);
+ struct.resourceUris.add(_elem377);
}
}
struct.setResourceUrisIsSet(true);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsInfoResponse.java Fri Mar 28 23:33:07 2014
@@ -443,14 +443,14 @@ public class GetOpenTxnsInfoResponse imp
case 2: // OPEN_TXNS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list370 = iprot.readListBegin();
- struct.open_txns = new ArrayList<TxnInfo>(_list370.size);
- for (int _i371 = 0; _i371 < _list370.size; ++_i371)
+ org.apache.thrift.protocol.TList _list378 = iprot.readListBegin();
+ struct.open_txns = new ArrayList<TxnInfo>(_list378.size);
+ for (int _i379 = 0; _i379 < _list378.size; ++_i379)
{
- TxnInfo _elem372; // optional
- _elem372 = new TxnInfo();
- _elem372.read(iprot);
- struct.open_txns.add(_elem372);
+ TxnInfo _elem380; // optional
+ _elem380 = new TxnInfo();
+ _elem380.read(iprot);
+ struct.open_txns.add(_elem380);
}
iprot.readListEnd();
}
@@ -479,9 +479,9 @@ public class GetOpenTxnsInfoResponse imp
oprot.writeFieldBegin(OPEN_TXNS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.open_txns.size()));
- for (TxnInfo _iter373 : struct.open_txns)
+ for (TxnInfo _iter381 : struct.open_txns)
{
- _iter373.write(oprot);
+ _iter381.write(oprot);
}
oprot.writeListEnd();
}
@@ -507,9 +507,9 @@ public class GetOpenTxnsInfoResponse imp
oprot.writeI64(struct.txn_high_water_mark);
{
oprot.writeI32(struct.open_txns.size());
- for (TxnInfo _iter374 : struct.open_txns)
+ for (TxnInfo _iter382 : struct.open_txns)
{
- _iter374.write(oprot);
+ _iter382.write(oprot);
}
}
}
@@ -520,14 +520,14 @@ public class GetOpenTxnsInfoResponse imp
struct.txn_high_water_mark = iprot.readI64();
struct.setTxn_high_water_markIsSet(true);
{
- org.apache.thrift.protocol.TList _list375 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.open_txns = new ArrayList<TxnInfo>(_list375.size);
- for (int _i376 = 0; _i376 < _list375.size; ++_i376)
+ org.apache.thrift.protocol.TList _list383 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.open_txns = new ArrayList<TxnInfo>(_list383.size);
+ for (int _i384 = 0; _i384 < _list383.size; ++_i384)
{
- TxnInfo _elem377; // optional
- _elem377 = new TxnInfo();
- _elem377.read(iprot);
- struct.open_txns.add(_elem377);
+ TxnInfo _elem385; // optional
+ _elem385 = new TxnInfo();
+ _elem385.read(iprot);
+ struct.open_txns.add(_elem385);
}
}
struct.setOpen_txnsIsSet(true);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetOpenTxnsResponse.java Fri Mar 28 23:33:07 2014
@@ -443,13 +443,13 @@ public class GetOpenTxnsResponse impleme
case 2: // OPEN_TXNS
if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
{
- org.apache.thrift.protocol.TSet _set378 = iprot.readSetBegin();
- struct.open_txns = new HashSet<Long>(2*_set378.size);
- for (int _i379 = 0; _i379 < _set378.size; ++_i379)
+ org.apache.thrift.protocol.TSet _set386 = iprot.readSetBegin();
+ struct.open_txns = new HashSet<Long>(2*_set386.size);
+ for (int _i387 = 0; _i387 < _set386.size; ++_i387)
{
- long _elem380; // optional
- _elem380 = iprot.readI64();
- struct.open_txns.add(_elem380);
+ long _elem388; // optional
+ _elem388 = iprot.readI64();
+ struct.open_txns.add(_elem388);
}
iprot.readSetEnd();
}
@@ -478,9 +478,9 @@ public class GetOpenTxnsResponse impleme
oprot.writeFieldBegin(OPEN_TXNS_FIELD_DESC);
{
oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, struct.open_txns.size()));
- for (long _iter381 : struct.open_txns)
+ for (long _iter389 : struct.open_txns)
{
- oprot.writeI64(_iter381);
+ oprot.writeI64(_iter389);
}
oprot.writeSetEnd();
}
@@ -506,9 +506,9 @@ public class GetOpenTxnsResponse impleme
oprot.writeI64(struct.txn_high_water_mark);
{
oprot.writeI32(struct.open_txns.size());
- for (long _iter382 : struct.open_txns)
+ for (long _iter390 : struct.open_txns)
{
- oprot.writeI64(_iter382);
+ oprot.writeI64(_iter390);
}
}
}
@@ -519,13 +519,13 @@ public class GetOpenTxnsResponse impleme
struct.txn_high_water_mark = iprot.readI64();
struct.setTxn_high_water_markIsSet(true);
{
- org.apache.thrift.protocol.TSet _set383 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
- struct.open_txns = new HashSet<Long>(2*_set383.size);
- for (int _i384 = 0; _i384 < _set383.size; ++_i384)
+ org.apache.thrift.protocol.TSet _set391 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.open_txns = new HashSet<Long>(2*_set391.size);
+ for (int _i392 = 0; _i392 < _set391.size; ++_i392)
{
- long _elem385; // optional
- _elem385 = iprot.readI64();
- struct.open_txns.add(_elem385);
+ long _elem393; // optional
+ _elem393 = iprot.readI64();
+ struct.open_txns.add(_elem393);
}
}
struct.setOpen_txnsIsSet(true);
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleRequest.java Fri Mar 28 23:33:07 2014
@@ -106,7 +106,7 @@ public class GetPrincipalsInRoleRequest
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetPrincipalsInRoleRequest.class, metaDataMap);
@@ -286,6 +286,10 @@ public class GetPrincipalsInRoleRequest
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ if (!isSetRoleName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString());
+ }
+
// check for sub-struct validity
}
@@ -366,24 +370,14 @@ public class GetPrincipalsInRoleRequest
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetRoleName()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetRoleName()) {
- oprot.writeString(struct.roleName);
- }
+ oprot.writeString(struct.roleName);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleRequest struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
- struct.roleName = iprot.readString();
- struct.setRoleNameIsSet(true);
- }
+ struct.roleName = iprot.readString();
+ struct.setRoleNameIsSet(true);
}
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java?rev=1582911&r1=1582910&r2=1582911&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetPrincipalsInRoleResponse.java Fri Mar 28 23:33:07 2014
@@ -106,7 +106,7 @@ public class GetPrincipalsInRoleResponse
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.PRINCIPAL_GRANTS, new org.apache.thrift.meta_data.FieldMetaData("principalGrants", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.PRINCIPAL_GRANTS, new org.apache.thrift.meta_data.FieldMetaData("principalGrants", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RolePrincipalGrant.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -306,6 +306,10 @@ public class GetPrincipalsInRoleResponse
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ if (!isSetPrincipalGrants()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'principalGrants' is unset! Struct:" + toString());
+ }
+
// check for sub-struct validity
}
@@ -346,14 +350,14 @@ public class GetPrincipalsInRoleResponse
case 1: // PRINCIPAL_GRANTS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list78 = iprot.readListBegin();
- struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list78.size);
- for (int _i79 = 0; _i79 < _list78.size; ++_i79)
+ org.apache.thrift.protocol.TList _list86 = iprot.readListBegin();
+ struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list86.size);
+ for (int _i87 = 0; _i87 < _list86.size; ++_i87)
{
- RolePrincipalGrant _elem80; // optional
- _elem80 = new RolePrincipalGrant();
- _elem80.read(iprot);
- struct.principalGrants.add(_elem80);
+ RolePrincipalGrant _elem88; // optional
+ _elem88 = new RolePrincipalGrant();
+ _elem88.read(iprot);
+ struct.principalGrants.add(_elem88);
}
iprot.readListEnd();
}
@@ -379,9 +383,9 @@ public class GetPrincipalsInRoleResponse
oprot.writeFieldBegin(PRINCIPAL_GRANTS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.principalGrants.size()));
- for (RolePrincipalGrant _iter81 : struct.principalGrants)
+ for (RolePrincipalGrant _iter89 : struct.principalGrants)
{
- _iter81.write(oprot);
+ _iter89.write(oprot);
}
oprot.writeListEnd();
}
@@ -404,18 +408,11 @@ public class GetPrincipalsInRoleResponse
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
- if (struct.isSetPrincipalGrants()) {
- optionals.set(0);
- }
- oprot.writeBitSet(optionals, 1);
- if (struct.isSetPrincipalGrants()) {
+ {
+ oprot.writeI32(struct.principalGrants.size());
+ for (RolePrincipalGrant _iter90 : struct.principalGrants)
{
- oprot.writeI32(struct.principalGrants.size());
- for (RolePrincipalGrant _iter82 : struct.principalGrants)
- {
- _iter82.write(oprot);
- }
+ _iter90.write(oprot);
}
}
}
@@ -423,21 +420,18 @@ public class GetPrincipalsInRoleResponse
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GetPrincipalsInRoleResponse struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
- if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list91.size);
+ for (int _i92 = 0; _i92 < _list91.size; ++_i92)
{
- org.apache.thrift.protocol.TList _list83 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list83.size);
- for (int _i84 = 0; _i84 < _list83.size; ++_i84)
- {
- RolePrincipalGrant _elem85; // optional
- _elem85 = new RolePrincipalGrant();
- _elem85.read(iprot);
- struct.principalGrants.add(_elem85);
- }
+ RolePrincipalGrant _elem93; // optional
+ _elem93 = new RolePrincipalGrant();
+ _elem93.read(iprot);
+ struct.principalGrants.add(_elem93);
}
- struct.setPrincipalGrantsIsSet(true);
}
+ struct.setPrincipalGrantsIsSet(true);
}
}
Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java?rev=1582911&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalRequest.java Fri Mar 28 23:33:07 2014
@@ -0,0 +1,498 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GetRoleGrantsForPrincipalRequest implements org.apache.thrift.TBase<GetRoleGrantsForPrincipalRequest, GetRoleGrantsForPrincipalRequest._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetRoleGrantsForPrincipalRequest");
+
+ private static final org.apache.thrift.protocol.TField PRINCIPAL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_name", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField PRINCIPAL_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("principal_type", org.apache.thrift.protocol.TType.I32, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GetRoleGrantsForPrincipalRequestStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GetRoleGrantsForPrincipalRequestTupleSchemeFactory());
+ }
+
+ private String principal_name; // required
+ private PrincipalType principal_type; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ PRINCIPAL_NAME((short)1, "principal_name"),
+ /**
+ *
+ * @see PrincipalType
+ */
+ PRINCIPAL_TYPE((short)2, "principal_type");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // PRINCIPAL_NAME
+ return PRINCIPAL_NAME;
+ case 2: // PRINCIPAL_TYPE
+ return PRINCIPAL_TYPE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.PRINCIPAL_NAME, new org.apache.thrift.meta_data.FieldMetaData("principal_name", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PRINCIPAL_TYPE, new org.apache.thrift.meta_data.FieldMetaData("principal_type", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PrincipalType.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetRoleGrantsForPrincipalRequest.class, metaDataMap);
+ }
+
+ public GetRoleGrantsForPrincipalRequest() {
+ }
+
+ public GetRoleGrantsForPrincipalRequest(
+ String principal_name,
+ PrincipalType principal_type)
+ {
+ this();
+ this.principal_name = principal_name;
+ this.principal_type = principal_type;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GetRoleGrantsForPrincipalRequest(GetRoleGrantsForPrincipalRequest other) {
+ if (other.isSetPrincipal_name()) {
+ this.principal_name = other.principal_name;
+ }
+ if (other.isSetPrincipal_type()) {
+ this.principal_type = other.principal_type;
+ }
+ }
+
+ public GetRoleGrantsForPrincipalRequest deepCopy() {
+ return new GetRoleGrantsForPrincipalRequest(this);
+ }
+
+ @Override
+ public void clear() {
+ this.principal_name = null;
+ this.principal_type = null;
+ }
+
+ public String getPrincipal_name() {
+ return this.principal_name;
+ }
+
+ public void setPrincipal_name(String principal_name) {
+ this.principal_name = principal_name;
+ }
+
+ public void unsetPrincipal_name() {
+ this.principal_name = null;
+ }
+
+ /** Returns true if field principal_name is set (has been assigned a value) and false otherwise */
+ public boolean isSetPrincipal_name() {
+ return this.principal_name != null;
+ }
+
+ public void setPrincipal_nameIsSet(boolean value) {
+ if (!value) {
+ this.principal_name = null;
+ }
+ }
+
+ /**
+ *
+ * @see PrincipalType
+ */
+ public PrincipalType getPrincipal_type() {
+ return this.principal_type;
+ }
+
+ /**
+ *
+ * @see PrincipalType
+ */
+ public void setPrincipal_type(PrincipalType principal_type) {
+ this.principal_type = principal_type;
+ }
+
+ public void unsetPrincipal_type() {
+ this.principal_type = null;
+ }
+
+ /** Returns true if field principal_type is set (has been assigned a value) and false otherwise */
+ public boolean isSetPrincipal_type() {
+ return this.principal_type != null;
+ }
+
+ public void setPrincipal_typeIsSet(boolean value) {
+ if (!value) {
+ this.principal_type = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PRINCIPAL_NAME:
+ if (value == null) {
+ unsetPrincipal_name();
+ } else {
+ setPrincipal_name((String)value);
+ }
+ break;
+
+ case PRINCIPAL_TYPE:
+ if (value == null) {
+ unsetPrincipal_type();
+ } else {
+ setPrincipal_type((PrincipalType)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PRINCIPAL_NAME:
+ return getPrincipal_name();
+
+ case PRINCIPAL_TYPE:
+ return getPrincipal_type();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case PRINCIPAL_NAME:
+ return isSetPrincipal_name();
+ case PRINCIPAL_TYPE:
+ return isSetPrincipal_type();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GetRoleGrantsForPrincipalRequest)
+ return this.equals((GetRoleGrantsForPrincipalRequest)that);
+ return false;
+ }
+
+ public boolean equals(GetRoleGrantsForPrincipalRequest that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_principal_name = true && this.isSetPrincipal_name();
+ boolean that_present_principal_name = true && that.isSetPrincipal_name();
+ if (this_present_principal_name || that_present_principal_name) {
+ if (!(this_present_principal_name && that_present_principal_name))
+ return false;
+ if (!this.principal_name.equals(that.principal_name))
+ return false;
+ }
+
+ boolean this_present_principal_type = true && this.isSetPrincipal_type();
+ boolean that_present_principal_type = true && that.isSetPrincipal_type();
+ if (this_present_principal_type || that_present_principal_type) {
+ if (!(this_present_principal_type && that_present_principal_type))
+ return false;
+ if (!this.principal_type.equals(that.principal_type))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_principal_name = true && (isSetPrincipal_name());
+ builder.append(present_principal_name);
+ if (present_principal_name)
+ builder.append(principal_name);
+
+ boolean present_principal_type = true && (isSetPrincipal_type());
+ builder.append(present_principal_type);
+ if (present_principal_type)
+ builder.append(principal_type.getValue());
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(GetRoleGrantsForPrincipalRequest other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ GetRoleGrantsForPrincipalRequest typedOther = (GetRoleGrantsForPrincipalRequest)other;
+
+ lastComparison = Boolean.valueOf(isSetPrincipal_name()).compareTo(typedOther.isSetPrincipal_name());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPrincipal_name()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_name, typedOther.principal_name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPrincipal_type()).compareTo(typedOther.isSetPrincipal_type());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPrincipal_type()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principal_type, typedOther.principal_type);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("GetRoleGrantsForPrincipalRequest(");
+ boolean first = true;
+
+ sb.append("principal_name:");
+ if (this.principal_name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.principal_name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("principal_type:");
+ if (this.principal_type == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.principal_type);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetPrincipal_name()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'principal_name' is unset! Struct:" + toString());
+ }
+
+ if (!isSetPrincipal_type()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'principal_type' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class GetRoleGrantsForPrincipalRequestStandardSchemeFactory implements SchemeFactory {
+ public GetRoleGrantsForPrincipalRequestStandardScheme getScheme() {
+ return new GetRoleGrantsForPrincipalRequestStandardScheme();
+ }
+ }
+
+ private static class GetRoleGrantsForPrincipalRequestStandardScheme extends StandardScheme<GetRoleGrantsForPrincipalRequest> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GetRoleGrantsForPrincipalRequest struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // PRINCIPAL_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.principal_name = iprot.readString();
+ struct.setPrincipal_nameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // PRINCIPAL_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.principal_type = PrincipalType.findByValue(iprot.readI32());
+ struct.setPrincipal_typeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, GetRoleGrantsForPrincipalRequest struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.principal_name != null) {
+ oprot.writeFieldBegin(PRINCIPAL_NAME_FIELD_DESC);
+ oprot.writeString(struct.principal_name);
+ oprot.writeFieldEnd();
+ }
+ if (struct.principal_type != null) {
+ oprot.writeFieldBegin(PRINCIPAL_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.principal_type.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GetRoleGrantsForPrincipalRequestTupleSchemeFactory implements SchemeFactory {
+ public GetRoleGrantsForPrincipalRequestTupleScheme getScheme() {
+ return new GetRoleGrantsForPrincipalRequestTupleScheme();
+ }
+ }
+
+ private static class GetRoleGrantsForPrincipalRequestTupleScheme extends TupleScheme<GetRoleGrantsForPrincipalRequest> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.principal_name);
+ oprot.writeI32(struct.principal_type.getValue());
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalRequest struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.principal_name = iprot.readString();
+ struct.setPrincipal_nameIsSet(true);
+ struct.principal_type = PrincipalType.findByValue(iprot.readI32());
+ struct.setPrincipal_typeIsSet(true);
+ }
+ }
+
+}
+
Added: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java?rev=1582911&view=auto
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java (added)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/GetRoleGrantsForPrincipalResponse.java Fri Mar 28 23:33:07 2014
@@ -0,0 +1,439 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hadoop.hive.metastore.api;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GetRoleGrantsForPrincipalResponse implements org.apache.thrift.TBase<GetRoleGrantsForPrincipalResponse, GetRoleGrantsForPrincipalResponse._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetRoleGrantsForPrincipalResponse");
+
+ private static final org.apache.thrift.protocol.TField PRINCIPAL_GRANTS_FIELD_DESC = new org.apache.thrift.protocol.TField("principalGrants", org.apache.thrift.protocol.TType.LIST, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new GetRoleGrantsForPrincipalResponseStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new GetRoleGrantsForPrincipalResponseTupleSchemeFactory());
+ }
+
+ private List<RolePrincipalGrant> principalGrants; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ PRINCIPAL_GRANTS((short)1, "principalGrants");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // PRINCIPAL_GRANTS
+ return PRINCIPAL_GRANTS;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.PRINCIPAL_GRANTS, new org.apache.thrift.meta_data.FieldMetaData("principalGrants", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RolePrincipalGrant.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetRoleGrantsForPrincipalResponse.class, metaDataMap);
+ }
+
+ public GetRoleGrantsForPrincipalResponse() {
+ }
+
+ public GetRoleGrantsForPrincipalResponse(
+ List<RolePrincipalGrant> principalGrants)
+ {
+ this();
+ this.principalGrants = principalGrants;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public GetRoleGrantsForPrincipalResponse(GetRoleGrantsForPrincipalResponse other) {
+ if (other.isSetPrincipalGrants()) {
+ List<RolePrincipalGrant> __this__principalGrants = new ArrayList<RolePrincipalGrant>();
+ for (RolePrincipalGrant other_element : other.principalGrants) {
+ __this__principalGrants.add(new RolePrincipalGrant(other_element));
+ }
+ this.principalGrants = __this__principalGrants;
+ }
+ }
+
+ public GetRoleGrantsForPrincipalResponse deepCopy() {
+ return new GetRoleGrantsForPrincipalResponse(this);
+ }
+
+ @Override
+ public void clear() {
+ this.principalGrants = null;
+ }
+
+ public int getPrincipalGrantsSize() {
+ return (this.principalGrants == null) ? 0 : this.principalGrants.size();
+ }
+
+ public java.util.Iterator<RolePrincipalGrant> getPrincipalGrantsIterator() {
+ return (this.principalGrants == null) ? null : this.principalGrants.iterator();
+ }
+
+ public void addToPrincipalGrants(RolePrincipalGrant elem) {
+ if (this.principalGrants == null) {
+ this.principalGrants = new ArrayList<RolePrincipalGrant>();
+ }
+ this.principalGrants.add(elem);
+ }
+
+ public List<RolePrincipalGrant> getPrincipalGrants() {
+ return this.principalGrants;
+ }
+
+ public void setPrincipalGrants(List<RolePrincipalGrant> principalGrants) {
+ this.principalGrants = principalGrants;
+ }
+
+ public void unsetPrincipalGrants() {
+ this.principalGrants = null;
+ }
+
+ /** Returns true if field principalGrants is set (has been assigned a value) and false otherwise */
+ public boolean isSetPrincipalGrants() {
+ return this.principalGrants != null;
+ }
+
+ public void setPrincipalGrantsIsSet(boolean value) {
+ if (!value) {
+ this.principalGrants = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case PRINCIPAL_GRANTS:
+ if (value == null) {
+ unsetPrincipalGrants();
+ } else {
+ setPrincipalGrants((List<RolePrincipalGrant>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case PRINCIPAL_GRANTS:
+ return getPrincipalGrants();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case PRINCIPAL_GRANTS:
+ return isSetPrincipalGrants();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof GetRoleGrantsForPrincipalResponse)
+ return this.equals((GetRoleGrantsForPrincipalResponse)that);
+ return false;
+ }
+
+ public boolean equals(GetRoleGrantsForPrincipalResponse that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_principalGrants = true && this.isSetPrincipalGrants();
+ boolean that_present_principalGrants = true && that.isSetPrincipalGrants();
+ if (this_present_principalGrants || that_present_principalGrants) {
+ if (!(this_present_principalGrants && that_present_principalGrants))
+ return false;
+ if (!this.principalGrants.equals(that.principalGrants))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_principalGrants = true && (isSetPrincipalGrants());
+ builder.append(present_principalGrants);
+ if (present_principalGrants)
+ builder.append(principalGrants);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(GetRoleGrantsForPrincipalResponse other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ GetRoleGrantsForPrincipalResponse typedOther = (GetRoleGrantsForPrincipalResponse)other;
+
+ lastComparison = Boolean.valueOf(isSetPrincipalGrants()).compareTo(typedOther.isSetPrincipalGrants());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPrincipalGrants()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.principalGrants, typedOther.principalGrants);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("GetRoleGrantsForPrincipalResponse(");
+ boolean first = true;
+
+ sb.append("principalGrants:");
+ if (this.principalGrants == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.principalGrants);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetPrincipalGrants()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'principalGrants' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class GetRoleGrantsForPrincipalResponseStandardSchemeFactory implements SchemeFactory {
+ public GetRoleGrantsForPrincipalResponseStandardScheme getScheme() {
+ return new GetRoleGrantsForPrincipalResponseStandardScheme();
+ }
+ }
+
+ private static class GetRoleGrantsForPrincipalResponseStandardScheme extends StandardScheme<GetRoleGrantsForPrincipalResponse> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GetRoleGrantsForPrincipalResponse struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // PRINCIPAL_GRANTS
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list78 = iprot.readListBegin();
+ struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list78.size);
+ for (int _i79 = 0; _i79 < _list78.size; ++_i79)
+ {
+ RolePrincipalGrant _elem80; // optional
+ _elem80 = new RolePrincipalGrant();
+ _elem80.read(iprot);
+ struct.principalGrants.add(_elem80);
+ }
+ iprot.readListEnd();
+ }
+ struct.setPrincipalGrantsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, GetRoleGrantsForPrincipalResponse struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.principalGrants != null) {
+ oprot.writeFieldBegin(PRINCIPAL_GRANTS_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.principalGrants.size()));
+ for (RolePrincipalGrant _iter81 : struct.principalGrants)
+ {
+ _iter81.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class GetRoleGrantsForPrincipalResponseTupleSchemeFactory implements SchemeFactory {
+ public GetRoleGrantsForPrincipalResponseTupleScheme getScheme() {
+ return new GetRoleGrantsForPrincipalResponseTupleScheme();
+ }
+ }
+
+ private static class GetRoleGrantsForPrincipalResponseTupleScheme extends TupleScheme<GetRoleGrantsForPrincipalResponse> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalResponse struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ {
+ oprot.writeI32(struct.principalGrants.size());
+ for (RolePrincipalGrant _iter82 : struct.principalGrants)
+ {
+ _iter82.write(oprot);
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, GetRoleGrantsForPrincipalResponse struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ {
+ org.apache.thrift.protocol.TList _list83 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.principalGrants = new ArrayList<RolePrincipalGrant>(_list83.size);
+ for (int _i84 = 0; _i84 < _list83.size; ++_i84)
+ {
+ RolePrincipalGrant _elem85; // optional
+ _elem85 = new RolePrincipalGrant();
+ _elem85.read(iprot);
+ struct.principalGrants.add(_elem85);
+ }
+ }
+ struct.setPrincipalGrantsIsSet(true);
+ }
+ }
+
+}
+