You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by sh...@apache.org on 2014/03/14 20:08:55 UTC

[5/6] SENTRY-142: Create database backed ProviderBackend (Brock Noland via Shreepadma Venugopalan)

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/90cdbefd/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleAddGroupsRequest.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleAddGroupsRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleAddGroupsRequest.java
index de4985d..397813f 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleAddGroupsRequest.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleAddGroupsRequest.java
@@ -36,8 +36,8 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
 
   private static final org.apache.thrift.protocol.TField PROTOCOL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("protocol_version", org.apache.thrift.protocol.TType.I32, (short)1);
   private static final org.apache.thrift.protocol.TField REQUESTOR_USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("requestorUserName", org.apache.thrift.protocol.TType.STRING, (short)2);
-  private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)3);
-  private static final org.apache.thrift.protocol.TField REQUESTOR_GROUP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("requestorGroupName", org.apache.thrift.protocol.TType.SET, (short)4);
+  private static final org.apache.thrift.protocol.TField REQUESTOR_GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("requestorGroupNames", org.apache.thrift.protocol.TType.SET, (short)3);
+  private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("groups", org.apache.thrift.protocol.TType.SET, (short)5);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
@@ -48,16 +48,16 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
 
   private int protocol_version; // required
   private String requestorUserName; // required
+  private Set<String> requestorGroupNames; // required
   private String roleName; // required
-  private Set<String> requestorGroupName; // required
   private Set<TSentryGroup> groups; // 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 {
     PROTOCOL_VERSION((short)1, "protocol_version"),
     REQUESTOR_USER_NAME((short)2, "requestorUserName"),
-    ROLE_NAME((short)3, "roleName"),
-    REQUESTOR_GROUP_NAME((short)4, "requestorGroupName"),
+    REQUESTOR_GROUP_NAMES((short)3, "requestorGroupNames"),
+    ROLE_NAME((short)4, "roleName"),
     GROUPS((short)5, "groups");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -77,10 +77,10 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
           return PROTOCOL_VERSION;
         case 2: // REQUESTOR_USER_NAME
           return REQUESTOR_USER_NAME;
-        case 3: // ROLE_NAME
+        case 3: // REQUESTOR_GROUP_NAMES
+          return REQUESTOR_GROUP_NAMES;
+        case 4: // ROLE_NAME
           return ROLE_NAME;
-        case 4: // REQUESTOR_GROUP_NAME
-          return REQUESTOR_GROUP_NAME;
         case 5: // GROUPS
           return GROUPS;
         default:
@@ -132,11 +132,11 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
     tmpMap.put(_Fields.REQUESTOR_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("requestorUserName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    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)));
-    tmpMap.put(_Fields.REQUESTOR_GROUP_NAME, new org.apache.thrift.meta_data.FieldMetaData("requestorGroupName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.REQUESTOR_GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("requestorGroupNames", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+    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)));
     tmpMap.put(_Fields.GROUPS, new org.apache.thrift.meta_data.FieldMetaData("groups", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryGroup.class))));
@@ -152,16 +152,16 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
   public TAlterSentryRoleAddGroupsRequest(
     int protocol_version,
     String requestorUserName,
+    Set<String> requestorGroupNames,
     String roleName,
-    Set<String> requestorGroupName,
     Set<TSentryGroup> groups)
   {
     this();
     this.protocol_version = protocol_version;
     setProtocol_versionIsSet(true);
     this.requestorUserName = requestorUserName;
+    this.requestorGroupNames = requestorGroupNames;
     this.roleName = roleName;
-    this.requestorGroupName = requestorGroupName;
     this.groups = groups;
   }
 
@@ -174,16 +174,16 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
     if (other.isSetRequestorUserName()) {
       this.requestorUserName = other.requestorUserName;
     }
+    if (other.isSetRequestorGroupNames()) {
+      Set<String> __this__requestorGroupNames = new HashSet<String>();
+      for (String other_element : other.requestorGroupNames) {
+        __this__requestorGroupNames.add(other_element);
+      }
+      this.requestorGroupNames = __this__requestorGroupNames;
+    }
     if (other.isSetRoleName()) {
       this.roleName = other.roleName;
     }
-    if (other.isSetRequestorGroupName()) {
-      Set<String> __this__requestorGroupName = new HashSet<String>();
-      for (String other_element : other.requestorGroupName) {
-        __this__requestorGroupName.add(other_element);
-      }
-      this.requestorGroupName = __this__requestorGroupName;
-    }
     if (other.isSetGroups()) {
       Set<TSentryGroup> __this__groups = new HashSet<TSentryGroup>();
       for (TSentryGroup other_element : other.groups) {
@@ -202,8 +202,8 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
     this.protocol_version = 1;
 
     this.requestorUserName = null;
+    this.requestorGroupNames = null;
     this.roleName = null;
-    this.requestorGroupName = null;
     this.groups = null;
   }
 
@@ -252,64 +252,64 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
     }
   }
 
-  public String getRoleName() {
-    return this.roleName;
+  public int getRequestorGroupNamesSize() {
+    return (this.requestorGroupNames == null) ? 0 : this.requestorGroupNames.size();
   }
 
-  public void setRoleName(String roleName) {
-    this.roleName = roleName;
+  public java.util.Iterator<String> getRequestorGroupNamesIterator() {
+    return (this.requestorGroupNames == null) ? null : this.requestorGroupNames.iterator();
   }
 
-  public void unsetRoleName() {
-    this.roleName = null;
+  public void addToRequestorGroupNames(String elem) {
+    if (this.requestorGroupNames == null) {
+      this.requestorGroupNames = new HashSet<String>();
+    }
+    this.requestorGroupNames.add(elem);
   }
 
-  /** Returns true if field roleName is set (has been assigned a value) and false otherwise */
-  public boolean isSetRoleName() {
-    return this.roleName != null;
+  public Set<String> getRequestorGroupNames() {
+    return this.requestorGroupNames;
   }
 
-  public void setRoleNameIsSet(boolean value) {
-    if (!value) {
-      this.roleName = null;
-    }
+  public void setRequestorGroupNames(Set<String> requestorGroupNames) {
+    this.requestorGroupNames = requestorGroupNames;
   }
 
-  public int getRequestorGroupNameSize() {
-    return (this.requestorGroupName == null) ? 0 : this.requestorGroupName.size();
+  public void unsetRequestorGroupNames() {
+    this.requestorGroupNames = null;
   }
 
-  public java.util.Iterator<String> getRequestorGroupNameIterator() {
-    return (this.requestorGroupName == null) ? null : this.requestorGroupName.iterator();
+  /** Returns true if field requestorGroupNames is set (has been assigned a value) and false otherwise */
+  public boolean isSetRequestorGroupNames() {
+    return this.requestorGroupNames != null;
   }
 
-  public void addToRequestorGroupName(String elem) {
-    if (this.requestorGroupName == null) {
-      this.requestorGroupName = new HashSet<String>();
+  public void setRequestorGroupNamesIsSet(boolean value) {
+    if (!value) {
+      this.requestorGroupNames = null;
     }
-    this.requestorGroupName.add(elem);
   }
 
-  public Set<String> getRequestorGroupName() {
-    return this.requestorGroupName;
+  public String getRoleName() {
+    return this.roleName;
   }
 
-  public void setRequestorGroupName(Set<String> requestorGroupName) {
-    this.requestorGroupName = requestorGroupName;
+  public void setRoleName(String roleName) {
+    this.roleName = roleName;
   }
 
-  public void unsetRequestorGroupName() {
-    this.requestorGroupName = null;
+  public void unsetRoleName() {
+    this.roleName = null;
   }
 
-  /** Returns true if field requestorGroupName is set (has been assigned a value) and false otherwise */
-  public boolean isSetRequestorGroupName() {
-    return this.requestorGroupName != null;
+  /** Returns true if field roleName is set (has been assigned a value) and false otherwise */
+  public boolean isSetRoleName() {
+    return this.roleName != null;
   }
 
-  public void setRequestorGroupNameIsSet(boolean value) {
+  public void setRoleNameIsSet(boolean value) {
     if (!value) {
-      this.requestorGroupName = null;
+      this.roleName = null;
     }
   }
 
@@ -369,19 +369,19 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
       }
       break;
 
-    case ROLE_NAME:
+    case REQUESTOR_GROUP_NAMES:
       if (value == null) {
-        unsetRoleName();
+        unsetRequestorGroupNames();
       } else {
-        setRoleName((String)value);
+        setRequestorGroupNames((Set<String>)value);
       }
       break;
 
-    case REQUESTOR_GROUP_NAME:
+    case ROLE_NAME:
       if (value == null) {
-        unsetRequestorGroupName();
+        unsetRoleName();
       } else {
-        setRequestorGroupName((Set<String>)value);
+        setRoleName((String)value);
       }
       break;
 
@@ -404,12 +404,12 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
     case REQUESTOR_USER_NAME:
       return getRequestorUserName();
 
+    case REQUESTOR_GROUP_NAMES:
+      return getRequestorGroupNames();
+
     case ROLE_NAME:
       return getRoleName();
 
-    case REQUESTOR_GROUP_NAME:
-      return getRequestorGroupName();
-
     case GROUPS:
       return getGroups();
 
@@ -428,10 +428,10 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
       return isSetProtocol_version();
     case REQUESTOR_USER_NAME:
       return isSetRequestorUserName();
+    case REQUESTOR_GROUP_NAMES:
+      return isSetRequestorGroupNames();
     case ROLE_NAME:
       return isSetRoleName();
-    case REQUESTOR_GROUP_NAME:
-      return isSetRequestorGroupName();
     case GROUPS:
       return isSetGroups();
     }
@@ -469,6 +469,15 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
         return false;
     }
 
+    boolean this_present_requestorGroupNames = true && this.isSetRequestorGroupNames();
+    boolean that_present_requestorGroupNames = true && that.isSetRequestorGroupNames();
+    if (this_present_requestorGroupNames || that_present_requestorGroupNames) {
+      if (!(this_present_requestorGroupNames && that_present_requestorGroupNames))
+        return false;
+      if (!this.requestorGroupNames.equals(that.requestorGroupNames))
+        return false;
+    }
+
     boolean this_present_roleName = true && this.isSetRoleName();
     boolean that_present_roleName = true && that.isSetRoleName();
     if (this_present_roleName || that_present_roleName) {
@@ -478,15 +487,6 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
         return false;
     }
 
-    boolean this_present_requestorGroupName = true && this.isSetRequestorGroupName();
-    boolean that_present_requestorGroupName = true && that.isSetRequestorGroupName();
-    if (this_present_requestorGroupName || that_present_requestorGroupName) {
-      if (!(this_present_requestorGroupName && that_present_requestorGroupName))
-        return false;
-      if (!this.requestorGroupName.equals(that.requestorGroupName))
-        return false;
-    }
-
     boolean this_present_groups = true && this.isSetGroups();
     boolean that_present_groups = true && that.isSetGroups();
     if (this_present_groups || that_present_groups) {
@@ -513,16 +513,16 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
     if (present_requestorUserName)
       builder.append(requestorUserName);
 
+    boolean present_requestorGroupNames = true && (isSetRequestorGroupNames());
+    builder.append(present_requestorGroupNames);
+    if (present_requestorGroupNames)
+      builder.append(requestorGroupNames);
+
     boolean present_roleName = true && (isSetRoleName());
     builder.append(present_roleName);
     if (present_roleName)
       builder.append(roleName);
 
-    boolean present_requestorGroupName = true && (isSetRequestorGroupName());
-    builder.append(present_requestorGroupName);
-    if (present_requestorGroupName)
-      builder.append(requestorGroupName);
-
     boolean present_groups = true && (isSetGroups());
     builder.append(present_groups);
     if (present_groups)
@@ -559,22 +559,22 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(typedOther.isSetRoleName());
+    lastComparison = Boolean.valueOf(isSetRequestorGroupNames()).compareTo(typedOther.isSetRequestorGroupNames());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetRoleName()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, typedOther.roleName);
+    if (isSetRequestorGroupNames()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestorGroupNames, typedOther.requestorGroupNames);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetRequestorGroupName()).compareTo(typedOther.isSetRequestorGroupName());
+    lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(typedOther.isSetRoleName());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetRequestorGroupName()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestorGroupName, typedOther.requestorGroupName);
+    if (isSetRoleName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, typedOther.roleName);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -621,19 +621,19 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
     }
     first = false;
     if (!first) sb.append(", ");
-    sb.append("roleName:");
-    if (this.roleName == null) {
+    sb.append("requestorGroupNames:");
+    if (this.requestorGroupNames == null) {
       sb.append("null");
     } else {
-      sb.append(this.roleName);
+      sb.append(this.requestorGroupNames);
     }
     first = false;
     if (!first) sb.append(", ");
-    sb.append("requestorGroupName:");
-    if (this.requestorGroupName == null) {
+    sb.append("roleName:");
+    if (this.roleName == null) {
       sb.append("null");
     } else {
-      sb.append(this.requestorGroupName);
+      sb.append(this.roleName);
     }
     first = false;
     if (!first) sb.append(", ");
@@ -658,12 +658,12 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' is unset! Struct:" + toString());
     }
 
-    if (!isSetRoleName()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString());
+    if (!isSetRequestorGroupNames()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorGroupNames' is unset! Struct:" + toString());
     }
 
-    if (!isSetRequestorGroupName()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorGroupName' is unset! Struct:" + toString());
+    if (!isSetRoleName()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString());
     }
 
     if (!isSetGroups()) {
@@ -725,28 +725,28 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // ROLE_NAME
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.roleName = iprot.readString();
-              struct.setRoleNameIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // REQUESTOR_GROUP_NAME
+          case 3: // REQUESTOR_GROUP_NAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set40 = iprot.readSetBegin();
-                struct.requestorGroupName = new HashSet<String>(2*_set40.size);
-                for (int _i41 = 0; _i41 < _set40.size; ++_i41)
+                org.apache.thrift.protocol.TSet _set32 = iprot.readSetBegin();
+                struct.requestorGroupNames = new HashSet<String>(2*_set32.size);
+                for (int _i33 = 0; _i33 < _set32.size; ++_i33)
                 {
-                  String _elem42; // required
-                  _elem42 = iprot.readString();
-                  struct.requestorGroupName.add(_elem42);
+                  String _elem34; // required
+                  _elem34 = iprot.readString();
+                  struct.requestorGroupNames.add(_elem34);
                 }
                 iprot.readSetEnd();
               }
-              struct.setRequestorGroupNameIsSet(true);
+              struct.setRequestorGroupNamesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // ROLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.roleName = iprot.readString();
+              struct.setRoleNameIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -754,14 +754,14 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
           case 5: // GROUPS
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set43 = iprot.readSetBegin();
-                struct.groups = new HashSet<TSentryGroup>(2*_set43.size);
-                for (int _i44 = 0; _i44 < _set43.size; ++_i44)
+                org.apache.thrift.protocol.TSet _set35 = iprot.readSetBegin();
+                struct.groups = new HashSet<TSentryGroup>(2*_set35.size);
+                for (int _i36 = 0; _i36 < _set35.size; ++_i36)
                 {
-                  TSentryGroup _elem45; // required
-                  _elem45 = new TSentryGroup();
-                  _elem45.read(iprot);
-                  struct.groups.add(_elem45);
+                  TSentryGroup _elem37; // required
+                  _elem37 = new TSentryGroup();
+                  _elem37.read(iprot);
+                  struct.groups.add(_elem37);
                 }
                 iprot.readSetEnd();
               }
@@ -791,30 +791,30 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
         oprot.writeString(struct.requestorUserName);
         oprot.writeFieldEnd();
       }
-      if (struct.roleName != null) {
-        oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
-        oprot.writeString(struct.roleName);
-        oprot.writeFieldEnd();
-      }
-      if (struct.requestorGroupName != null) {
-        oprot.writeFieldBegin(REQUESTOR_GROUP_NAME_FIELD_DESC);
+      if (struct.requestorGroupNames != null) {
+        oprot.writeFieldBegin(REQUESTOR_GROUP_NAMES_FIELD_DESC);
         {
-          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.requestorGroupName.size()));
-          for (String _iter46 : struct.requestorGroupName)
+          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.requestorGroupNames.size()));
+          for (String _iter38 : struct.requestorGroupNames)
           {
-            oprot.writeString(_iter46);
+            oprot.writeString(_iter38);
           }
           oprot.writeSetEnd();
         }
         oprot.writeFieldEnd();
       }
+      if (struct.roleName != null) {
+        oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.roleName);
+        oprot.writeFieldEnd();
+      }
       if (struct.groups != null) {
         oprot.writeFieldBegin(GROUPS_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.groups.size()));
-          for (TSentryGroup _iter47 : struct.groups)
+          for (TSentryGroup _iter39 : struct.groups)
           {
-            _iter47.write(oprot);
+            _iter39.write(oprot);
           }
           oprot.writeSetEnd();
         }
@@ -839,19 +839,19 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeI32(struct.protocol_version);
       oprot.writeString(struct.requestorUserName);
-      oprot.writeString(struct.roleName);
       {
-        oprot.writeI32(struct.requestorGroupName.size());
-        for (String _iter48 : struct.requestorGroupName)
+        oprot.writeI32(struct.requestorGroupNames.size());
+        for (String _iter40 : struct.requestorGroupNames)
         {
-          oprot.writeString(_iter48);
+          oprot.writeString(_iter40);
         }
       }
+      oprot.writeString(struct.roleName);
       {
         oprot.writeI32(struct.groups.size());
-        for (TSentryGroup _iter49 : struct.groups)
+        for (TSentryGroup _iter41 : struct.groups)
         {
-          _iter49.write(oprot);
+          _iter41.write(oprot);
         }
       }
     }
@@ -863,28 +863,28 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
       struct.setProtocol_versionIsSet(true);
       struct.requestorUserName = iprot.readString();
       struct.setRequestorUserNameIsSet(true);
-      struct.roleName = iprot.readString();
-      struct.setRoleNameIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set50 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.requestorGroupName = new HashSet<String>(2*_set50.size);
-        for (int _i51 = 0; _i51 < _set50.size; ++_i51)
+        org.apache.thrift.protocol.TSet _set42 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.requestorGroupNames = new HashSet<String>(2*_set42.size);
+        for (int _i43 = 0; _i43 < _set42.size; ++_i43)
         {
-          String _elem52; // required
-          _elem52 = iprot.readString();
-          struct.requestorGroupName.add(_elem52);
+          String _elem44; // required
+          _elem44 = iprot.readString();
+          struct.requestorGroupNames.add(_elem44);
         }
       }
-      struct.setRequestorGroupNameIsSet(true);
+      struct.setRequestorGroupNamesIsSet(true);
+      struct.roleName = iprot.readString();
+      struct.setRoleNameIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set53 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.groups = new HashSet<TSentryGroup>(2*_set53.size);
-        for (int _i54 = 0; _i54 < _set53.size; ++_i54)
+        org.apache.thrift.protocol.TSet _set45 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.groups = new HashSet<TSentryGroup>(2*_set45.size);
+        for (int _i46 = 0; _i46 < _set45.size; ++_i46)
         {
-          TSentryGroup _elem55; // required
-          _elem55 = new TSentryGroup();
-          _elem55.read(iprot);
-          struct.groups.add(_elem55);
+          TSentryGroup _elem47; // required
+          _elem47 = new TSentryGroup();
+          _elem47.read(iprot);
+          struct.groups.add(_elem47);
         }
       }
       struct.setGroupsIsSet(true);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/90cdbefd/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleDeleteGroupsRequest.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleDeleteGroupsRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleDeleteGroupsRequest.java
index acfa5f5..b73d25c 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleDeleteGroupsRequest.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleDeleteGroupsRequest.java
@@ -36,7 +36,9 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
 
   private static final org.apache.thrift.protocol.TField PROTOCOL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("protocol_version", org.apache.thrift.protocol.TType.I32, (short)1);
   private static final org.apache.thrift.protocol.TField REQUESTOR_USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("requestorUserName", org.apache.thrift.protocol.TType.STRING, (short)2);
-  private static final org.apache.thrift.protocol.TField REQUESTOR_GROUP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("requestorGroupName", org.apache.thrift.protocol.TType.SET, (short)3);
+  private static final org.apache.thrift.protocol.TField REQUESTOR_GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("requestorGroupNames", org.apache.thrift.protocol.TType.SET, (short)3);
+  private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField GROUPS_FIELD_DESC = new org.apache.thrift.protocol.TField("groups", org.apache.thrift.protocol.TType.SET, (short)5);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -46,13 +48,17 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
 
   private int protocol_version; // required
   private String requestorUserName; // required
-  private Set<String> requestorGroupName; // required
+  private Set<String> requestorGroupNames; // required
+  private String roleName; // required
+  private Set<TSentryGroup> groups; // 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 {
     PROTOCOL_VERSION((short)1, "protocol_version"),
     REQUESTOR_USER_NAME((short)2, "requestorUserName"),
-    REQUESTOR_GROUP_NAME((short)3, "requestorGroupName");
+    REQUESTOR_GROUP_NAMES((short)3, "requestorGroupNames"),
+    ROLE_NAME((short)4, "roleName"),
+    GROUPS((short)5, "groups");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -71,8 +77,12 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
           return PROTOCOL_VERSION;
         case 2: // REQUESTOR_USER_NAME
           return REQUESTOR_USER_NAME;
-        case 3: // REQUESTOR_GROUP_NAME
-          return REQUESTOR_GROUP_NAME;
+        case 3: // REQUESTOR_GROUP_NAMES
+          return REQUESTOR_GROUP_NAMES;
+        case 4: // ROLE_NAME
+          return ROLE_NAME;
+        case 5: // GROUPS
+          return GROUPS;
         default:
           return null;
       }
@@ -122,9 +132,14 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
     tmpMap.put(_Fields.REQUESTOR_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("requestorUserName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.REQUESTOR_GROUP_NAME, new org.apache.thrift.meta_data.FieldMetaData("requestorGroupName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.REQUESTOR_GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("requestorGroupNames", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+    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)));
+    tmpMap.put(_Fields.GROUPS, new org.apache.thrift.meta_data.FieldMetaData("groups", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryGroup.class))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TAlterSentryRoleDeleteGroupsRequest.class, metaDataMap);
   }
@@ -137,13 +152,17 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
   public TAlterSentryRoleDeleteGroupsRequest(
     int protocol_version,
     String requestorUserName,
-    Set<String> requestorGroupName)
+    Set<String> requestorGroupNames,
+    String roleName,
+    Set<TSentryGroup> groups)
   {
     this();
     this.protocol_version = protocol_version;
     setProtocol_versionIsSet(true);
     this.requestorUserName = requestorUserName;
-    this.requestorGroupName = requestorGroupName;
+    this.requestorGroupNames = requestorGroupNames;
+    this.roleName = roleName;
+    this.groups = groups;
   }
 
   /**
@@ -155,12 +174,22 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     if (other.isSetRequestorUserName()) {
       this.requestorUserName = other.requestorUserName;
     }
-    if (other.isSetRequestorGroupName()) {
-      Set<String> __this__requestorGroupName = new HashSet<String>();
-      for (String other_element : other.requestorGroupName) {
-        __this__requestorGroupName.add(other_element);
+    if (other.isSetRequestorGroupNames()) {
+      Set<String> __this__requestorGroupNames = new HashSet<String>();
+      for (String other_element : other.requestorGroupNames) {
+        __this__requestorGroupNames.add(other_element);
+      }
+      this.requestorGroupNames = __this__requestorGroupNames;
+    }
+    if (other.isSetRoleName()) {
+      this.roleName = other.roleName;
+    }
+    if (other.isSetGroups()) {
+      Set<TSentryGroup> __this__groups = new HashSet<TSentryGroup>();
+      for (TSentryGroup other_element : other.groups) {
+        __this__groups.add(new TSentryGroup(other_element));
       }
-      this.requestorGroupName = __this__requestorGroupName;
+      this.groups = __this__groups;
     }
   }
 
@@ -173,7 +202,9 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     this.protocol_version = 1;
 
     this.requestorUserName = null;
-    this.requestorGroupName = null;
+    this.requestorGroupNames = null;
+    this.roleName = null;
+    this.groups = null;
   }
 
   public int getProtocol_version() {
@@ -221,41 +252,102 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     }
   }
 
-  public int getRequestorGroupNameSize() {
-    return (this.requestorGroupName == null) ? 0 : this.requestorGroupName.size();
+  public int getRequestorGroupNamesSize() {
+    return (this.requestorGroupNames == null) ? 0 : this.requestorGroupNames.size();
+  }
+
+  public java.util.Iterator<String> getRequestorGroupNamesIterator() {
+    return (this.requestorGroupNames == null) ? null : this.requestorGroupNames.iterator();
+  }
+
+  public void addToRequestorGroupNames(String elem) {
+    if (this.requestorGroupNames == null) {
+      this.requestorGroupNames = new HashSet<String>();
+    }
+    this.requestorGroupNames.add(elem);
+  }
+
+  public Set<String> getRequestorGroupNames() {
+    return this.requestorGroupNames;
+  }
+
+  public void setRequestorGroupNames(Set<String> requestorGroupNames) {
+    this.requestorGroupNames = requestorGroupNames;
+  }
+
+  public void unsetRequestorGroupNames() {
+    this.requestorGroupNames = null;
   }
 
-  public java.util.Iterator<String> getRequestorGroupNameIterator() {
-    return (this.requestorGroupName == null) ? null : this.requestorGroupName.iterator();
+  /** Returns true if field requestorGroupNames is set (has been assigned a value) and false otherwise */
+  public boolean isSetRequestorGroupNames() {
+    return this.requestorGroupNames != null;
   }
 
-  public void addToRequestorGroupName(String elem) {
-    if (this.requestorGroupName == null) {
-      this.requestorGroupName = new HashSet<String>();
+  public void setRequestorGroupNamesIsSet(boolean value) {
+    if (!value) {
+      this.requestorGroupNames = null;
     }
-    this.requestorGroupName.add(elem);
   }
 
-  public Set<String> getRequestorGroupName() {
-    return this.requestorGroupName;
+  public String getRoleName() {
+    return this.roleName;
   }
 
-  public void setRequestorGroupName(Set<String> requestorGroupName) {
-    this.requestorGroupName = requestorGroupName;
+  public void setRoleName(String roleName) {
+    this.roleName = roleName;
   }
 
-  public void unsetRequestorGroupName() {
-    this.requestorGroupName = null;
+  public void unsetRoleName() {
+    this.roleName = null;
   }
 
-  /** Returns true if field requestorGroupName is set (has been assigned a value) and false otherwise */
-  public boolean isSetRequestorGroupName() {
-    return this.requestorGroupName != null;
+  /** Returns true if field roleName is set (has been assigned a value) and false otherwise */
+  public boolean isSetRoleName() {
+    return this.roleName != null;
   }
 
-  public void setRequestorGroupNameIsSet(boolean value) {
+  public void setRoleNameIsSet(boolean value) {
     if (!value) {
-      this.requestorGroupName = null;
+      this.roleName = null;
+    }
+  }
+
+  public int getGroupsSize() {
+    return (this.groups == null) ? 0 : this.groups.size();
+  }
+
+  public java.util.Iterator<TSentryGroup> getGroupsIterator() {
+    return (this.groups == null) ? null : this.groups.iterator();
+  }
+
+  public void addToGroups(TSentryGroup elem) {
+    if (this.groups == null) {
+      this.groups = new HashSet<TSentryGroup>();
+    }
+    this.groups.add(elem);
+  }
+
+  public Set<TSentryGroup> getGroups() {
+    return this.groups;
+  }
+
+  public void setGroups(Set<TSentryGroup> groups) {
+    this.groups = groups;
+  }
+
+  public void unsetGroups() {
+    this.groups = null;
+  }
+
+  /** Returns true if field groups is set (has been assigned a value) and false otherwise */
+  public boolean isSetGroups() {
+    return this.groups != null;
+  }
+
+  public void setGroupsIsSet(boolean value) {
+    if (!value) {
+      this.groups = null;
     }
   }
 
@@ -277,11 +369,27 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
       }
       break;
 
-    case REQUESTOR_GROUP_NAME:
+    case REQUESTOR_GROUP_NAMES:
       if (value == null) {
-        unsetRequestorGroupName();
+        unsetRequestorGroupNames();
       } else {
-        setRequestorGroupName((Set<String>)value);
+        setRequestorGroupNames((Set<String>)value);
+      }
+      break;
+
+    case ROLE_NAME:
+      if (value == null) {
+        unsetRoleName();
+      } else {
+        setRoleName((String)value);
+      }
+      break;
+
+    case GROUPS:
+      if (value == null) {
+        unsetGroups();
+      } else {
+        setGroups((Set<TSentryGroup>)value);
       }
       break;
 
@@ -296,8 +404,14 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     case REQUESTOR_USER_NAME:
       return getRequestorUserName();
 
-    case REQUESTOR_GROUP_NAME:
-      return getRequestorGroupName();
+    case REQUESTOR_GROUP_NAMES:
+      return getRequestorGroupNames();
+
+    case ROLE_NAME:
+      return getRoleName();
+
+    case GROUPS:
+      return getGroups();
 
     }
     throw new IllegalStateException();
@@ -314,8 +428,12 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
       return isSetProtocol_version();
     case REQUESTOR_USER_NAME:
       return isSetRequestorUserName();
-    case REQUESTOR_GROUP_NAME:
-      return isSetRequestorGroupName();
+    case REQUESTOR_GROUP_NAMES:
+      return isSetRequestorGroupNames();
+    case ROLE_NAME:
+      return isSetRoleName();
+    case GROUPS:
+      return isSetGroups();
     }
     throw new IllegalStateException();
   }
@@ -351,12 +469,30 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
         return false;
     }
 
-    boolean this_present_requestorGroupName = true && this.isSetRequestorGroupName();
-    boolean that_present_requestorGroupName = true && that.isSetRequestorGroupName();
-    if (this_present_requestorGroupName || that_present_requestorGroupName) {
-      if (!(this_present_requestorGroupName && that_present_requestorGroupName))
+    boolean this_present_requestorGroupNames = true && this.isSetRequestorGroupNames();
+    boolean that_present_requestorGroupNames = true && that.isSetRequestorGroupNames();
+    if (this_present_requestorGroupNames || that_present_requestorGroupNames) {
+      if (!(this_present_requestorGroupNames && that_present_requestorGroupNames))
+        return false;
+      if (!this.requestorGroupNames.equals(that.requestorGroupNames))
+        return false;
+    }
+
+    boolean this_present_roleName = true && this.isSetRoleName();
+    boolean that_present_roleName = true && that.isSetRoleName();
+    if (this_present_roleName || that_present_roleName) {
+      if (!(this_present_roleName && that_present_roleName))
         return false;
-      if (!this.requestorGroupName.equals(that.requestorGroupName))
+      if (!this.roleName.equals(that.roleName))
+        return false;
+    }
+
+    boolean this_present_groups = true && this.isSetGroups();
+    boolean that_present_groups = true && that.isSetGroups();
+    if (this_present_groups || that_present_groups) {
+      if (!(this_present_groups && that_present_groups))
+        return false;
+      if (!this.groups.equals(that.groups))
         return false;
     }
 
@@ -377,10 +513,20 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     if (present_requestorUserName)
       builder.append(requestorUserName);
 
-    boolean present_requestorGroupName = true && (isSetRequestorGroupName());
-    builder.append(present_requestorGroupName);
-    if (present_requestorGroupName)
-      builder.append(requestorGroupName);
+    boolean present_requestorGroupNames = true && (isSetRequestorGroupNames());
+    builder.append(present_requestorGroupNames);
+    if (present_requestorGroupNames)
+      builder.append(requestorGroupNames);
+
+    boolean present_roleName = true && (isSetRoleName());
+    builder.append(present_roleName);
+    if (present_roleName)
+      builder.append(roleName);
+
+    boolean present_groups = true && (isSetGroups());
+    builder.append(present_groups);
+    if (present_groups)
+      builder.append(groups);
 
     return builder.toHashCode();
   }
@@ -413,12 +559,32 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetRequestorGroupName()).compareTo(typedOther.isSetRequestorGroupName());
+    lastComparison = Boolean.valueOf(isSetRequestorGroupNames()).compareTo(typedOther.isSetRequestorGroupNames());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetRequestorGroupNames()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestorGroupNames, typedOther.requestorGroupNames);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(typedOther.isSetRoleName());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetRequestorGroupName()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestorGroupName, typedOther.requestorGroupName);
+    if (isSetRoleName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, typedOther.roleName);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetGroups()).compareTo(typedOther.isSetGroups());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetGroups()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groups, typedOther.groups);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -455,11 +621,27 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     }
     first = false;
     if (!first) sb.append(", ");
-    sb.append("requestorGroupName:");
-    if (this.requestorGroupName == null) {
+    sb.append("requestorGroupNames:");
+    if (this.requestorGroupNames == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.requestorGroupNames);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("roleName:");
+    if (this.roleName == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.roleName);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("groups:");
+    if (this.groups == null) {
       sb.append("null");
     } else {
-      sb.append(this.requestorGroupName);
+      sb.append(this.groups);
     }
     first = false;
     sb.append(")");
@@ -476,8 +658,16 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' is unset! Struct:" + toString());
     }
 
-    if (!isSetRequestorGroupName()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorGroupName' is unset! Struct:" + toString());
+    if (!isSetRequestorGroupNames()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorGroupNames' is unset! Struct:" + toString());
+    }
+
+    if (!isSetRoleName()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString());
+    }
+
+    if (!isSetGroups()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'groups' is unset! Struct:" + toString());
     }
 
     // check for sub-struct validity
@@ -535,20 +725,47 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // REQUESTOR_GROUP_NAME
+          case 3: // REQUESTOR_GROUP_NAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set56 = iprot.readSetBegin();
-                struct.requestorGroupName = new HashSet<String>(2*_set56.size);
-                for (int _i57 = 0; _i57 < _set56.size; ++_i57)
+                org.apache.thrift.protocol.TSet _set48 = iprot.readSetBegin();
+                struct.requestorGroupNames = new HashSet<String>(2*_set48.size);
+                for (int _i49 = 0; _i49 < _set48.size; ++_i49)
                 {
-                  String _elem58; // required
-                  _elem58 = iprot.readString();
-                  struct.requestorGroupName.add(_elem58);
+                  String _elem50; // required
+                  _elem50 = iprot.readString();
+                  struct.requestorGroupNames.add(_elem50);
                 }
                 iprot.readSetEnd();
               }
-              struct.setRequestorGroupNameIsSet(true);
+              struct.setRequestorGroupNamesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // ROLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.roleName = iprot.readString();
+              struct.setRoleNameIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // GROUPS
+            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+              {
+                org.apache.thrift.protocol.TSet _set51 = iprot.readSetBegin();
+                struct.groups = new HashSet<TSentryGroup>(2*_set51.size);
+                for (int _i52 = 0; _i52 < _set51.size; ++_i52)
+                {
+                  TSentryGroup _elem53; // required
+                  _elem53 = new TSentryGroup();
+                  _elem53.read(iprot);
+                  struct.groups.add(_elem53);
+                }
+                iprot.readSetEnd();
+              }
+              struct.setGroupsIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -574,13 +791,30 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
         oprot.writeString(struct.requestorUserName);
         oprot.writeFieldEnd();
       }
-      if (struct.requestorGroupName != null) {
-        oprot.writeFieldBegin(REQUESTOR_GROUP_NAME_FIELD_DESC);
+      if (struct.requestorGroupNames != null) {
+        oprot.writeFieldBegin(REQUESTOR_GROUP_NAMES_FIELD_DESC);
         {
-          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.requestorGroupName.size()));
-          for (String _iter59 : struct.requestorGroupName)
+          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.requestorGroupNames.size()));
+          for (String _iter54 : struct.requestorGroupNames)
           {
-            oprot.writeString(_iter59);
+            oprot.writeString(_iter54);
+          }
+          oprot.writeSetEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.roleName != null) {
+        oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.roleName);
+        oprot.writeFieldEnd();
+      }
+      if (struct.groups != null) {
+        oprot.writeFieldBegin(GROUPS_FIELD_DESC);
+        {
+          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.groups.size()));
+          for (TSentryGroup _iter55 : struct.groups)
+          {
+            _iter55.write(oprot);
           }
           oprot.writeSetEnd();
         }
@@ -606,10 +840,18 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
       oprot.writeI32(struct.protocol_version);
       oprot.writeString(struct.requestorUserName);
       {
-        oprot.writeI32(struct.requestorGroupName.size());
-        for (String _iter60 : struct.requestorGroupName)
+        oprot.writeI32(struct.requestorGroupNames.size());
+        for (String _iter56 : struct.requestorGroupNames)
+        {
+          oprot.writeString(_iter56);
+        }
+      }
+      oprot.writeString(struct.roleName);
+      {
+        oprot.writeI32(struct.groups.size());
+        for (TSentryGroup _iter57 : struct.groups)
         {
-          oprot.writeString(_iter60);
+          _iter57.write(oprot);
         }
       }
     }
@@ -622,16 +864,30 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
       struct.requestorUserName = iprot.readString();
       struct.setRequestorUserNameIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set61 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.requestorGroupName = new HashSet<String>(2*_set61.size);
+        org.apache.thrift.protocol.TSet _set58 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.requestorGroupNames = new HashSet<String>(2*_set58.size);
+        for (int _i59 = 0; _i59 < _set58.size; ++_i59)
+        {
+          String _elem60; // required
+          _elem60 = iprot.readString();
+          struct.requestorGroupNames.add(_elem60);
+        }
+      }
+      struct.setRequestorGroupNamesIsSet(true);
+      struct.roleName = iprot.readString();
+      struct.setRoleNameIsSet(true);
+      {
+        org.apache.thrift.protocol.TSet _set61 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.groups = new HashSet<TSentryGroup>(2*_set61.size);
         for (int _i62 = 0; _i62 < _set61.size; ++_i62)
         {
-          String _elem63; // required
-          _elem63 = iprot.readString();
-          struct.requestorGroupName.add(_elem63);
+          TSentryGroup _elem63; // required
+          _elem63 = new TSentryGroup();
+          _elem63.read(iprot);
+          struct.groups.add(_elem63);
         }
       }
-      struct.setRequestorGroupNameIsSet(true);
+      struct.setGroupsIsSet(true);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/90cdbefd/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleGrantPrivilegeRequest.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleGrantPrivilegeRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleGrantPrivilegeRequest.java
index 71e950c..550b72d 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleGrantPrivilegeRequest.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleGrantPrivilegeRequest.java
@@ -36,8 +36,8 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
 
   private static final org.apache.thrift.protocol.TField PROTOCOL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("protocol_version", org.apache.thrift.protocol.TType.I32, (short)1);
   private static final org.apache.thrift.protocol.TField REQUESTOR_USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("requestorUserName", org.apache.thrift.protocol.TType.STRING, (short)2);
-  private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)3);
-  private static final org.apache.thrift.protocol.TField REQUESTOR_GROUP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("requestorGroupName", org.apache.thrift.protocol.TType.SET, (short)4);
+  private static final org.apache.thrift.protocol.TField REQUESTOR_GROUP_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("requestorGroupNames", org.apache.thrift.protocol.TType.SET, (short)3);
+  private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField PRIVILEGE_FIELD_DESC = new org.apache.thrift.protocol.TField("privilege", org.apache.thrift.protocol.TType.STRUCT, (short)5);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
@@ -48,16 +48,16 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
 
   private int protocol_version; // required
   private String requestorUserName; // required
+  private Set<String> requestorGroupNames; // required
   private String roleName; // required
-  private Set<String> requestorGroupName; // required
   private TSentryPrivilege privilege; // 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 {
     PROTOCOL_VERSION((short)1, "protocol_version"),
     REQUESTOR_USER_NAME((short)2, "requestorUserName"),
-    ROLE_NAME((short)3, "roleName"),
-    REQUESTOR_GROUP_NAME((short)4, "requestorGroupName"),
+    REQUESTOR_GROUP_NAMES((short)3, "requestorGroupNames"),
+    ROLE_NAME((short)4, "roleName"),
     PRIVILEGE((short)5, "privilege");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -77,10 +77,10 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
           return PROTOCOL_VERSION;
         case 2: // REQUESTOR_USER_NAME
           return REQUESTOR_USER_NAME;
-        case 3: // ROLE_NAME
+        case 3: // REQUESTOR_GROUP_NAMES
+          return REQUESTOR_GROUP_NAMES;
+        case 4: // ROLE_NAME
           return ROLE_NAME;
-        case 4: // REQUESTOR_GROUP_NAME
-          return REQUESTOR_GROUP_NAME;
         case 5: // PRIVILEGE
           return PRIVILEGE;
         default:
@@ -132,11 +132,11 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
     tmpMap.put(_Fields.REQUESTOR_USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("requestorUserName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    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)));
-    tmpMap.put(_Fields.REQUESTOR_GROUP_NAME, new org.apache.thrift.meta_data.FieldMetaData("requestorGroupName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+    tmpMap.put(_Fields.REQUESTOR_GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("requestorGroupNames", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
             new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+    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)));
     tmpMap.put(_Fields.PRIVILEGE, new org.apache.thrift.meta_data.FieldMetaData("privilege", org.apache.thrift.TFieldRequirementType.REQUIRED, 
         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSentryPrivilege.class)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -151,16 +151,16 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
   public TAlterSentryRoleGrantPrivilegeRequest(
     int protocol_version,
     String requestorUserName,
+    Set<String> requestorGroupNames,
     String roleName,
-    Set<String> requestorGroupName,
     TSentryPrivilege privilege)
   {
     this();
     this.protocol_version = protocol_version;
     setProtocol_versionIsSet(true);
     this.requestorUserName = requestorUserName;
+    this.requestorGroupNames = requestorGroupNames;
     this.roleName = roleName;
-    this.requestorGroupName = requestorGroupName;
     this.privilege = privilege;
   }
 
@@ -173,16 +173,16 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
     if (other.isSetRequestorUserName()) {
       this.requestorUserName = other.requestorUserName;
     }
+    if (other.isSetRequestorGroupNames()) {
+      Set<String> __this__requestorGroupNames = new HashSet<String>();
+      for (String other_element : other.requestorGroupNames) {
+        __this__requestorGroupNames.add(other_element);
+      }
+      this.requestorGroupNames = __this__requestorGroupNames;
+    }
     if (other.isSetRoleName()) {
       this.roleName = other.roleName;
     }
-    if (other.isSetRequestorGroupName()) {
-      Set<String> __this__requestorGroupName = new HashSet<String>();
-      for (String other_element : other.requestorGroupName) {
-        __this__requestorGroupName.add(other_element);
-      }
-      this.requestorGroupName = __this__requestorGroupName;
-    }
     if (other.isSetPrivilege()) {
       this.privilege = new TSentryPrivilege(other.privilege);
     }
@@ -197,8 +197,8 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
     this.protocol_version = 1;
 
     this.requestorUserName = null;
+    this.requestorGroupNames = null;
     this.roleName = null;
-    this.requestorGroupName = null;
     this.privilege = null;
   }
 
@@ -247,64 +247,64 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
     }
   }
 
-  public String getRoleName() {
-    return this.roleName;
+  public int getRequestorGroupNamesSize() {
+    return (this.requestorGroupNames == null) ? 0 : this.requestorGroupNames.size();
   }
 
-  public void setRoleName(String roleName) {
-    this.roleName = roleName;
+  public java.util.Iterator<String> getRequestorGroupNamesIterator() {
+    return (this.requestorGroupNames == null) ? null : this.requestorGroupNames.iterator();
   }
 
-  public void unsetRoleName() {
-    this.roleName = null;
+  public void addToRequestorGroupNames(String elem) {
+    if (this.requestorGroupNames == null) {
+      this.requestorGroupNames = new HashSet<String>();
+    }
+    this.requestorGroupNames.add(elem);
   }
 
-  /** Returns true if field roleName is set (has been assigned a value) and false otherwise */
-  public boolean isSetRoleName() {
-    return this.roleName != null;
+  public Set<String> getRequestorGroupNames() {
+    return this.requestorGroupNames;
   }
 
-  public void setRoleNameIsSet(boolean value) {
-    if (!value) {
-      this.roleName = null;
-    }
+  public void setRequestorGroupNames(Set<String> requestorGroupNames) {
+    this.requestorGroupNames = requestorGroupNames;
   }
 
-  public int getRequestorGroupNameSize() {
-    return (this.requestorGroupName == null) ? 0 : this.requestorGroupName.size();
+  public void unsetRequestorGroupNames() {
+    this.requestorGroupNames = null;
   }
 
-  public java.util.Iterator<String> getRequestorGroupNameIterator() {
-    return (this.requestorGroupName == null) ? null : this.requestorGroupName.iterator();
+  /** Returns true if field requestorGroupNames is set (has been assigned a value) and false otherwise */
+  public boolean isSetRequestorGroupNames() {
+    return this.requestorGroupNames != null;
   }
 
-  public void addToRequestorGroupName(String elem) {
-    if (this.requestorGroupName == null) {
-      this.requestorGroupName = new HashSet<String>();
+  public void setRequestorGroupNamesIsSet(boolean value) {
+    if (!value) {
+      this.requestorGroupNames = null;
     }
-    this.requestorGroupName.add(elem);
   }
 
-  public Set<String> getRequestorGroupName() {
-    return this.requestorGroupName;
+  public String getRoleName() {
+    return this.roleName;
   }
 
-  public void setRequestorGroupName(Set<String> requestorGroupName) {
-    this.requestorGroupName = requestorGroupName;
+  public void setRoleName(String roleName) {
+    this.roleName = roleName;
   }
 
-  public void unsetRequestorGroupName() {
-    this.requestorGroupName = null;
+  public void unsetRoleName() {
+    this.roleName = null;
   }
 
-  /** Returns true if field requestorGroupName is set (has been assigned a value) and false otherwise */
-  public boolean isSetRequestorGroupName() {
-    return this.requestorGroupName != null;
+  /** Returns true if field roleName is set (has been assigned a value) and false otherwise */
+  public boolean isSetRoleName() {
+    return this.roleName != null;
   }
 
-  public void setRequestorGroupNameIsSet(boolean value) {
+  public void setRoleNameIsSet(boolean value) {
     if (!value) {
-      this.requestorGroupName = null;
+      this.roleName = null;
     }
   }
 
@@ -349,19 +349,19 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
       }
       break;
 
-    case ROLE_NAME:
+    case REQUESTOR_GROUP_NAMES:
       if (value == null) {
-        unsetRoleName();
+        unsetRequestorGroupNames();
       } else {
-        setRoleName((String)value);
+        setRequestorGroupNames((Set<String>)value);
       }
       break;
 
-    case REQUESTOR_GROUP_NAME:
+    case ROLE_NAME:
       if (value == null) {
-        unsetRequestorGroupName();
+        unsetRoleName();
       } else {
-        setRequestorGroupName((Set<String>)value);
+        setRoleName((String)value);
       }
       break;
 
@@ -384,12 +384,12 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
     case REQUESTOR_USER_NAME:
       return getRequestorUserName();
 
+    case REQUESTOR_GROUP_NAMES:
+      return getRequestorGroupNames();
+
     case ROLE_NAME:
       return getRoleName();
 
-    case REQUESTOR_GROUP_NAME:
-      return getRequestorGroupName();
-
     case PRIVILEGE:
       return getPrivilege();
 
@@ -408,10 +408,10 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
       return isSetProtocol_version();
     case REQUESTOR_USER_NAME:
       return isSetRequestorUserName();
+    case REQUESTOR_GROUP_NAMES:
+      return isSetRequestorGroupNames();
     case ROLE_NAME:
       return isSetRoleName();
-    case REQUESTOR_GROUP_NAME:
-      return isSetRequestorGroupName();
     case PRIVILEGE:
       return isSetPrivilege();
     }
@@ -449,6 +449,15 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
         return false;
     }
 
+    boolean this_present_requestorGroupNames = true && this.isSetRequestorGroupNames();
+    boolean that_present_requestorGroupNames = true && that.isSetRequestorGroupNames();
+    if (this_present_requestorGroupNames || that_present_requestorGroupNames) {
+      if (!(this_present_requestorGroupNames && that_present_requestorGroupNames))
+        return false;
+      if (!this.requestorGroupNames.equals(that.requestorGroupNames))
+        return false;
+    }
+
     boolean this_present_roleName = true && this.isSetRoleName();
     boolean that_present_roleName = true && that.isSetRoleName();
     if (this_present_roleName || that_present_roleName) {
@@ -458,15 +467,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
         return false;
     }
 
-    boolean this_present_requestorGroupName = true && this.isSetRequestorGroupName();
-    boolean that_present_requestorGroupName = true && that.isSetRequestorGroupName();
-    if (this_present_requestorGroupName || that_present_requestorGroupName) {
-      if (!(this_present_requestorGroupName && that_present_requestorGroupName))
-        return false;
-      if (!this.requestorGroupName.equals(that.requestorGroupName))
-        return false;
-    }
-
     boolean this_present_privilege = true && this.isSetPrivilege();
     boolean that_present_privilege = true && that.isSetPrivilege();
     if (this_present_privilege || that_present_privilege) {
@@ -493,16 +493,16 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
     if (present_requestorUserName)
       builder.append(requestorUserName);
 
+    boolean present_requestorGroupNames = true && (isSetRequestorGroupNames());
+    builder.append(present_requestorGroupNames);
+    if (present_requestorGroupNames)
+      builder.append(requestorGroupNames);
+
     boolean present_roleName = true && (isSetRoleName());
     builder.append(present_roleName);
     if (present_roleName)
       builder.append(roleName);
 
-    boolean present_requestorGroupName = true && (isSetRequestorGroupName());
-    builder.append(present_requestorGroupName);
-    if (present_requestorGroupName)
-      builder.append(requestorGroupName);
-
     boolean present_privilege = true && (isSetPrivilege());
     builder.append(present_privilege);
     if (present_privilege)
@@ -539,22 +539,22 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(typedOther.isSetRoleName());
+    lastComparison = Boolean.valueOf(isSetRequestorGroupNames()).compareTo(typedOther.isSetRequestorGroupNames());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetRoleName()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, typedOther.roleName);
+    if (isSetRequestorGroupNames()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestorGroupNames, typedOther.requestorGroupNames);
       if (lastComparison != 0) {
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetRequestorGroupName()).compareTo(typedOther.isSetRequestorGroupName());
+    lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(typedOther.isSetRoleName());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetRequestorGroupName()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestorGroupName, typedOther.requestorGroupName);
+    if (isSetRoleName()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, typedOther.roleName);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -601,19 +601,19 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
     }
     first = false;
     if (!first) sb.append(", ");
-    sb.append("roleName:");
-    if (this.roleName == null) {
+    sb.append("requestorGroupNames:");
+    if (this.requestorGroupNames == null) {
       sb.append("null");
     } else {
-      sb.append(this.roleName);
+      sb.append(this.requestorGroupNames);
     }
     first = false;
     if (!first) sb.append(", ");
-    sb.append("requestorGroupName:");
-    if (this.requestorGroupName == null) {
+    sb.append("roleName:");
+    if (this.roleName == null) {
       sb.append("null");
     } else {
-      sb.append(this.requestorGroupName);
+      sb.append(this.roleName);
     }
     first = false;
     if (!first) sb.append(", ");
@@ -638,12 +638,12 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' is unset! Struct:" + toString());
     }
 
-    if (!isSetRoleName()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString());
+    if (!isSetRequestorGroupNames()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorGroupNames' is unset! Struct:" + toString());
     }
 
-    if (!isSetRequestorGroupName()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorGroupName' is unset! Struct:" + toString());
+    if (!isSetRoleName()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'roleName' is unset! Struct:" + toString());
     }
 
     if (!isSetPrivilege()) {
@@ -708,28 +708,28 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // ROLE_NAME
-            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.roleName = iprot.readString();
-              struct.setRoleNameIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // REQUESTOR_GROUP_NAME
+          case 3: // REQUESTOR_GROUP_NAMES
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
                 org.apache.thrift.protocol.TSet _set64 = iprot.readSetBegin();
-                struct.requestorGroupName = new HashSet<String>(2*_set64.size);
+                struct.requestorGroupNames = new HashSet<String>(2*_set64.size);
                 for (int _i65 = 0; _i65 < _set64.size; ++_i65)
                 {
                   String _elem66; // required
                   _elem66 = iprot.readString();
-                  struct.requestorGroupName.add(_elem66);
+                  struct.requestorGroupNames.add(_elem66);
                 }
                 iprot.readSetEnd();
               }
-              struct.setRequestorGroupNameIsSet(true);
+              struct.setRequestorGroupNamesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // ROLE_NAME
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.roleName = iprot.readString();
+              struct.setRoleNameIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -764,16 +764,11 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
         oprot.writeString(struct.requestorUserName);
         oprot.writeFieldEnd();
       }
-      if (struct.roleName != null) {
-        oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
-        oprot.writeString(struct.roleName);
-        oprot.writeFieldEnd();
-      }
-      if (struct.requestorGroupName != null) {
-        oprot.writeFieldBegin(REQUESTOR_GROUP_NAME_FIELD_DESC);
+      if (struct.requestorGroupNames != null) {
+        oprot.writeFieldBegin(REQUESTOR_GROUP_NAMES_FIELD_DESC);
         {
-          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.requestorGroupName.size()));
-          for (String _iter67 : struct.requestorGroupName)
+          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.requestorGroupNames.size()));
+          for (String _iter67 : struct.requestorGroupNames)
           {
             oprot.writeString(_iter67);
           }
@@ -781,6 +776,11 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
         }
         oprot.writeFieldEnd();
       }
+      if (struct.roleName != null) {
+        oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
+        oprot.writeString(struct.roleName);
+        oprot.writeFieldEnd();
+      }
       if (struct.privilege != null) {
         oprot.writeFieldBegin(PRIVILEGE_FIELD_DESC);
         struct.privilege.write(oprot);
@@ -805,14 +805,14 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeI32(struct.protocol_version);
       oprot.writeString(struct.requestorUserName);
-      oprot.writeString(struct.roleName);
       {
-        oprot.writeI32(struct.requestorGroupName.size());
-        for (String _iter68 : struct.requestorGroupName)
+        oprot.writeI32(struct.requestorGroupNames.size());
+        for (String _iter68 : struct.requestorGroupNames)
         {
           oprot.writeString(_iter68);
         }
       }
+      oprot.writeString(struct.roleName);
       struct.privilege.write(oprot);
     }
 
@@ -823,19 +823,19 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
       struct.setProtocol_versionIsSet(true);
       struct.requestorUserName = iprot.readString();
       struct.setRequestorUserNameIsSet(true);
-      struct.roleName = iprot.readString();
-      struct.setRoleNameIsSet(true);
       {
         org.apache.thrift.protocol.TSet _set69 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.requestorGroupName = new HashSet<String>(2*_set69.size);
+        struct.requestorGroupNames = new HashSet<String>(2*_set69.size);
         for (int _i70 = 0; _i70 < _set69.size; ++_i70)
         {
           String _elem71; // required
           _elem71 = iprot.readString();
-          struct.requestorGroupName.add(_elem71);
+          struct.requestorGroupNames.add(_elem71);
         }
       }
-      struct.setRequestorGroupNameIsSet(true);
+      struct.setRequestorGroupNamesIsSet(true);
+      struct.roleName = iprot.readString();
+      struct.setRoleNameIsSet(true);
       struct.privilege = new TSentryPrivilege();
       struct.privilege.read(iprot);
       struct.setPrivilegeIsSet(true);