You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by sr...@apache.org on 2014/05/29 08:39:04 UTC

[1/3] SENTRY-191: Sentry Policy Service should not require passing the RPC requestor's user/group information ( Prasad Mujumdar via Sravya Tirukkovalur)

Repository: incubator-sentry
Updated Branches:
  refs/heads/master af795c024 -> 61a67cb95


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java
index 5f8a65f..2aac409 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyServiceClient.java
@@ -18,8 +18,11 @@
 
 package org.apache.sentry.provider.db.service.thrift;
 
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Sets;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.HashSet;
+import java.util.Set;
+
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.net.NetUtils;
 import org.apache.hadoop.security.SaslRpcServer;
@@ -42,10 +45,8 @@ import org.apache.thrift.transport.TTransportException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.HashSet;
-import java.util.Set;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
 
 public class SentryPolicyServiceClient {
 
@@ -99,12 +100,11 @@ public class SentryPolicyServiceClient {
     LOGGER.info("Successfully created client");
   }
 
-  public void createRole(String requestorUserName, Set<String> requestorUserGroupNames, String roleName)
+  public void createRole(String requestorUserName, String roleName)
   throws SentryUserException {
     TCreateSentryRoleRequest request = new TCreateSentryRoleRequest();
     request.setProtocol_version(ThriftConstants.TSENTRY_SERVICE_VERSION_CURRENT);
     request.setRequestorUserName(requestorUserName);
-    request.setRequestorGroupNames(requestorUserGroupNames);
     request.setRoleName(roleName);
     try {
       TCreateSentryRoleResponse response = client.create_sentry_role(request);
@@ -114,25 +114,24 @@ public class SentryPolicyServiceClient {
     }
   }
 
-  public void dropRole(String requestorUserName, Set<String> requestorUserGroupNames,
+  public void dropRole(String requestorUserName,
       String roleName)
   throws SentryUserException {
-    dropRole(requestorUserName, requestorUserGroupNames, roleName, false);
+    dropRole(requestorUserName, roleName, false);
   }
 
-  public void dropRoleIfExists(String requestorUserName, Set<String> requestorUserGroupNames,
+  public void dropRoleIfExists(String requestorUserName,
       String roleName)
   throws SentryUserException {
-    dropRole(requestorUserName, requestorUserGroupNames, roleName, true);
+    dropRole(requestorUserName, roleName, true);
   }
 
-  private void dropRole(String requestorUserName, Set<String> requestorUserGroupNames,
+  private void dropRole(String requestorUserName,
       String roleName, boolean ifExists)
   throws SentryUserException {
     TDropSentryRoleRequest request = new TDropSentryRoleRequest();
     request.setProtocol_version(ThriftConstants.TSENTRY_SERVICE_VERSION_CURRENT);
     request.setRequestorUserName(requestorUserName);
-    request.setRequestorGroupNames(requestorUserGroupNames);
     request.setRoleName(roleName);
     try {
       TDropSentryRoleResponse response = client.drop_sentry_role(request);
@@ -155,12 +154,11 @@ public class SentryPolicyServiceClient {
    * @throws SentryUserException
    */
   public Set<TSentryRole> listRolesByGroupName(String requestorUserName,
-      Set<String> requestorUserGroupNames, String groupName)
+      String groupName)
   throws SentryUserException {
     TListSentryRolesRequest request = new TListSentryRolesRequest();
     request.setProtocol_version(ThriftConstants.TSENTRY_SERVICE_VERSION_CURRENT);
     request.setRequestorUserName(requestorUserName);
-    request.setRequestorGroupNames(requestorUserGroupNames);
     request.setGroupName(groupName);
     TListSentryRolesResponse response;
     Set<String> roles = new HashSet<String>();
@@ -181,13 +179,12 @@ public class SentryPolicyServiceClient {
    * @return Set of thrift sentry privilege objects
    * @throws SentryUserException
    */
-  public Set<TSentryPrivilege> listPrivilegesByRoleName(String requestorUserName,
-      Set<String> requestorUserGroupNames, String roleName)
+  public Set<TSentryPrivilege> listPrivilegesByRoleName(
+      String requestorUserName, String roleName)
   throws SentryUserException {
     TListSentryPrivilegesRequest request = new TListSentryPrivilegesRequest();
     request.setProtocol_version(ThriftConstants.TSENTRY_SERVICE_VERSION_CURRENT);
     request.setRequestorUserName(requestorUserName);
-    request.setRequestorGroupNames(requestorUserGroupNames);
     request.setRoleName(roleName);
     TListSentryPrivilegesResponse response;
     try {
@@ -201,44 +198,44 @@ public class SentryPolicyServiceClient {
 
   public Set<TSentryRole> listRoles(String requestorUserName, Set<String> requestorUserGroupNames)
        throws SentryUserException {
-    return listRolesByGroupName(requestorUserName, requestorUserGroupNames, null);
+    return listRolesByGroupName(requestorUserName, null);
   }
 
-  public void grantURIPrivilege(String requestorUserName, Set<String> requestorUserGroupNames,
+  public void grantURIPrivilege(String requestorUserName,
       String roleName, String server, String uri)
   throws SentryUserException {
-    grantPrivilege(requestorUserName, requestorUserGroupNames, roleName,
+    grantPrivilege(requestorUserName, roleName,
         PrivilegeScope.URI, server, uri, null, null, AccessConstants.ALL);
   }
 
-  public void grantServerPrivilege(String requestorUserName, Set<String> requestorUserGroupNames,
+  public void grantServerPrivilege(String requestorUserName,
       String roleName, String server)
   throws SentryUserException {
-    grantPrivilege(requestorUserName, requestorUserGroupNames, roleName,
+    grantPrivilege(requestorUserName, roleName,
         PrivilegeScope.SERVER, server, null, null, null, AccessConstants.ALL);
   }
 
-  public void grantDatabasePrivilege(String requestorUserName, Set<String> requestorUserGroupNames,
+  public void grantDatabasePrivilege(String requestorUserName,
       String roleName, String server, String db)
   throws SentryUserException {
-    grantPrivilege(requestorUserName, requestorUserGroupNames, roleName,
+    grantPrivilege(requestorUserName, roleName,
         PrivilegeScope.DATABASE, server, null, db, null, AccessConstants.ALL);
   }
 
-  public void grantTablePrivilege(String requestorUserName, Set<String> requestorUserGroupNames,
+  public void grantTablePrivilege(String requestorUserName,
       String roleName, String server, String db, String table, String action)
   throws SentryUserException {
-    grantPrivilege(requestorUserName, requestorUserGroupNames, roleName, PrivilegeScope.TABLE, server, null,
+    grantPrivilege(requestorUserName, roleName, PrivilegeScope.TABLE, server,
+        null,
         db, table, action);
   }
 
-  private void grantPrivilege(String requestorUserName, Set<String> requestorUserGroupNames,
+  private void grantPrivilege(String requestorUserName,
       String roleName, PrivilegeScope scope, String serverName, String uri, String db, String table, String action)
   throws SentryUserException {
     TAlterSentryRoleGrantPrivilegeRequest request = new TAlterSentryRoleGrantPrivilegeRequest();
     request.setProtocol_version(ThriftConstants.TSENTRY_SERVICE_VERSION_CURRENT);
     request.setRequestorUserName(requestorUserName);
-    request.setRequestorGroupNames(requestorUserGroupNames);
     request.setRoleName(roleName);
     TSentryPrivilege privilege = new TSentryPrivilege();
     privilege.setPrivilegeScope(scope.toString());
@@ -258,42 +255,41 @@ public class SentryPolicyServiceClient {
     }
   }
 
-  public void revokeURIPrivilege(String requestorUserName, Set<String> requestorUserGroupNames,
+  public void revokeURIPrivilege(String requestorUserName,
       String roleName, String server, String uri)
   throws SentryUserException {
-    revokePrivilege(requestorUserName, requestorUserGroupNames, roleName,
+    revokePrivilege(requestorUserName, roleName,
         PrivilegeScope.URI, server, uri, null, null, AccessConstants.ALL);
   }
 
-  public void revokeServerPrivilege(String requestorUserName, Set<String> requestorUserGroupNames,
+  public void revokeServerPrivilege(String requestorUserName,
       String roleName, String server)
   throws SentryUserException {
-    revokePrivilege(requestorUserName, requestorUserGroupNames, roleName,
+    revokePrivilege(requestorUserName, roleName,
         PrivilegeScope.SERVER, server, null, null, null, AccessConstants.ALL);
   }
 
-  public void revokeDatabasePrivilege(String requestorUserName, Set<String> requestorUserGroupNames,
+  public void revokeDatabasePrivilege(String requestorUserName,
       String roleName, String server, String db)
   throws SentryUserException {
-    revokePrivilege(requestorUserName, requestorUserGroupNames, roleName,
+    revokePrivilege(requestorUserName, roleName,
         PrivilegeScope.DATABASE, server, null, db, null, AccessConstants.ALL);
   }
 
-  public void revokeTablePrivilege(String requestorUserName, Set<String> requestorUserGroupNames,
+  public void revokeTablePrivilege(String requestorUserName,
       String roleName, String server, String db, String table, String action)
   throws SentryUserException {
-    revokePrivilege(requestorUserName, requestorUserGroupNames, roleName,
+    revokePrivilege(requestorUserName, roleName,
         PrivilegeScope.TABLE, server, null,
         db, table, action);
   }
 
-  private void revokePrivilege(String requestorUserName, Set<String> requestorUserGroupNames,
+  private void revokePrivilege(String requestorUserName,
       String roleName, PrivilegeScope scope, String serverName, String uri, String db, String table, String action)
   throws SentryUserException {
     TAlterSentryRoleRevokePrivilegeRequest request = new TAlterSentryRoleRevokePrivilegeRequest();
     request.setProtocol_version(ThriftConstants.TSENTRY_SERVICE_VERSION_CURRENT);
     request.setRequestorUserName(requestorUserName);
-    request.setRequestorGroupNames(requestorUserGroupNames);
     request.setRoleName(roleName);
     TSentryPrivilege privilege = new TSentryPrivilege();
     privilege.setPrivilegeScope(scope.toString());
@@ -328,11 +324,11 @@ public class SentryPolicyServiceClient {
     }
   }
 
-  public void grantRoleToGroup(String requestorUserName, Set<String> requestorUserGroupName,
+  public void grantRoleToGroup(String requestorUserName,
       String groupName, String roleName)
   throws SentryUserException {
     TAlterSentryRoleAddGroupsRequest request = new TAlterSentryRoleAddGroupsRequest(ThriftConstants.
-        TSENTRY_SERVICE_VERSION_CURRENT, requestorUserName, requestorUserGroupName,
+TSENTRY_SERVICE_VERSION_CURRENT, requestorUserName,
         roleName, Sets.newHashSet(new TSentryGroup(groupName)));
     try {
       TAlterSentryRoleAddGroupsResponse response = client.alter_sentry_role_add_groups(request);
@@ -342,11 +338,11 @@ public class SentryPolicyServiceClient {
     }
   }
 
-  public void revokeRoleFromGroup(String requestorUserName, Set<String> requestorUserGroupName,
+  public void revokeRoleFromGroup(String requestorUserName,
       String groupName, String roleName)
   throws SentryUserException {
     TAlterSentryRoleDeleteGroupsRequest request = new TAlterSentryRoleDeleteGroupsRequest(ThriftConstants.
-        TSENTRY_SERVICE_VERSION_CURRENT, requestorUserName, requestorUserGroupName,
+TSENTRY_SERVICE_VERSION_CURRENT, requestorUserName,
         roleName, Sets.newHashSet(new TSentryGroup(groupName)));
     try {
       TAlterSentryRoleDeleteGroupsResponse response = client.alter_sentry_role_delete_groups(request);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java
index 8e58202..f92c78a 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java
@@ -19,11 +19,14 @@
 package org.apache.sentry.provider.db.service.thrift;
 
 import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.sentry.SentryUserException;
+import org.apache.sentry.provider.common.GroupMappingService;
 import org.apache.sentry.provider.db.SentryAccessDeniedException;
 import org.apache.sentry.provider.db.SentryAlreadyExistsException;
 import org.apache.sentry.provider.db.SentryInvalidInputException;
@@ -106,6 +109,11 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface {
     return handlers;
   }
 
+  @VisibleForTesting
+  public Configuration getSentryStoreConf() {
+    return conf;
+  }
+
   private static Set<String> toTrimedLower(Set<String> s) {
     Set<String> result = Sets.newHashSet();
     for (String v : s) {
@@ -130,7 +138,8 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface {
     TCreateSentryRoleRequest request) throws TException {
     TCreateSentryRoleResponse response = new TCreateSentryRoleResponse();
     try {
-      authorize(request.getRequestorUserName(), request.getRequestorGroupNames());
+      authorize(request.getRequestorUserName(),
+          getRequestorGroups(request.getRequestorUserName()));
       CommitContext commitContext = sentryStore.createSentryRole(request.getRoleName(),
           request.getRequestorUserName());
       response.setStatus(Status.OK());
@@ -157,7 +166,8 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface {
 
     TAlterSentryRoleGrantPrivilegeResponse response = new TAlterSentryRoleGrantPrivilegeResponse();
     try {
-      authorize(request.getRequestorUserName(), request.getRequestorGroupNames());
+      authorize(request.getRequestorUserName(),
+          getRequestorGroups(request.getRequestorUserName()));
       CommitContext commitContext = sentryStore.alterSentryRoleGrantPrivilege(request.getRoleName(),
                                     request.getPrivilege());
       response.setStatus(Status.OK());
@@ -188,7 +198,8 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface {
   (TAlterSentryRoleRevokePrivilegeRequest request) throws TException {
     TAlterSentryRoleRevokePrivilegeResponse response = new TAlterSentryRoleRevokePrivilegeResponse();
     try {
-      authorize(request.getRequestorUserName(), request.getRequestorGroupNames());
+      authorize(request.getRequestorUserName(),
+          getRequestorGroups(request.getRequestorUserName()));
       CommitContext commitContext = sentryStore.alterSentryRoleRevokePrivilege(request.getRoleName(),
                                     request.getPrivilege());
       response.setStatus(Status.OK());
@@ -220,7 +231,8 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface {
     TDropSentryRoleResponse response = new TDropSentryRoleResponse();
     TSentryResponseStatus status;
     try {
-      authorize(request.getRequestorUserName(), request.getRequestorGroupNames());
+      authorize(request.getRequestorUserName(),
+          getRequestorGroups(request.getRequestorUserName()));
       CommitContext commitContext = sentryStore.dropSentryRole(request.getRoleName());
       response.setStatus(Status.OK());
       notificationHandlerInvoker.drop_sentry_role(commitContext,
@@ -245,7 +257,8 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface {
     TAlterSentryRoleAddGroupsRequest request) throws TException {
     TAlterSentryRoleAddGroupsResponse response = new TAlterSentryRoleAddGroupsResponse();
     try {
-      authorize(request.getRequestorUserName(), request.getRequestorGroupNames());
+      authorize(request.getRequestorUserName(),
+          getRequestorGroups(request.getRequestorUserName()));
       CommitContext commitContext = sentryStore.alterSentryRoleAddGroups(request.getRequestorUserName(),
                                     request.getRoleName(), request.getGroups());
       response.setStatus(Status.OK());
@@ -271,7 +284,8 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface {
     TAlterSentryRoleDeleteGroupsRequest request) throws TException {
     TAlterSentryRoleDeleteGroupsResponse response = new TAlterSentryRoleDeleteGroupsResponse();
     try {
-      authorize(request.getRequestorUserName(), request.getRequestorGroupNames());
+      authorize(request.getRequestorUserName(),
+          getRequestorGroups(request.getRequestorUserName()));
       CommitContext commitContext = sentryStore.alterSentryRoleDeleteGroups(request.getRoleName(),
           request.getGroups());
       response.setStatus(Status.OK());
@@ -300,7 +314,8 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface {
     Set<TSentryRole> roleSet = new HashSet<TSentryRole>();
     try {
       //TODO: Handle authorization for metadata queries
-      authorize(request.getRequestorUserName(), request.getRequestorGroupNames());
+      authorize(request.getRequestorUserName(),
+          getRequestorGroups(request.getRequestorUserName()));
       roleSet = sentryStore.getTSentryRolesByGroupName(request.getGroupName());
       response.setRoles(roleSet);
       response.setStatus(Status.OK());
@@ -327,7 +342,8 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface {
       //TODO: Handle authorization for metadata queries
       // Shall we allow only admin users to list privileges
       // or allow all users as long as user is granted this role?
-      authorize(request.getRequestorUserName(), request.getRequestorGroupNames());
+      authorize(request.getRequestorUserName(),
+          getRequestorGroups(request.getRequestorUserName()));
       privilegeSet = sentryStore.getTSentryPrivilegesByRoleName(request.getRoleName());
       response.setPrivileges(privilegeSet);
       response.setStatus(Status.OK());
@@ -364,4 +380,28 @@ public class SentryPolicyStoreProcessor implements SentryPolicyService.Iface {
     }
     return response;
   }
+
+  // retrieve the group mapping for the given user name
+  private Set<String> getRequestorGroups(String userName)
+      throws SentryUserException {
+      String groupMapping = conf.get(ServerConfig.SENTRY_STORE_GROUP_MAPPING,
+          ServerConfig.SENTRY_STORE_GROUP_MAPPING_DEFAULT);
+      String authResoruce = conf
+          .get(ServerConfig.SENTRY_STORE_GROUP_MAPPING_RESOURCE);
+
+      // load the group mapping provider class
+      GroupMappingService groupMappingService;
+      try {
+        Constructor<?> constrctor = Class.forName(groupMapping).getDeclaredConstructor(
+            Configuration.class, String.class);
+        constrctor.setAccessible(true);
+        groupMappingService = (GroupMappingService) constrctor.newInstance(new Object[] { conf,
+            authResoruce });
+      } catch (NoSuchMethodException | SecurityException | ClassNotFoundException
+          | InstantiationException | IllegalAccessException
+          | IllegalArgumentException | InvocationTargetException e) {
+        throw new SentryUserException("Unable to instantiate group mapping", e);
+      }
+      return groupMappingService.getGroups(userName);
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java
index d06ac3c..4a2b900 100644
--- a/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java
+++ b/sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/service/thrift/ServiceConstants.java
@@ -88,6 +88,12 @@ public class ServiceConstants {
     public static final String SENTRY_VERIFY_SCHEM_VERSION = "sentry.verify.schema.version";
     public static final String SENTRY_VERIFY_SCHEM_VERSION_DEFAULT = "true";
 
+    public static final String SENTRY_STORE_GROUP_MAPPING = "sentry.store.group.mapping";
+    public static final String SENTRY_STORE_GROUP_MAPPING_RESOURCE = "sentry.store.group.mapping.resource";
+    public static final String SENTRY_STORE_HADOOP_GROUP_MAPPING = "org.apache.sentry.provider.common.HadoopGroupMappingService";
+    public static final String SENTRY_STORE_LOCAL_GROUP_MAPPING = "org.apache.sentry.provider.file.LocalGroupMappingService";
+    public static final String SENTRY_STORE_GROUP_MAPPING_DEFAULT = SENTRY_STORE_HADOOP_GROUP_MAPPING;
+
     public static final ImmutableMap<String, String> SENTRY_STORE_DEFAULTS =
         ImmutableMap.<String, String>builder()
     .put("datanucleus.connectionPoolingType", "BoneCP")

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/main/resources/sentry_policy_service.thrift
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/main/resources/sentry_policy_service.thrift b/sentry-provider/sentry-provider-db/src/main/resources/sentry_policy_service.thrift
index a8b511d..b4281c7 100644
--- a/sentry-provider/sentry-provider-db/src/main/resources/sentry_policy_service.thrift
+++ b/sentry-provider/sentry-provider-db/src/main/resources/sentry_policy_service.thrift
@@ -52,8 +52,7 @@ struct TSentryGroup {
 struct TCreateSentryRoleRequest {
 1: required i32 protocol_version = sentry_common_service.TSENTRY_SERVICE_V1,
 2: required string requestorUserName, # user on whose behalf the request is issued
-3: required set<string> requestorGroupNames # groups the requesting user belongs to
-4: required string roleName, # TSentryRole is not required for this request
+3: required string roleName, # TSentryRole is not required for this request
 }
 struct TCreateSentryRoleResponse {
 1: required sentry_common_service.TSentryResponseStatus status
@@ -63,8 +62,7 @@ struct TCreateSentryRoleResponse {
 struct TDropSentryRoleRequest {
 1: required i32 protocol_version = sentry_common_service.TSENTRY_SERVICE_V1,
 2: required string requestorUserName, # user on whose behalf the request is issued
-3: required set<string> requestorGroupNames # groups the requesting user belongs to
-4: required string roleName # role to drop
+3: required string roleName # role to drop
 }
 struct TDropSentryRoleResponse {
 1: required sentry_common_service.TSentryResponseStatus status
@@ -74,8 +72,7 @@ struct TDropSentryRoleResponse {
 struct TAlterSentryRoleAddGroupsRequest {
 1: required i32 protocol_version = sentry_common_service.TSENTRY_SERVICE_V1,
 2: required string requestorUserName, # user on whose behalf the request is issued
-3: required set<string> requestorGroupNames # groups the requesting user belongs to
-4: required string roleName,
+3: required string roleName,
 5: required set<TSentryGroup> groups
 }
 
@@ -87,8 +84,7 @@ struct TAlterSentryRoleAddGroupsResponse {
 struct TAlterSentryRoleDeleteGroupsRequest {
 1: required i32 protocol_version = sentry_common_service.TSENTRY_SERVICE_V1,
 2: required string requestorUserName, # user on whose behalf the request is issued
-3: required set<string> requestorGroupNames # groups the requesting user belongs to
-4: required string roleName,
+3: required string roleName,
 5: required set<TSentryGroup> groups
 }
 struct TAlterSentryRoleDeleteGroupsResponse {
@@ -99,8 +95,7 @@ struct TAlterSentryRoleDeleteGroupsResponse {
 struct TAlterSentryRoleGrantPrivilegeRequest {
 1: required i32 protocol_version = sentry_common_service.TSENTRY_SERVICE_V1,
 2: required string requestorUserName, # user on whose behalf the request is issued
-3: required set<string> requestorGroupNames # groups the requesting user belongs to
-4: required string roleName,
+3: required string roleName,
 5: required TSentryPrivilege privilege
 }
 struct TAlterSentryRoleGrantPrivilegeResponse {
@@ -111,8 +106,7 @@ struct TAlterSentryRoleGrantPrivilegeResponse {
 struct TAlterSentryRoleRevokePrivilegeRequest {
 1: required i32 protocol_version = sentry_common_service.TSENTRY_SERVICE_V1,
 2: required string requestorUserName, # user on whose behalf the request is issued
-3: required set<string> requestorGroupNames # groups the requesting user belongs to
-4: required string roleName,
+3: required string roleName,
 5: required TSentryPrivilege privilege
 }
 struct TAlterSentryRoleRevokePrivilegeResponse {
@@ -123,8 +117,7 @@ struct TAlterSentryRoleRevokePrivilegeResponse {
 struct TListSentryRolesRequest {
 1: required i32 protocol_version = sentry_common_service.TSENTRY_SERVICE_V1,
 2: required string requestorUserName, # user on whose behalf the request is issued
-3: required set<string> requestorGroupNames,# groups the requesting user belongs to
-4: optional string groupName # for this group, or all roles for all groups if null
+3: optional string groupName # for this group, or all roles for all groups if null
 }
 # used only for TListSentryRolesResponse
 struct TSentryRole {
@@ -141,8 +134,7 @@ struct TListSentryRolesResponse {
 struct TListSentryPrivilegesRequest {
 1: required i32 protocol_version = sentry_common_service.TSENTRY_SERVICE_V1,
 2: required string requestorUserName, # user on whose behalf the request is issued
-3: required set<string> requestorGroupNames,# groups the requesting user belongs to
-4: required string roleName # get privileges assigned for this role
+3: required string roleName # get privileges assigned for this role
 }
 struct TListSentryPrivilegesResponse {
 1: required sentry_common_service.TSentryResponseStatus status
@@ -184,4 +176,4 @@ service SentryPolicyService
 
   # For use with ProviderBackend.getPrivileges only
   TListSentryPrivilegesForProviderResponse list_sentry_privileges_for_provider(1:TListSentryPrivilegesForProviderRequest request)
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerWithoutKerberos.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerWithoutKerberos.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerWithoutKerberos.java
index 5ea4a36..d3e2ad3 100644
--- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerWithoutKerberos.java
+++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServerWithoutKerberos.java
@@ -39,10 +39,12 @@ public class TestSentryServerWithoutKerberos extends SentryServiceIntegrationBas
   public void testCreateRole() throws Exception {
     String requestorUserName = ADMIN_USER;
     Set<String> requestorUserGroupNames = Sets.newHashSet(ADMIN_GROUP);
+    setLocalGroupMapping(requestorUserName, requestorUserGroupNames);
+    writePolicyFile();
     String roleName = "admin_r";
-    client.dropRoleIfExists(requestorUserName, requestorUserGroupNames, roleName);
-    client.createRole(requestorUserName, requestorUserGroupNames, roleName);
-    client.dropRole(requestorUserName, requestorUserGroupNames, roleName);
+    client.dropRoleIfExists(requestorUserName, roleName);
+    client.createRole(requestorUserName, roleName);
+    client.dropRole(requestorUserName, roleName);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java
index f51f518..56dcaf9 100644
--- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java
+++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceIntegration.java
@@ -18,17 +18,17 @@
 
 package org.apache.sentry.provider.db.service.thrift;
 
-import com.google.common.collect.Sets;
-
 import org.apache.sentry.core.common.ActiveRoleSet;
+import static junit.framework.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Set;
+
 import org.apache.sentry.provider.db.service.persistent.SentryStore;
 import org.apache.sentry.service.thrift.SentryServiceIntegrationBase;
 import org.junit.Test;
 
-import java.util.Set;
-
-import static junit.framework.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import com.google.common.collect.Sets;
 
 
 public class TestSentryServiceIntegration extends SentryServiceIntegrationBase {
@@ -38,10 +38,12 @@ public class TestSentryServiceIntegration extends SentryServiceIntegrationBase {
     String requestorUserName = ADMIN_USER;
     Set<String> requestorUserGroupNames = Sets.newHashSet(ADMIN_GROUP);
     String roleName = "admin_r";
+    setLocalGroupMapping(requestorUserName, requestorUserGroupNames);
+    writePolicyFile();
 
-    client.dropRoleIfExists(requestorUserName, requestorUserGroupNames, roleName);
+    client.dropRoleIfExists(requestorUserName, roleName);
 
-    client.createRole(requestorUserName, requestorUserGroupNames, roleName);
+    client.createRole(requestorUserName, roleName);
 
     Set<TSentryRole> roles = client.listRoles(requestorUserName, requestorUserGroupNames);
     assertEquals("Incorrect number of roles", 1, roles.size());
@@ -49,62 +51,64 @@ public class TestSentryServiceIntegration extends SentryServiceIntegrationBase {
     for (TSentryRole role:roles) {
       assertTrue(role.getRoleName(), role.getRoleName().equalsIgnoreCase(roleName));
     }
-    client.dropRole(requestorUserName, requestorUserGroupNames, roleName);
+    client.dropRole(requestorUserName, roleName);
   }
 
   @Test
   public void testGranRevokePrivilegeOnTableForRole() throws Exception {
     String requestorUserName = ADMIN_USER;
     Set<String> requestorUserGroupNames = Sets.newHashSet(ADMIN_GROUP);
+    setLocalGroupMapping(requestorUserName, requestorUserGroupNames);
+    writePolicyFile();
     String roleName1 = "admin_r1";
     String roleName2 = "admin_r2";
 
-    client.dropRoleIfExists(requestorUserName, requestorUserGroupNames, roleName1);
-    client.createRole(requestorUserName, requestorUserGroupNames, roleName1);
+    client.dropRoleIfExists(requestorUserName,  roleName1);
+    client.createRole(requestorUserName,  roleName1);
 
-    client.grantTablePrivilege(requestorUserName, requestorUserGroupNames, roleName1, "server", "db", "table1", "ALL");
-    client.grantTablePrivilege(requestorUserName, requestorUserGroupNames, roleName1, "server", "db", "table2", "ALL");
-    client.grantTablePrivilege(requestorUserName, requestorUserGroupNames, roleName1, "server", "db", "table3", "ALL");
-    client.grantTablePrivilege(requestorUserName, requestorUserGroupNames, roleName1, "server", "db", "table4", "ALL");
+    client.grantTablePrivilege(requestorUserName,  roleName1, "server", "db", "table1", "ALL");
+    client.grantTablePrivilege(requestorUserName,  roleName1, "server", "db", "table2", "ALL");
+    client.grantTablePrivilege(requestorUserName,  roleName1, "server", "db", "table3", "ALL");
+    client.grantTablePrivilege(requestorUserName,  roleName1, "server", "db", "table4", "ALL");
 
 
-    client.dropRoleIfExists(requestorUserName, requestorUserGroupNames, roleName2);
-    client.createRole(requestorUserName, requestorUserGroupNames, roleName2);
+    client.dropRoleIfExists(requestorUserName,  roleName2);
+    client.createRole(requestorUserName,  roleName2);
 
-    client.grantTablePrivilege(requestorUserName, requestorUserGroupNames, roleName2, "server", "db", "table1", "ALL");
-    client.grantTablePrivilege(requestorUserName, requestorUserGroupNames, roleName2, "server", "db", "table2", "ALL");
-    client.grantTablePrivilege(requestorUserName, requestorUserGroupNames, roleName2, "server", "db", "table3", "ALL");
-    client.grantTablePrivilege(requestorUserName, requestorUserGroupNames, roleName2, "server", "db", "table4", "ALL");
+    client.grantTablePrivilege(requestorUserName,  roleName2, "server", "db", "table1", "ALL");
+    client.grantTablePrivilege(requestorUserName,  roleName2, "server", "db", "table2", "ALL");
+    client.grantTablePrivilege(requestorUserName,  roleName2, "server", "db", "table3", "ALL");
+    client.grantTablePrivilege(requestorUserName,  roleName2, "server", "db", "table4", "ALL");
 
-    Set<TSentryPrivilege> listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName, requestorUserGroupNames, roleName1);
+    Set<TSentryPrivilege> listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName,  roleName1);
     assertEquals("Privilege not assigned to role1 !!", 4, listPrivilegesByRoleName.size());
 
-    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName, requestorUserGroupNames, roleName2);
+    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName,  roleName2);
     assertEquals("Privilege not assigned to role2 !!", 4, listPrivilegesByRoleName.size());
 
 
-    client.revokeTablePrivilege(requestorUserName, requestorUserGroupNames, roleName1, "server", "db", "table1", "ALL");
-    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName, requestorUserGroupNames, roleName1);
+    client.revokeTablePrivilege(requestorUserName,  roleName1, "server", "db", "table1", "ALL");
+    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName,  roleName1);
     assertTrue("Privilege not correctly revoked !!", listPrivilegesByRoleName.size() == 3);
-    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName, requestorUserGroupNames, roleName2);
+    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName,  roleName2);
     assertTrue("Privilege not correctly revoked !!", listPrivilegesByRoleName.size() == 4);
 
-    client.revokeTablePrivilege(requestorUserName, requestorUserGroupNames, roleName2, "server", "db", "table1", "ALL");
-    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName, requestorUserGroupNames, roleName2);
+    client.revokeTablePrivilege(requestorUserName,  roleName2, "server", "db", "table1", "ALL");
+    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName,  roleName2);
     assertTrue("Privilege not correctly revoked !!", listPrivilegesByRoleName.size() == 3);
-    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName, requestorUserGroupNames, roleName1);
+    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName,  roleName1);
     assertTrue("Privilege not correctly revoked !!", listPrivilegesByRoleName.size() == 3);
 
-    client.revokeTablePrivilege(requestorUserName, requestorUserGroupNames, roleName1, "server", "db", "table2", "ALL");
-    client.revokeTablePrivilege(requestorUserName, requestorUserGroupNames, roleName1, "server", "db", "table3", "ALL");
-    client.revokeTablePrivilege(requestorUserName, requestorUserGroupNames, roleName1, "server", "db", "table4", "ALL");
-    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName, requestorUserGroupNames, roleName1);
+    client.revokeTablePrivilege(requestorUserName,  roleName1, "server", "db", "table2", "ALL");
+    client.revokeTablePrivilege(requestorUserName,  roleName1, "server", "db", "table3", "ALL");
+    client.revokeTablePrivilege(requestorUserName,  roleName1, "server", "db", "table4", "ALL");
+    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName,  roleName1);
     assertTrue("Privilege not correctly revoked !!", listPrivilegesByRoleName.size() == 0);
 
-    client.revokeTablePrivilege(requestorUserName, requestorUserGroupNames, roleName2, "server", "db", "table2", "ALL");
-    client.revokeTablePrivilege(requestorUserName, requestorUserGroupNames, roleName2, "server", "db", "table3", "ALL");
-    client.revokeTablePrivilege(requestorUserName, requestorUserGroupNames, roleName2, "server", "db", "table4", "ALL");
-    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName, requestorUserGroupNames, roleName2);
+    client.revokeTablePrivilege(requestorUserName,  roleName2, "server", "db", "table2", "ALL");
+    client.revokeTablePrivilege(requestorUserName,  roleName2, "server", "db", "table3", "ALL");
+    client.revokeTablePrivilege(requestorUserName,  roleName2, "server", "db", "table4", "ALL");
+    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName,  roleName2);
     assertTrue("Privilege not correctly revoked !!", listPrivilegesByRoleName.size() == 0);
   }
 
@@ -112,21 +116,23 @@ public class TestSentryServiceIntegration extends SentryServiceIntegrationBase {
   public void testMultipleRolesSamePrivilege() throws Exception {
     String requestorUserName = ADMIN_USER;
     Set<String> requestorUserGroupNames = Sets.newHashSet(ADMIN_GROUP);
+    setLocalGroupMapping(requestorUserName, requestorUserGroupNames);
+    writePolicyFile();
     String roleName1 = "admin_r1";
     String roleName2 = "admin_r2";
 
-    client.dropRoleIfExists(requestorUserName, requestorUserGroupNames,roleName1);
-    client.createRole(requestorUserName, requestorUserGroupNames, roleName1);
+    client.dropRoleIfExists(requestorUserName, roleName1);
+    client.createRole(requestorUserName,  roleName1);
 
-    client.dropRoleIfExists(requestorUserName, requestorUserGroupNames, roleName2);
-    client.createRole(requestorUserName, requestorUserGroupNames, roleName2);
+    client.dropRoleIfExists(requestorUserName,  roleName2);
+    client.createRole(requestorUserName,  roleName2);
 
-    client.grantTablePrivilege(requestorUserName, requestorUserGroupNames, roleName1, "server", "db", "table", "ALL");
-    Set<TSentryPrivilege> listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName, requestorUserGroupNames, roleName1);
+    client.grantTablePrivilege(requestorUserName,  roleName1, "server", "db", "table", "ALL");
+    Set<TSentryPrivilege> listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName,  roleName1);
     assertTrue("Privilege not assigned to role1 !!", listPrivilegesByRoleName.size() == 1);
 
-    client.grantTablePrivilege(requestorUserName, requestorUserGroupNames, roleName2, "server", "db", "table", "ALL");
-    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName, requestorUserGroupNames, roleName2);
+    client.grantTablePrivilege(requestorUserName,  roleName2, "server", "db", "table", "ALL");
+    listPrivilegesByRoleName = client.listPrivilegesByRoleName(requestorUserName,  roleName2);
     assertTrue("Privilege not assigned to role2 !!", listPrivilegesByRoleName.size() == 1);
   }
 
@@ -137,16 +143,17 @@ public class TestSentryServiceIntegration extends SentryServiceIntegrationBase {
     Set<String> requestorUserGroupNames = Sets.newHashSet(ADMIN_GROUP);
     String roleName = "admin_testdb";
     String groupName = "group1";
+    setLocalGroupMapping(requestorUserName, requestorUserGroupNames);
+    writePolicyFile();
 
-    client.dropRoleIfExists(requestorUserName, requestorUserGroupNames, roleName);
-    client.createRole(requestorUserName, requestorUserGroupNames, roleName);
+    client.dropRoleIfExists(requestorUserName, roleName);
+    client.createRole(requestorUserName, roleName);
 
     Set<TSentryRole> roles = client.listRoles(requestorUserName, requestorUserGroupNames);
     assertEquals("Incorrect number of roles", 1, roles.size());
 
-    client.grantRoleToGroup(requestorUserName, requestorUserGroupNames, groupName, roleName);
-    Set<TSentryRole> groupRoles = client.listRolesByGroupName(requestorUserName,
-        requestorUserGroupNames, groupName);
+    client.grantRoleToGroup(requestorUserName, groupName, roleName);
+    Set<TSentryRole> groupRoles = client.listRolesByGroupName(requestorUserName, groupName);
     assertTrue(groupRoles.size() == 1);
     for (TSentryRole role:groupRoles) {
       assertTrue(role.getRoleName(), role.getRoleName().equalsIgnoreCase(roleName));
@@ -156,7 +163,7 @@ public class TestSentryServiceIntegration extends SentryServiceIntegrationBase {
       }
     }
 
-    client.dropRole(requestorUserName, requestorUserGroupNames, roleName);
+    client.dropRole(requestorUserName, roleName);
   }
 
   @Test
@@ -166,24 +173,26 @@ public class TestSentryServiceIntegration extends SentryServiceIntegrationBase {
     String roleName = "admin_testdb";
     String server = "server1";
     String db = "testDB";
+    setLocalGroupMapping(requestorUserName, requestorUserGroupNames);
+    writePolicyFile();
 
-    client.dropRoleIfExists(requestorUserName, requestorUserGroupNames, roleName);
-    client.createRole(requestorUserName, requestorUserGroupNames, roleName);
+    client.dropRoleIfExists(requestorUserName, roleName);
+    client.createRole(requestorUserName, roleName);
 
     Set<TSentryRole> roles = client.listRoles(requestorUserName, requestorUserGroupNames);
     assertEquals("Incorrect number of roles", 1, roles.size());
 
-    client.grantDatabasePrivilege(requestorUserName, requestorUserGroupNames, roleName, server, db);
+    client.grantDatabasePrivilege(requestorUserName, roleName, server, db);
     Set<TSentryPrivilege> privileges = client.listPrivilegesByRoleName(requestorUserName,
-        requestorUserGroupNames, roleName);
+ roleName);
     assertTrue(privileges.size() == 1);
     for (TSentryPrivilege privilege:privileges) {
       assertTrue(privilege.getPrivilegeName(),
         privilege.getPrivilegeName().equalsIgnoreCase(SentryStore.constructPrivilegeName(privilege)));
     }
 
-    client.revokeDatabasePrivilege(requestorUserName, requestorUserGroupNames, roleName, server, db);
-    client.dropRole(requestorUserName, requestorUserGroupNames, roleName);
+    client.revokeDatabasePrivilege(requestorUserName, roleName, server, db);
+    client.dropRole(requestorUserName, roleName);
   }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java
index 07352ab..a98ddcb 100644
--- a/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java
+++ b/sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/service/thrift/SentryServiceIntegrationBase.java
@@ -20,6 +20,7 @@ package org.apache.sentry.service.thrift;
 import java.io.File;
 import java.security.PrivilegedExceptionAction;
 import java.util.HashSet;
+import java.util.Set;
 import java.util.concurrent.TimeoutException;
 
 import javax.security.auth.Subject;
@@ -31,6 +32,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.minikdc.KerberosSecurityTestcase;
 import org.apache.hadoop.minikdc.MiniKdc;
 import org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClient;
+import org.apache.sentry.provider.file.PolicyFile;
 import org.apache.sentry.service.thrift.ServiceConstants.ClientConfig;
 import org.apache.sentry.service.thrift.ServiceConstants.ServerConfig;
 import org.junit.After;
@@ -72,6 +74,8 @@ public abstract class SentryServiceIntegrationBase extends KerberosSecurityTestc
   protected LoginContext clientLoginContext;
   protected boolean kerberos;
   protected final Configuration conf = new Configuration(false);
+  protected PolicyFile policyFile;
+  protected File policyFilePath;
 
   @Before
   public void setup() throws Exception {
@@ -119,6 +123,12 @@ public abstract class SentryServiceIntegrationBase extends KerberosSecurityTestc
     server = new SentryServiceFactory().create(conf);
     conf.set(ClientConfig.SERVER_RPC_ADDRESS, server.getAddress().getHostString());
     conf.set(ClientConfig.SERVER_RPC_PORT, String.valueOf(server.getAddress().getPort()));
+    conf.set(ServerConfig.SENTRY_STORE_GROUP_MAPPING,
+        ServerConfig.SENTRY_STORE_LOCAL_GROUP_MAPPING);
+    policyFilePath = new File(dbDir, "local_policy_file.ini");
+    conf.set(ServerConfig.SENTRY_STORE_GROUP_MAPPING_RESOURCE,
+        policyFilePath.getPath());
+    policyFile = new PolicyFile();
   }
 
   public void connectToSentryService() throws Exception {
@@ -193,4 +203,14 @@ public abstract class SentryServiceIntegrationBase extends KerberosSecurityTestc
       Assert.fail(message);
     }
   }
+
+  protected void setLocalGroupMapping(String user, Set<String> groupSet) {
+    for (String group : groupSet) {
+      policyFile.addGroupsToUser(user, group);
+    }
+  }
+
+  protected void writePolicyFile() throws Exception {
+    policyFile.write(policyFilePath);
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/LocalGroupMappingService.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/LocalGroupMappingService.java b/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/LocalGroupMappingService.java
index a4d9cba..9b146d9 100644
--- a/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/LocalGroupMappingService.java
+++ b/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/LocalGroupMappingService.java
@@ -68,12 +68,19 @@ public class LocalGroupMappingService implements GroupMappingService {
   public LocalGroupMappingService(Path resourcePath) throws IOException {
     this(new Configuration(), resourcePath);
   }
+
   @VisibleForTesting
-  public LocalGroupMappingService(Configuration configuration, Path resourcePath) throws IOException {
+  public LocalGroupMappingService(Configuration configuration, Path resourcePath)
+      throws IOException {
     // parse user/group mapping
     parseGroups(resourcePath.getFileSystem(configuration), resourcePath);
   }
 
+  public LocalGroupMappingService(Configuration configuration, String resource)
+      throws IOException {
+    this(configuration, new Path(resource));
+  }
+
   @Override
   public Set<String> getGroups(String user) {
     if (groupMap.containsKey(user)) {

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/PolicyFile.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/PolicyFile.java b/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/PolicyFile.java
index 19bf8cc..ad95bb9 100644
--- a/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/PolicyFile.java
+++ b/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/PolicyFile.java
@@ -17,6 +17,19 @@
 
 package org.apache.sentry.provider.file;
 
+import static org.apache.sentry.provider.file.PolicyFileConstants.DATABASES;
+import static org.apache.sentry.provider.file.PolicyFileConstants.GROUPS;
+import static org.apache.sentry.provider.file.PolicyFileConstants.ROLES;
+import static org.apache.sentry.provider.file.PolicyFileConstants.USERS;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Charsets;
 import com.google.common.base.Joiner;
@@ -25,18 +38,6 @@ import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Multimap;
 import com.google.common.io.Files;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-import static org.apache.sentry.provider.file.PolicyFileConstants.DATABASES;
-import static org.apache.sentry.provider.file.PolicyFileConstants.GROUPS;
-import static org.apache.sentry.provider.file.PolicyFileConstants.ROLES;
-import static org.apache.sentry.provider.file.PolicyFileConstants.USERS;
 
 /**
  * PolicyFile creator. Written specifically to be used with tests. Specifically
@@ -119,6 +120,11 @@ public class PolicyFile {
     return other;
   }
 
+  public void write(File clientFile, File serverFile) throws Exception {
+    write(clientFile);
+    write(serverFile);
+  }
+
   public void write(File file) throws Exception {
     if(file.exists() && !file.delete()) {
       throw new IllegalStateException("Unable to delete " + file);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/Context.java
----------------------------------------------------------------------
diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/Context.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/Context.java
index ce374c2..4fc0068 100644
--- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/Context.java
+++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/Context.java
@@ -61,7 +61,7 @@ public class Context {
   private final File baseDir;
   private final File dataDir;
 
-  private final File policyFile;
+  private File policyFile;
   private final Set<Connection> connections;
   private final Set<Statement> statements;
 
@@ -217,6 +217,10 @@ public class Context {
     return policyFile;
   }
 
+  public void setPolicyFile(File policyFile) {
+    this.policyFile = policyFile;
+  }
+
   @SuppressWarnings("static-access")
   public URI getDFSUri() throws IOException {
     return fileSystem.getDefaultUri(fileSystem.getConf());

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestDatabaseProvider.java
----------------------------------------------------------------------
diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestDatabaseProvider.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestDatabaseProvider.java
index 7564829..fd28789 100644
--- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestDatabaseProvider.java
+++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestDatabaseProvider.java
@@ -17,8 +17,22 @@
 
 package org.apache.sentry.tests.e2e.hive;
 
-import com.google.common.collect.Maps;
-import com.google.common.io.Files;
+import static org.hamcrest.Matchers.equalToIgnoringCase;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeoutException;
+
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
@@ -31,25 +45,12 @@ import org.apache.sentry.service.thrift.ServiceConstants.ClientConfig;
 import org.apache.sentry.service.thrift.ServiceConstants.ServerConfig;
 import org.apache.sentry.tests.e2e.hive.hiveserver.HiveServerFactory;
 import org.junit.After;
-import static org.junit.Assert.assertThat;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 
-import static org.hamcrest.Matchers.*;
-
-import java.io.File;
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.TimeoutException;
-
-import static org.junit.Assert.assertTrue;
+import com.google.common.collect.Maps;
+import com.google.common.io.Files;
 
 public class TestDatabaseProvider extends AbstractTestWithHiveServer {
   protected static final String SERVER_HOST = "localhost";
@@ -60,12 +61,13 @@ public class TestDatabaseProvider extends AbstractTestWithHiveServer {
   private SentryService server;
   private Configuration conf;
   private PolicyFile policyFile;
+  private File policyFilePath;
 
   @Before
   public void setup() throws Exception {
     properties = Maps.newHashMap();
     conf = new Configuration(false);
-    policyFile = new PolicyFile();
+    policyFile = PolicyFile.setAdminOnServer1(ADMINGROUP);
     properties.put(HiveServerFactory.AUTHZ_PROVIDER_BACKEND, SimpleDBProviderBackend.class.getName());
     properties.put(ConfVars.HIVE_AUTHORIZATION_TASK_FACTORY.varname,
       SentryHiveAuthorizationTaskFactoryImpl.class.getName());
@@ -77,14 +79,25 @@ public class TestDatabaseProvider extends AbstractTestWithHiveServer {
     properties.put(ServerConfig.SENTRY_STORE_JDBC_URL,
         "jdbc:derby:;databaseName=" + dbDir.getPath() + ";create=true");
     properties.put(ServerConfig.SENTRY_VERIFY_SCHEM_VERSION, "false");
+    properties.put(ServerConfig.SENTRY_STORE_GROUP_MAPPING,
+        ServerConfig.SENTRY_STORE_LOCAL_GROUP_MAPPING);
+    policyFilePath = new File(Files.createTempDir(), "sentry-policy-file.ini");
+    policyFile.write(policyFilePath);
+    properties.put(ServerConfig.SENTRY_STORE_GROUP_MAPPING_RESOURCE,
+        policyFilePath.getPath());
     for (Map.Entry<String, String> entry : properties.entrySet()) {
       conf.set(entry.getKey(), entry.getValue());
     }
     server = new SentryServiceFactory().create(conf);
-    properties.put(ClientConfig.SERVER_RPC_ADDRESS, server.getAddress().getHostString());
-    properties.put(ClientConfig.SERVER_RPC_PORT, String.valueOf(server.getAddress().getPort()));
-    startSentryService();
+
+    properties.put(ClientConfig.SERVER_RPC_ADDRESS, server.getAddress()
+        .getHostString());
+    properties.put(ClientConfig.SERVER_RPC_PORT,
+        String.valueOf(server.getAddress().getPort()));
+
     context = createContext(properties);
+    policyFile.write(context.getPolicyFile());
+    startSentryService();
   }
 
   @After
@@ -115,9 +128,8 @@ public class TestDatabaseProvider extends AbstractTestWithHiveServer {
   @Ignore
   @Test
   public void beelineTest() throws Exception{
-    policyFile
-        .setUserGroupMapping(StaticUserGroup.getStaticMapping())
-        .write(context.getPolicyFile());
+    policyFile.setUserGroupMapping(StaticUserGroup.getStaticMapping()).write(
+        context.getPolicyFile());
     while(true) {}
   }
 
@@ -125,7 +137,7 @@ public class TestDatabaseProvider extends AbstractTestWithHiveServer {
   public void testBasic() throws Exception {
     policyFile
       .setUserGroupMapping(StaticUserGroup.getStaticMapping())
-      .write(context.getPolicyFile());
+      .write(context.getPolicyFile(), policyFilePath);
     Connection connection = context.createConnection(ADMIN1);
     Statement statement = context.createStatement(connection);
     statement.execute("CREATE ROLE admin_role");
@@ -162,8 +174,8 @@ public class TestDatabaseProvider extends AbstractTestWithHiveServer {
   @Test
   public void testShowRoles() throws Exception {
     policyFile
-        .setUserGroupMapping(StaticUserGroup.getStaticMapping())
-        .write(context.getPolicyFile());
+      .setUserGroupMapping(StaticUserGroup.getStaticMapping())
+      .write(context.getPolicyFile(), policyFilePath);
     Connection connection = context.createConnection(ADMIN1);
     Statement statement = context.createStatement(connection);
     statement.execute("CREATE ROLE role1");
@@ -191,8 +203,8 @@ public class TestDatabaseProvider extends AbstractTestWithHiveServer {
   @Test
   public void testShowRolesByGroup() throws Exception {
     policyFile
-        .setUserGroupMapping(StaticUserGroup.getStaticMapping())
-        .write(context.getPolicyFile());
+      .setUserGroupMapping(StaticUserGroup.getStaticMapping())
+      .write(context.getPolicyFile(), policyFilePath);
     Connection connection = context.createConnection(ADMIN1);
     Statement statement = context.createStatement(connection);
     statement.execute("CREATE ROLE role1");
@@ -225,8 +237,8 @@ public class TestDatabaseProvider extends AbstractTestWithHiveServer {
   @Test
   public void testShowPrivilegesByRole() throws Exception {
     policyFile
-        .setUserGroupMapping(StaticUserGroup.getStaticMapping())
-        .write(context.getPolicyFile());
+      .setUserGroupMapping(StaticUserGroup.getStaticMapping())  
+      .write(context.getPolicyFile(), policyFilePath);
     Connection connection = context.createConnection(ADMIN1);
     Statement statement = context.createStatement(connection);
     statement.execute("CREATE ROLE role1");
@@ -273,8 +285,8 @@ public class TestDatabaseProvider extends AbstractTestWithHiveServer {
   @Test
   public void testShowPrivilegesByRoleAndObject() throws Exception {
     policyFile
-        .setUserGroupMapping(StaticUserGroup.getStaticMapping())
-        .write(context.getPolicyFile());
+      .setUserGroupMapping(StaticUserGroup.getStaticMapping())
+      .write(context.getPolicyFile(), policyFilePath);
     Connection connection = context.createConnection(ADMIN1);
     Statement statement = context.createStatement(connection);
     statement.execute("CREATE ROLE role1");
@@ -296,7 +308,8 @@ public class TestDatabaseProvider extends AbstractTestWithHiveServer {
   public void testShowCurrentRole() throws Exception {
     policyFile
         .setUserGroupMapping(StaticUserGroup.getStaticMapping())
-        .write(context.getPolicyFile());
+.write(
+        policyFilePath);
     Connection connection = context.createConnection(ADMIN1);
     Statement statement = context.createStatement(connection);
     statement.execute("CREATE ROLE role1");


[3/3] git commit: SENTRY-191: Sentry Policy Service should not require passing the RPC requestor's user/group information ( Prasad Mujumdar via Sravya Tirukkovalur)

Posted by sr...@apache.org.
SENTRY-191: Sentry Policy Service should not require passing the RPC requestor's user/group information ( Prasad Mujumdar via Sravya Tirukkovalur)


Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/61a67cb9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/61a67cb9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/61a67cb9

Branch: refs/heads/master
Commit: 61a67cb956fe5552b15b335c2b9fb8fc4b8d2620
Parents: af795c0
Author: Sravya Tirukkovalur <sr...@clouera.com>
Authored: Wed May 28 23:38:11 2014 -0700
Committer: Sravya Tirukkovalur <sr...@clouera.com>
Committed: Wed May 28 23:38:39 2014 -0700

----------------------------------------------------------------------
 .../hive/ql/exec/SentryGrantRevokeTask.java     |  54 +++--
 .../provider/common/AuthorizationProvider.java  |   2 +
 .../common/HadoopGroupMappingService.java       |   6 +-
 sentry-provider/sentry-provider-db/pom.xml      |   5 +
 .../TAlterSentryRoleAddGroupsRequest.java       | 197 +++----------------
 .../TAlterSentryRoleDeleteGroupsRequest.java    | 197 +++----------------
 .../TAlterSentryRoleGrantPrivilegeRequest.java  | 161 +--------------
 .../TAlterSentryRoleRevokePrivilegeRequest.java | 161 +--------------
 .../thrift/TCreateSentryRoleRequest.java        | 161 +--------------
 .../service/thrift/TDropSentryRoleRequest.java  | 161 +--------------
 ...TListSentryPrivilegesForProviderRequest.java |  32 +--
 ...ListSentryPrivilegesForProviderResponse.java |  32 +--
 .../thrift/TListSentryPrivilegesRequest.java    | 161 +--------------
 .../thrift/TListSentryPrivilegesResponse.java   |  36 ++--
 .../service/thrift/TListSentryRolesRequest.java | 163 +--------------
 .../thrift/TListSentryRolesResponse.java        |  36 ++--
 .../db/service/thrift/TSentryActiveRoleSet.java |  32 +--
 .../provider/db/service/thrift/TSentryRole.java |  36 ++--
 .../thrift/SentryPolicyServiceClient.java       |  84 ++++----
 .../thrift/SentryPolicyStoreProcessor.java      |  56 +++++-
 .../sentry/service/thrift/ServiceConstants.java |   6 +
 .../main/resources/sentry_policy_service.thrift |  26 +--
 .../thrift/TestSentryServerWithoutKerberos.java |   8 +-
 .../thrift/TestSentryServiceIntegration.java    | 125 ++++++------
 .../thrift/SentryServiceIntegrationBase.java    |  20 ++
 .../provider/file/LocalGroupMappingService.java |   9 +-
 .../apache/sentry/provider/file/PolicyFile.java |  30 +--
 .../apache/sentry/tests/e2e/hive/Context.java   |   6 +-
 .../tests/e2e/hive/TestDatabaseProvider.java    |  81 ++++----
 29 files changed, 481 insertions(+), 1603 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java b/sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java
index faa71c7..f1e6247 100644
--- a/sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java
+++ b/sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryGrantRevokeTask.java
@@ -111,27 +111,26 @@ public class SentryGrantRevokeTask extends Task<DDLWork> implements Serializable
       Preconditions.checkNotNull(hiveAuthzBinding, "HiveAuthzBinding cannot be null");
       Preconditions.checkNotNull(authzConf, "HiveAuthConf cannot be null");
       Preconditions.checkNotNull(subject, "Subject cannot be null");
-      Preconditions.checkNotNull(subjectGroups, "Subject Groups cannot be null");
       server = Preconditions.checkNotNull(authzConf.get(AuthzConfVars.AUTHZ_SERVER_NAME.getVar()),
           "Config " + AuthzConfVars.AUTHZ_SERVER_NAME.getVar() + " is required");
       if (work.getRoleDDLDesc() != null) {
-        return processRoleDDL(conf, console, sentryClient, subject.getName(), subjectGroups,
+        return processRoleDDL(conf, console, sentryClient, subject.getName(),
             hiveAuthzBinding, work.getRoleDDLDesc());
       }
       if (work.getGrantDesc() != null) {
-        return processGrantDDL(conf, console, sentryClient, subject.getName(), subjectGroups,
+        return processGrantDDL(conf, console, sentryClient, subject.getName(),
             server, work.getGrantDesc());
       }
       if (work.getRevokeDesc() != null) {
-        return processRevokeDDL(conf, console, sentryClient, subject.getName(), subjectGroups,
+        return processRevokeDDL(conf, console, sentryClient, subject.getName(),
             server, work.getRevokeDesc());
       }
       if (work.getShowGrantDesc() != null) {
-        return processShowGrantDDL(conf, console, sentryClient, subject.getName(), subjectGroups,
+        return processShowGrantDDL(conf, console, sentryClient, subject.getName(),
             work.getShowGrantDesc());
       }
       if (work.getGrantRevokeRoleDDL() != null) {
-        return processGrantRevokeRoleDDL(conf, console, sentryClient, subject.getName(), subjectGroups,
+        return processGrantRevokeRoleDDL(conf, console, sentryClient, subject.getName(),
             work.getGrantRevokeRoleDDL());
       }
       throw new AssertionError("Unknown command passed to Sentry Grant/Revoke Task");
@@ -171,7 +170,7 @@ public class SentryGrantRevokeTask extends Task<DDLWork> implements Serializable
 
   private int processRoleDDL(HiveConf conf, LogHelper console,
       SentryPolicyServiceClient sentryClient, String subject,
-      Set<String> subjectGroups, HiveAuthzBinding hiveAuthzBinding, RoleDDLDesc desc)
+      HiveAuthzBinding hiveAuthzBinding, RoleDDLDesc desc)
           throws SentryUserException {
     RoleDDLDesc.RoleOperation operation = desc.getOperation();
     DataOutputStream outStream = null;
@@ -181,10 +180,10 @@ public class SentryGrantRevokeTask extends Task<DDLWork> implements Serializable
         hiveAuthzBinding.setActiveRoleSet(name);
         return RETURN_CODE_SUCCESS;
       } else if (operation.equals(RoleDDLDesc.RoleOperation.CREATE_ROLE)) {
-        sentryClient.createRole(subject, subjectGroups, name);
+        sentryClient.createRole(subject, name);
         return RETURN_CODE_SUCCESS;
       } else if (operation.equals(RoleDDLDesc.RoleOperation.DROP_ROLE)) {
-        sentryClient.dropRole(subject, subjectGroups, name);
+        sentryClient.dropRole(subject, name);
         return RETURN_CODE_SUCCESS;
       } else if (operation.equals(RoleDDLDesc.RoleOperation.SHOW_ROLE_GRANT)) {
         Set<TSentryRole> roles;
@@ -193,7 +192,7 @@ public class SentryGrantRevokeTask extends Task<DDLWork> implements Serializable
           String msg = SentryHiveConstants.GRANT_REVOKE_NOT_SUPPORTED_FOR_PRINCIPAL + principalType;
           throw new HiveException(msg);
         }
-        roles = sentryClient.listRolesByGroupName(subject, subjectGroups, desc.getName() );
+        roles = sentryClient.listRolesByGroupName(subject, desc.getName() );
         writeToFile(writeRoleGrantsInfo(roles), desc.getResFile());
         return RETURN_CODE_SUCCESS;
       } else if(operation.equals(RoleDDLDesc.RoleOperation.SHOW_ROLES)) {
@@ -234,22 +233,22 @@ public class SentryGrantRevokeTask extends Task<DDLWork> implements Serializable
 
   private int processGrantDDL(HiveConf conf, LogHelper console,
       SentryPolicyServiceClient sentryClient, String subject,
-      Set<String> subjectGroups, String server, GrantDesc desc) throws SentryUserException {
-    return processGrantRevokeDDL(console, sentryClient, subject, subjectGroups,
+      String server, GrantDesc desc) throws SentryUserException {
+    return processGrantRevokeDDL(console, sentryClient, subject, 
         server, true, desc.getPrincipals(), desc.getPrivileges(), desc.getPrivilegeSubjectDesc());
   }
 
 
   private int processRevokeDDL(HiveConf conf, LogHelper console,
       SentryPolicyServiceClient sentryClient, String subject,
-      Set<String> subjectGroups, String server, RevokeDesc desc) throws SentryUserException {
-    return processGrantRevokeDDL(console, sentryClient, subject, subjectGroups,
+      String server, RevokeDesc desc) throws SentryUserException {
+    return processGrantRevokeDDL(console, sentryClient, subject, 
         server, false, desc.getPrincipals(), desc.getPrivileges(),
         desc.getPrivilegeSubjectDesc());
   }
 
   private int processShowGrantDDL(HiveConf conf, LogHelper console, SentryPolicyServiceClient sentryClient,
-      String subject, Set<String> subjectGroups, ShowGrantDesc desc) throws SentryUserException{
+      String subject, ShowGrantDesc desc) throws SentryUserException{
     PrincipalDesc principalDesc = desc.getPrincipalDesc();
     PrivilegeObjectDesc hiveObjectDesc = desc.getHiveObj();
     String principalName = principalDesc.getName();
@@ -258,7 +257,7 @@ public class SentryGrantRevokeTask extends Task<DDLWork> implements Serializable
 
     try {
       if (hiveObjectDesc == null) {
-        privileges = sentryClient.listPrivilegesByRoleName(subject, subjectGroups, principalName);
+        privileges = sentryClient.listPrivilegesByRoleName(subject, principalName);
         writeToFile(writeGrantInfo(privileges, principalName), desc.getResFile());
         return RETURN_CODE_SUCCESS;
       } else {
@@ -289,7 +288,7 @@ public class SentryGrantRevokeTask extends Task<DDLWork> implements Serializable
   }
 
   private int processGrantRevokeRoleDDL(HiveConf conf, LogHelper console,
-      SentryPolicyServiceClient sentryClient, String subject, Set<String> subjectGroups,
+      SentryPolicyServiceClient sentryClient, String subject,
       GrantRevokeRoleDDL desc) throws SentryUserException {
     try {
       boolean grantRole = desc.getGrant();
@@ -304,9 +303,9 @@ public class SentryGrantRevokeTask extends Task<DDLWork> implements Serializable
         String groupName = principal.getName();
         for (String roleName : roles) {
           if (grantRole) {
-            sentryClient.grantRoleToGroup(subject, subjectGroups, groupName, roleName);
+            sentryClient.grantRoleToGroup(subject, groupName, roleName);
           } else {
-            sentryClient.revokeRoleFromGroup(subject, subjectGroups, groupName, roleName);
+            sentryClient.revokeRoleFromGroup(subject, groupName, roleName);
           }
         }
       }
@@ -400,8 +399,7 @@ public class SentryGrantRevokeTask extends Task<DDLWork> implements Serializable
   }
 
   private static int processGrantRevokeDDL(LogHelper console,
-      SentryPolicyServiceClient sentryClient, String subject,
-      Set<String> subjectGroups, String server,
+      SentryPolicyServiceClient sentryClient, String subject, String server,
       boolean isGrant, List<PrincipalDesc> principals,
  List<PrivilegeDesc> privileges,
       PrivilegeObjectDesc privSubjectObjDesc) throws SentryUserException {
@@ -458,22 +456,20 @@ public class SentryGrantRevokeTask extends Task<DDLWork> implements Serializable
         for (PrivilegeDesc privDesc : privileges) {
           if (isGrant) {
             if (serverName != null) {
-              sentryClient.grantServerPrivilege(subject, subjectGroups,
-                  princ.getName(), serverName);
+              sentryClient.grantServerPrivilege(subject, princ.getName(), serverName);
             } else if (uriPath != null) {
-              sentryClient.grantURIPrivilege(subject, subjectGroups,
-                  princ.getName(), server, uriPath);
+              sentryClient.grantURIPrivilege(subject, princ.getName(), server, uriPath);
             } else if (tableName == null) {
-              sentryClient.grantDatabasePrivilege(subject, subjectGroups, princ.getName(), server, dbName);
+              sentryClient.grantDatabasePrivilege(subject, princ.getName(), server, dbName);
             } else {
-              sentryClient.grantTablePrivilege(subject, subjectGroups, princ.getName(), server, dbName,
+              sentryClient.grantTablePrivilege(subject, princ.getName(), server, dbName,
                   tableName, privDesc.getPrivilege().getPriv().name());
             }
           } else {
             if (tableName == null) {
-              sentryClient.revokeDatabasePrivilege(subject, subjectGroups, princ.getName(), server, dbName);
+              sentryClient.revokeDatabasePrivilege(subject, princ.getName(), server, dbName);
             } else {
-              sentryClient.revokeTablePrivilege(subject, subjectGroups, princ.getName(), server, dbName,
+              sentryClient.revokeTablePrivilege(subject, princ.getName(), server, dbName,
                   tableName, privDesc.getPrivilege().getPriv().name());
             }
           }

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/AuthorizationProvider.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/AuthorizationProvider.java b/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/AuthorizationProvider.java
index de774f4..a88d2f8 100644
--- a/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/AuthorizationProvider.java
+++ b/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/AuthorizationProvider.java
@@ -33,6 +33,8 @@ import org.apache.sentry.core.common.Subject;
 @ThreadSafe
 public interface AuthorizationProvider {
 
+  public static String SENTRY_PROVIDER = "sentry.provider";
+
   /***
    * Returns validate subject privileges on given Authorizable object
    *

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/HadoopGroupMappingService.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/HadoopGroupMappingService.java b/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/HadoopGroupMappingService.java
index 6c8fa95..14e2d05 100644
--- a/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/HadoopGroupMappingService.java
+++ b/sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/HadoopGroupMappingService.java
@@ -21,8 +21,8 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.security.Groups;
-import org.apache.sentry.provider.common.GroupMappingService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -36,6 +36,10 @@ public class HadoopGroupMappingService implements GroupMappingService {
     this.groups = groups;
   }
 
+  public HadoopGroupMappingService(Configuration conf, String resource) {
+    this(Groups.getUserToGroupsMappingService(conf));
+  }
+
   @Override
   public Set<String> getGroups(String user) {
     try {

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/pom.xml
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/pom.xml b/sentry-provider/sentry-provider-db/pom.xml
index fca6c52..e0532ca 100644
--- a/sentry-provider/sentry-provider-db/pom.xml
+++ b/sentry-provider/sentry-provider-db/pom.xml
@@ -83,6 +83,11 @@ limitations under the License.
       <artifactId>sentry-provider-common</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.apache.sentry</groupId>
+      <artifactId>sentry-provider-file</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.hive</groupId>
       <artifactId>hive-shims</artifactId>
       <scope>provided</scope>

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/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 2701837..21efbd0 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,7 @@ 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 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 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 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,7 +47,6 @@ 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<TSentryGroup> groups; // required
 
@@ -56,8 +54,7 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     PROTOCOL_VERSION((short)1, "protocol_version"),
     REQUESTOR_USER_NAME((short)2, "requestorUserName"),
-    REQUESTOR_GROUP_NAMES((short)3, "requestorGroupNames"),
-    ROLE_NAME((short)4, "roleName"),
+    ROLE_NAME((short)3, "roleName"),
     GROUPS((short)5, "groups");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -77,9 +74,7 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
           return PROTOCOL_VERSION;
         case 2: // REQUESTOR_USER_NAME
           return REQUESTOR_USER_NAME;
-        case 3: // REQUESTOR_GROUP_NAMES
-          return REQUESTOR_GROUP_NAMES;
-        case 4: // ROLE_NAME
+        case 3: // ROLE_NAME
           return ROLE_NAME;
         case 5: // GROUPS
           return GROUPS;
@@ -132,9 +127,6 @@ 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.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, 
@@ -152,7 +144,6 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
   public TAlterSentryRoleAddGroupsRequest(
     int protocol_version,
     String requestorUserName,
-    Set<String> requestorGroupNames,
     String roleName,
     Set<TSentryGroup> groups)
   {
@@ -160,7 +151,6 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
     this.protocol_version = protocol_version;
     setProtocol_versionIsSet(true);
     this.requestorUserName = requestorUserName;
-    this.requestorGroupNames = requestorGroupNames;
     this.roleName = roleName;
     this.groups = groups;
   }
@@ -174,13 +164,6 @@ 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;
     }
@@ -202,7 +185,6 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
     this.protocol_version = 1;
 
     this.requestorUserName = null;
-    this.requestorGroupNames = null;
     this.roleName = null;
     this.groups = null;
   }
@@ -252,44 +234,6 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
     }
   }
 
-  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;
-  }
-
-  /** Returns true if field requestorGroupNames is set (has been assigned a value) and false otherwise */
-  public boolean isSetRequestorGroupNames() {
-    return this.requestorGroupNames != null;
-  }
-
-  public void setRequestorGroupNamesIsSet(boolean value) {
-    if (!value) {
-      this.requestorGroupNames = null;
-    }
-  }
-
   public String getRoleName() {
     return this.roleName;
   }
@@ -369,14 +313,6 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
       }
       break;
 
-    case REQUESTOR_GROUP_NAMES:
-      if (value == null) {
-        unsetRequestorGroupNames();
-      } else {
-        setRequestorGroupNames((Set<String>)value);
-      }
-      break;
-
     case ROLE_NAME:
       if (value == null) {
         unsetRoleName();
@@ -404,9 +340,6 @@ 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();
 
@@ -428,8 +361,6 @@ 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 GROUPS:
@@ -469,15 +400,6 @@ 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) {
@@ -513,11 +435,6 @@ 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)
@@ -559,16 +476,6 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
         return lastComparison;
       }
     }
-    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;
@@ -621,14 +528,6 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
     }
     first = false;
     if (!first) sb.append(", ");
-    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");
@@ -658,10 +557,6 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' 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());
     }
@@ -725,25 +620,7 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // REQUESTOR_GROUP_NAMES
-            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
-              {
-                org.apache.thrift.protocol.TSet _set16 = iprot.readSetBegin();
-                struct.requestorGroupNames = new HashSet<String>(2*_set16.size);
-                for (int _i17 = 0; _i17 < _set16.size; ++_i17)
-                {
-                  String _elem18; // required
-                  _elem18 = iprot.readString();
-                  struct.requestorGroupNames.add(_elem18);
-                }
-                iprot.readSetEnd();
-              }
-              struct.setRequestorGroupNamesIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // ROLE_NAME
+          case 3: // ROLE_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.roleName = iprot.readString();
               struct.setRoleNameIsSet(true);
@@ -754,14 +631,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 _set19 = iprot.readSetBegin();
-                struct.groups = new HashSet<TSentryGroup>(2*_set19.size);
-                for (int _i20 = 0; _i20 < _set19.size; ++_i20)
+                org.apache.thrift.protocol.TSet _set0 = iprot.readSetBegin();
+                struct.groups = new HashSet<TSentryGroup>(2*_set0.size);
+                for (int _i1 = 0; _i1 < _set0.size; ++_i1)
                 {
-                  TSentryGroup _elem21; // required
-                  _elem21 = new TSentryGroup();
-                  _elem21.read(iprot);
-                  struct.groups.add(_elem21);
+                  TSentryGroup _elem2; // required
+                  _elem2 = new TSentryGroup();
+                  _elem2.read(iprot);
+                  struct.groups.add(_elem2);
                 }
                 iprot.readSetEnd();
               }
@@ -791,18 +668,6 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
         oprot.writeString(struct.requestorUserName);
         oprot.writeFieldEnd();
       }
-      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.requestorGroupNames.size()));
-          for (String _iter22 : struct.requestorGroupNames)
-          {
-            oprot.writeString(_iter22);
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
       if (struct.roleName != null) {
         oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
         oprot.writeString(struct.roleName);
@@ -812,9 +677,9 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
         oprot.writeFieldBegin(GROUPS_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.groups.size()));
-          for (TSentryGroup _iter23 : struct.groups)
+          for (TSentryGroup _iter3 : struct.groups)
           {
-            _iter23.write(oprot);
+            _iter3.write(oprot);
           }
           oprot.writeSetEnd();
         }
@@ -839,19 +704,12 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeI32(struct.protocol_version);
       oprot.writeString(struct.requestorUserName);
-      {
-        oprot.writeI32(struct.requestorGroupNames.size());
-        for (String _iter24 : struct.requestorGroupNames)
-        {
-          oprot.writeString(_iter24);
-        }
-      }
       oprot.writeString(struct.roleName);
       {
         oprot.writeI32(struct.groups.size());
-        for (TSentryGroup _iter25 : struct.groups)
+        for (TSentryGroup _iter4 : struct.groups)
         {
-          _iter25.write(oprot);
+          _iter4.write(oprot);
         }
       }
     }
@@ -863,28 +721,17 @@ public class TAlterSentryRoleAddGroupsRequest implements org.apache.thrift.TBase
       struct.setProtocol_versionIsSet(true);
       struct.requestorUserName = iprot.readString();
       struct.setRequestorUserNameIsSet(true);
-      {
-        org.apache.thrift.protocol.TSet _set26 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.requestorGroupNames = new HashSet<String>(2*_set26.size);
-        for (int _i27 = 0; _i27 < _set26.size; ++_i27)
-        {
-          String _elem28; // required
-          _elem28 = iprot.readString();
-          struct.requestorGroupNames.add(_elem28);
-        }
-      }
-      struct.setRequestorGroupNamesIsSet(true);
       struct.roleName = iprot.readString();
       struct.setRoleNameIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set29 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.groups = new HashSet<TSentryGroup>(2*_set29.size);
-        for (int _i30 = 0; _i30 < _set29.size; ++_i30)
+        org.apache.thrift.protocol.TSet _set5 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.groups = new HashSet<TSentryGroup>(2*_set5.size);
+        for (int _i6 = 0; _i6 < _set5.size; ++_i6)
         {
-          TSentryGroup _elem31; // required
-          _elem31 = new TSentryGroup();
-          _elem31.read(iprot);
-          struct.groups.add(_elem31);
+          TSentryGroup _elem7; // required
+          _elem7 = new TSentryGroup();
+          _elem7.read(iprot);
+          struct.groups.add(_elem7);
         }
       }
       struct.setGroupsIsSet(true);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/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 c5c13cd..58e9870 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,8 +36,7 @@ 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_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 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 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,7 +47,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
 
   private int protocol_version; // required
   private String requestorUserName; // required
-  private Set<String> requestorGroupNames; // required
   private String roleName; // required
   private Set<TSentryGroup> groups; // required
 
@@ -56,8 +54,7 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     PROTOCOL_VERSION((short)1, "protocol_version"),
     REQUESTOR_USER_NAME((short)2, "requestorUserName"),
-    REQUESTOR_GROUP_NAMES((short)3, "requestorGroupNames"),
-    ROLE_NAME((short)4, "roleName"),
+    ROLE_NAME((short)3, "roleName"),
     GROUPS((short)5, "groups");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -77,9 +74,7 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
           return PROTOCOL_VERSION;
         case 2: // REQUESTOR_USER_NAME
           return REQUESTOR_USER_NAME;
-        case 3: // REQUESTOR_GROUP_NAMES
-          return REQUESTOR_GROUP_NAMES;
-        case 4: // ROLE_NAME
+        case 3: // ROLE_NAME
           return ROLE_NAME;
         case 5: // GROUPS
           return GROUPS;
@@ -132,9 +127,6 @@ 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_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, 
@@ -152,7 +144,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
   public TAlterSentryRoleDeleteGroupsRequest(
     int protocol_version,
     String requestorUserName,
-    Set<String> requestorGroupNames,
     String roleName,
     Set<TSentryGroup> groups)
   {
@@ -160,7 +151,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     this.protocol_version = protocol_version;
     setProtocol_versionIsSet(true);
     this.requestorUserName = requestorUserName;
-    this.requestorGroupNames = requestorGroupNames;
     this.roleName = roleName;
     this.groups = groups;
   }
@@ -174,13 +164,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     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;
     }
@@ -202,7 +185,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     this.protocol_version = 1;
 
     this.requestorUserName = null;
-    this.requestorGroupNames = null;
     this.roleName = null;
     this.groups = null;
   }
@@ -252,44 +234,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     }
   }
 
-  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;
-  }
-
-  /** Returns true if field requestorGroupNames is set (has been assigned a value) and false otherwise */
-  public boolean isSetRequestorGroupNames() {
-    return this.requestorGroupNames != null;
-  }
-
-  public void setRequestorGroupNamesIsSet(boolean value) {
-    if (!value) {
-      this.requestorGroupNames = null;
-    }
-  }
-
   public String getRoleName() {
     return this.roleName;
   }
@@ -369,14 +313,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
       }
       break;
 
-    case REQUESTOR_GROUP_NAMES:
-      if (value == null) {
-        unsetRequestorGroupNames();
-      } else {
-        setRequestorGroupNames((Set<String>)value);
-      }
-      break;
-
     case ROLE_NAME:
       if (value == null) {
         unsetRoleName();
@@ -404,9 +340,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     case REQUESTOR_USER_NAME:
       return getRequestorUserName();
 
-    case REQUESTOR_GROUP_NAMES:
-      return getRequestorGroupNames();
-
     case ROLE_NAME:
       return getRoleName();
 
@@ -428,8 +361,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
       return isSetProtocol_version();
     case REQUESTOR_USER_NAME:
       return isSetRequestorUserName();
-    case REQUESTOR_GROUP_NAMES:
-      return isSetRequestorGroupNames();
     case ROLE_NAME:
       return isSetRoleName();
     case GROUPS:
@@ -469,15 +400,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
         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) {
@@ -513,11 +435,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     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)
@@ -559,16 +476,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
         return lastComparison;
       }
     }
-    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;
@@ -621,14 +528,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
     }
     first = false;
     if (!first) sb.append(", ");
-    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");
@@ -658,10 +557,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' 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());
     }
@@ -725,25 +620,7 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // REQUESTOR_GROUP_NAMES
-            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
-              {
-                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 _elem34; // required
-                  _elem34 = iprot.readString();
-                  struct.requestorGroupNames.add(_elem34);
-                }
-                iprot.readSetEnd();
-              }
-              struct.setRequestorGroupNamesIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // ROLE_NAME
+          case 3: // ROLE_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.roleName = iprot.readString();
               struct.setRoleNameIsSet(true);
@@ -754,14 +631,14 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
           case 5: // GROUPS
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set35 = iprot.readSetBegin();
-                struct.groups = new HashSet<TSentryGroup>(2*_set35.size);
-                for (int _i36 = 0; _i36 < _set35.size; ++_i36)
+                org.apache.thrift.protocol.TSet _set8 = iprot.readSetBegin();
+                struct.groups = new HashSet<TSentryGroup>(2*_set8.size);
+                for (int _i9 = 0; _i9 < _set8.size; ++_i9)
                 {
-                  TSentryGroup _elem37; // required
-                  _elem37 = new TSentryGroup();
-                  _elem37.read(iprot);
-                  struct.groups.add(_elem37);
+                  TSentryGroup _elem10; // required
+                  _elem10 = new TSentryGroup();
+                  _elem10.read(iprot);
+                  struct.groups.add(_elem10);
                 }
                 iprot.readSetEnd();
               }
@@ -791,18 +668,6 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
         oprot.writeString(struct.requestorUserName);
         oprot.writeFieldEnd();
       }
-      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.requestorGroupNames.size()));
-          for (String _iter38 : struct.requestorGroupNames)
-          {
-            oprot.writeString(_iter38);
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
       if (struct.roleName != null) {
         oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
         oprot.writeString(struct.roleName);
@@ -812,9 +677,9 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
         oprot.writeFieldBegin(GROUPS_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.groups.size()));
-          for (TSentryGroup _iter39 : struct.groups)
+          for (TSentryGroup _iter11 : struct.groups)
           {
-            _iter39.write(oprot);
+            _iter11.write(oprot);
           }
           oprot.writeSetEnd();
         }
@@ -839,19 +704,12 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeI32(struct.protocol_version);
       oprot.writeString(struct.requestorUserName);
-      {
-        oprot.writeI32(struct.requestorGroupNames.size());
-        for (String _iter40 : struct.requestorGroupNames)
-        {
-          oprot.writeString(_iter40);
-        }
-      }
       oprot.writeString(struct.roleName);
       {
         oprot.writeI32(struct.groups.size());
-        for (TSentryGroup _iter41 : struct.groups)
+        for (TSentryGroup _iter12 : struct.groups)
         {
-          _iter41.write(oprot);
+          _iter12.write(oprot);
         }
       }
     }
@@ -863,28 +721,17 @@ public class TAlterSentryRoleDeleteGroupsRequest implements org.apache.thrift.TB
       struct.setProtocol_versionIsSet(true);
       struct.requestorUserName = iprot.readString();
       struct.setRequestorUserNameIsSet(true);
-      {
-        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 _elem44; // required
-          _elem44 = iprot.readString();
-          struct.requestorGroupNames.add(_elem44);
-        }
-      }
-      struct.setRequestorGroupNamesIsSet(true);
       struct.roleName = iprot.readString();
       struct.setRoleNameIsSet(true);
       {
-        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)
+        org.apache.thrift.protocol.TSet _set13 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.groups = new HashSet<TSentryGroup>(2*_set13.size);
+        for (int _i14 = 0; _i14 < _set13.size; ++_i14)
         {
-          TSentryGroup _elem47; // required
-          _elem47 = new TSentryGroup();
-          _elem47.read(iprot);
-          struct.groups.add(_elem47);
+          TSentryGroup _elem15; // required
+          _elem15 = new TSentryGroup();
+          _elem15.read(iprot);
+          struct.groups.add(_elem15);
         }
       }
       struct.setGroupsIsSet(true);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/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 d934d54..62b6b31 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,7 @@ 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 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 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 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,7 +47,6 @@ 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 TSentryPrivilege privilege; // required
 
@@ -56,8 +54,7 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     PROTOCOL_VERSION((short)1, "protocol_version"),
     REQUESTOR_USER_NAME((short)2, "requestorUserName"),
-    REQUESTOR_GROUP_NAMES((short)3, "requestorGroupNames"),
-    ROLE_NAME((short)4, "roleName"),
+    ROLE_NAME((short)3, "roleName"),
     PRIVILEGE((short)5, "privilege");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -77,9 +74,7 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
           return PROTOCOL_VERSION;
         case 2: // REQUESTOR_USER_NAME
           return REQUESTOR_USER_NAME;
-        case 3: // REQUESTOR_GROUP_NAMES
-          return REQUESTOR_GROUP_NAMES;
-        case 4: // ROLE_NAME
+        case 3: // ROLE_NAME
           return ROLE_NAME;
         case 5: // PRIVILEGE
           return PRIVILEGE;
@@ -132,9 +127,6 @@ 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.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, 
@@ -151,7 +143,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
   public TAlterSentryRoleGrantPrivilegeRequest(
     int protocol_version,
     String requestorUserName,
-    Set<String> requestorGroupNames,
     String roleName,
     TSentryPrivilege privilege)
   {
@@ -159,7 +150,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
     this.protocol_version = protocol_version;
     setProtocol_versionIsSet(true);
     this.requestorUserName = requestorUserName;
-    this.requestorGroupNames = requestorGroupNames;
     this.roleName = roleName;
     this.privilege = privilege;
   }
@@ -173,13 +163,6 @@ 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;
     }
@@ -197,7 +180,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
     this.protocol_version = 1;
 
     this.requestorUserName = null;
-    this.requestorGroupNames = null;
     this.roleName = null;
     this.privilege = null;
   }
@@ -247,44 +229,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
     }
   }
 
-  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;
-  }
-
-  /** Returns true if field requestorGroupNames is set (has been assigned a value) and false otherwise */
-  public boolean isSetRequestorGroupNames() {
-    return this.requestorGroupNames != null;
-  }
-
-  public void setRequestorGroupNamesIsSet(boolean value) {
-    if (!value) {
-      this.requestorGroupNames = null;
-    }
-  }
-
   public String getRoleName() {
     return this.roleName;
   }
@@ -349,14 +293,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
       }
       break;
 
-    case REQUESTOR_GROUP_NAMES:
-      if (value == null) {
-        unsetRequestorGroupNames();
-      } else {
-        setRequestorGroupNames((Set<String>)value);
-      }
-      break;
-
     case ROLE_NAME:
       if (value == null) {
         unsetRoleName();
@@ -384,9 +320,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
     case REQUESTOR_USER_NAME:
       return getRequestorUserName();
 
-    case REQUESTOR_GROUP_NAMES:
-      return getRequestorGroupNames();
-
     case ROLE_NAME:
       return getRoleName();
 
@@ -408,8 +341,6 @@ 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 PRIVILEGE:
@@ -449,15 +380,6 @@ 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) {
@@ -493,11 +415,6 @@ 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)
@@ -539,16 +456,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
         return lastComparison;
       }
     }
-    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;
@@ -601,14 +508,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
     }
     first = false;
     if (!first) sb.append(", ");
-    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");
@@ -638,10 +537,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' 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());
     }
@@ -708,25 +603,7 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // REQUESTOR_GROUP_NAMES
-            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
-              {
-                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 _elem50; // required
-                  _elem50 = iprot.readString();
-                  struct.requestorGroupNames.add(_elem50);
-                }
-                iprot.readSetEnd();
-              }
-              struct.setRequestorGroupNamesIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // ROLE_NAME
+          case 3: // ROLE_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.roleName = iprot.readString();
               struct.setRoleNameIsSet(true);
@@ -764,18 +641,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
         oprot.writeString(struct.requestorUserName);
         oprot.writeFieldEnd();
       }
-      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.requestorGroupNames.size()));
-          for (String _iter51 : struct.requestorGroupNames)
-          {
-            oprot.writeString(_iter51);
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
       if (struct.roleName != null) {
         oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
         oprot.writeString(struct.roleName);
@@ -805,13 +670,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeI32(struct.protocol_version);
       oprot.writeString(struct.requestorUserName);
-      {
-        oprot.writeI32(struct.requestorGroupNames.size());
-        for (String _iter52 : struct.requestorGroupNames)
-        {
-          oprot.writeString(_iter52);
-        }
-      }
       oprot.writeString(struct.roleName);
       struct.privilege.write(oprot);
     }
@@ -823,17 +681,6 @@ public class TAlterSentryRoleGrantPrivilegeRequest implements org.apache.thrift.
       struct.setProtocol_versionIsSet(true);
       struct.requestorUserName = iprot.readString();
       struct.setRequestorUserNameIsSet(true);
-      {
-        org.apache.thrift.protocol.TSet _set53 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.requestorGroupNames = new HashSet<String>(2*_set53.size);
-        for (int _i54 = 0; _i54 < _set53.size; ++_i54)
-        {
-          String _elem55; // required
-          _elem55 = iprot.readString();
-          struct.requestorGroupNames.add(_elem55);
-        }
-      }
-      struct.setRequestorGroupNamesIsSet(true);
       struct.roleName = iprot.readString();
       struct.setRoleNameIsSet(true);
       struct.privilege = new TSentryPrivilege();

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleRevokePrivilegeRequest.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleRevokePrivilegeRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleRevokePrivilegeRequest.java
index ae7eaf3..bbd9536 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleRevokePrivilegeRequest.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TAlterSentryRoleRevokePrivilegeRequest.java
@@ -36,8 +36,7 @@ public class TAlterSentryRoleRevokePrivilegeRequest 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 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 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 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,7 +47,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
 
   private int protocol_version; // required
   private String requestorUserName; // required
-  private Set<String> requestorGroupNames; // required
   private String roleName; // required
   private TSentryPrivilege privilege; // required
 
@@ -56,8 +54,7 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     PROTOCOL_VERSION((short)1, "protocol_version"),
     REQUESTOR_USER_NAME((short)2, "requestorUserName"),
-    REQUESTOR_GROUP_NAMES((short)3, "requestorGroupNames"),
-    ROLE_NAME((short)4, "roleName"),
+    ROLE_NAME((short)3, "roleName"),
     PRIVILEGE((short)5, "privilege");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -77,9 +74,7 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
           return PROTOCOL_VERSION;
         case 2: // REQUESTOR_USER_NAME
           return REQUESTOR_USER_NAME;
-        case 3: // REQUESTOR_GROUP_NAMES
-          return REQUESTOR_GROUP_NAMES;
-        case 4: // ROLE_NAME
+        case 3: // ROLE_NAME
           return ROLE_NAME;
         case 5: // PRIVILEGE
           return PRIVILEGE;
@@ -132,9 +127,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest 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.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, 
@@ -151,7 +143,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
   public TAlterSentryRoleRevokePrivilegeRequest(
     int protocol_version,
     String requestorUserName,
-    Set<String> requestorGroupNames,
     String roleName,
     TSentryPrivilege privilege)
   {
@@ -159,7 +150,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
     this.protocol_version = protocol_version;
     setProtocol_versionIsSet(true);
     this.requestorUserName = requestorUserName;
-    this.requestorGroupNames = requestorGroupNames;
     this.roleName = roleName;
     this.privilege = privilege;
   }
@@ -173,13 +163,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest 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;
     }
@@ -197,7 +180,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
     this.protocol_version = 1;
 
     this.requestorUserName = null;
-    this.requestorGroupNames = null;
     this.roleName = null;
     this.privilege = null;
   }
@@ -247,44 +229,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
     }
   }
 
-  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;
-  }
-
-  /** Returns true if field requestorGroupNames is set (has been assigned a value) and false otherwise */
-  public boolean isSetRequestorGroupNames() {
-    return this.requestorGroupNames != null;
-  }
-
-  public void setRequestorGroupNamesIsSet(boolean value) {
-    if (!value) {
-      this.requestorGroupNames = null;
-    }
-  }
-
   public String getRoleName() {
     return this.roleName;
   }
@@ -349,14 +293,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
       }
       break;
 
-    case REQUESTOR_GROUP_NAMES:
-      if (value == null) {
-        unsetRequestorGroupNames();
-      } else {
-        setRequestorGroupNames((Set<String>)value);
-      }
-      break;
-
     case ROLE_NAME:
       if (value == null) {
         unsetRoleName();
@@ -384,9 +320,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
     case REQUESTOR_USER_NAME:
       return getRequestorUserName();
 
-    case REQUESTOR_GROUP_NAMES:
-      return getRequestorGroupNames();
-
     case ROLE_NAME:
       return getRoleName();
 
@@ -408,8 +341,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest 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 PRIVILEGE:
@@ -449,15 +380,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest 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) {
@@ -493,11 +415,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest 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)
@@ -539,16 +456,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
         return lastComparison;
       }
     }
-    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;
@@ -601,14 +508,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
     }
     first = false;
     if (!first) sb.append(", ");
-    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");
@@ -638,10 +537,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' 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());
     }
@@ -708,25 +603,7 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // REQUESTOR_GROUP_NAMES
-            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
-              {
-                org.apache.thrift.protocol.TSet _set56 = iprot.readSetBegin();
-                struct.requestorGroupNames = new HashSet<String>(2*_set56.size);
-                for (int _i57 = 0; _i57 < _set56.size; ++_i57)
-                {
-                  String _elem58; // required
-                  _elem58 = iprot.readString();
-                  struct.requestorGroupNames.add(_elem58);
-                }
-                iprot.readSetEnd();
-              }
-              struct.setRequestorGroupNamesIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // ROLE_NAME
+          case 3: // ROLE_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.roleName = iprot.readString();
               struct.setRoleNameIsSet(true);
@@ -764,18 +641,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
         oprot.writeString(struct.requestorUserName);
         oprot.writeFieldEnd();
       }
-      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.requestorGroupNames.size()));
-          for (String _iter59 : struct.requestorGroupNames)
-          {
-            oprot.writeString(_iter59);
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
       if (struct.roleName != null) {
         oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
         oprot.writeString(struct.roleName);
@@ -805,13 +670,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeI32(struct.protocol_version);
       oprot.writeString(struct.requestorUserName);
-      {
-        oprot.writeI32(struct.requestorGroupNames.size());
-        for (String _iter60 : struct.requestorGroupNames)
-        {
-          oprot.writeString(_iter60);
-        }
-      }
       oprot.writeString(struct.roleName);
       struct.privilege.write(oprot);
     }
@@ -823,17 +681,6 @@ public class TAlterSentryRoleRevokePrivilegeRequest implements org.apache.thrift
       struct.setProtocol_versionIsSet(true);
       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.requestorGroupNames = new HashSet<String>(2*_set61.size);
-        for (int _i62 = 0; _i62 < _set61.size; ++_i62)
-        {
-          String _elem63; // required
-          _elem63 = iprot.readString();
-          struct.requestorGroupNames.add(_elem63);
-        }
-      }
-      struct.setRequestorGroupNamesIsSet(true);
       struct.roleName = iprot.readString();
       struct.setRoleNameIsSet(true);
       struct.privilege = new TSentryPrivilege();


[2/3] SENTRY-191: Sentry Policy Service should not require passing the RPC requestor's user/group information ( Prasad Mujumdar via Sravya Tirukkovalur)

Posted by sr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TCreateSentryRoleRequest.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TCreateSentryRoleRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TCreateSentryRoleRequest.java
index 6067a25..fc7c5dd 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TCreateSentryRoleRequest.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TCreateSentryRoleRequest.java
@@ -36,8 +36,7 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
 
   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_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 ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)3);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -47,15 +46,13 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
 
   private int protocol_version; // required
   private String requestorUserName; // required
-  private Set<String> requestorGroupNames; // required
   private String roleName; // 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_NAMES((short)3, "requestorGroupNames"),
-    ROLE_NAME((short)4, "roleName");
+    ROLE_NAME((short)3, "roleName");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -74,9 +71,7 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
           return PROTOCOL_VERSION;
         case 2: // REQUESTOR_USER_NAME
           return REQUESTOR_USER_NAME;
-        case 3: // REQUESTOR_GROUP_NAMES
-          return REQUESTOR_GROUP_NAMES;
-        case 4: // ROLE_NAME
+        case 3: // ROLE_NAME
           return ROLE_NAME;
         default:
           return null;
@@ -127,9 +122,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
         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_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)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -144,14 +136,12 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
   public TCreateSentryRoleRequest(
     int protocol_version,
     String requestorUserName,
-    Set<String> requestorGroupNames,
     String roleName)
   {
     this();
     this.protocol_version = protocol_version;
     setProtocol_versionIsSet(true);
     this.requestorUserName = requestorUserName;
-    this.requestorGroupNames = requestorGroupNames;
     this.roleName = roleName;
   }
 
@@ -164,13 +154,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
     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;
     }
@@ -185,7 +168,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
     this.protocol_version = 1;
 
     this.requestorUserName = null;
-    this.requestorGroupNames = null;
     this.roleName = null;
   }
 
@@ -234,44 +216,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
     }
   }
 
-  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;
-  }
-
-  /** Returns true if field requestorGroupNames is set (has been assigned a value) and false otherwise */
-  public boolean isSetRequestorGroupNames() {
-    return this.requestorGroupNames != null;
-  }
-
-  public void setRequestorGroupNamesIsSet(boolean value) {
-    if (!value) {
-      this.requestorGroupNames = null;
-    }
-  }
-
   public String getRoleName() {
     return this.roleName;
   }
@@ -313,14 +257,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
       }
       break;
 
-    case REQUESTOR_GROUP_NAMES:
-      if (value == null) {
-        unsetRequestorGroupNames();
-      } else {
-        setRequestorGroupNames((Set<String>)value);
-      }
-      break;
-
     case ROLE_NAME:
       if (value == null) {
         unsetRoleName();
@@ -340,9 +276,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
     case REQUESTOR_USER_NAME:
       return getRequestorUserName();
 
-    case REQUESTOR_GROUP_NAMES:
-      return getRequestorGroupNames();
-
     case ROLE_NAME:
       return getRoleName();
 
@@ -361,8 +294,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
       return isSetProtocol_version();
     case REQUESTOR_USER_NAME:
       return isSetRequestorUserName();
-    case REQUESTOR_GROUP_NAMES:
-      return isSetRequestorGroupNames();
     case ROLE_NAME:
       return isSetRoleName();
     }
@@ -400,15 +331,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
         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) {
@@ -435,11 +357,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
     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)
@@ -476,16 +393,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
         return lastComparison;
       }
     }
-    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;
@@ -528,14 +435,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
     }
     first = false;
     if (!first) sb.append(", ");
-    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");
@@ -557,10 +456,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' 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());
     }
@@ -620,25 +515,7 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // REQUESTOR_GROUP_NAMES
-            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
-              {
-                org.apache.thrift.protocol.TSet _set0 = iprot.readSetBegin();
-                struct.requestorGroupNames = new HashSet<String>(2*_set0.size);
-                for (int _i1 = 0; _i1 < _set0.size; ++_i1)
-                {
-                  String _elem2; // required
-                  _elem2 = iprot.readString();
-                  struct.requestorGroupNames.add(_elem2);
-                }
-                iprot.readSetEnd();
-              }
-              struct.setRequestorGroupNamesIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // ROLE_NAME
+          case 3: // ROLE_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.roleName = iprot.readString();
               struct.setRoleNameIsSet(true);
@@ -667,18 +544,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
         oprot.writeString(struct.requestorUserName);
         oprot.writeFieldEnd();
       }
-      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.requestorGroupNames.size()));
-          for (String _iter3 : struct.requestorGroupNames)
-          {
-            oprot.writeString(_iter3);
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
       if (struct.roleName != null) {
         oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
         oprot.writeString(struct.roleName);
@@ -703,13 +568,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeI32(struct.protocol_version);
       oprot.writeString(struct.requestorUserName);
-      {
-        oprot.writeI32(struct.requestorGroupNames.size());
-        for (String _iter4 : struct.requestorGroupNames)
-        {
-          oprot.writeString(_iter4);
-        }
-      }
       oprot.writeString(struct.roleName);
     }
 
@@ -720,17 +578,6 @@ public class TCreateSentryRoleRequest implements org.apache.thrift.TBase<TCreate
       struct.setProtocol_versionIsSet(true);
       struct.requestorUserName = iprot.readString();
       struct.setRequestorUserNameIsSet(true);
-      {
-        org.apache.thrift.protocol.TSet _set5 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.requestorGroupNames = new HashSet<String>(2*_set5.size);
-        for (int _i6 = 0; _i6 < _set5.size; ++_i6)
-        {
-          String _elem7; // required
-          _elem7 = iprot.readString();
-          struct.requestorGroupNames.add(_elem7);
-        }
-      }
-      struct.setRequestorGroupNamesIsSet(true);
       struct.roleName = iprot.readString();
       struct.setRoleNameIsSet(true);
     }

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TDropSentryRoleRequest.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TDropSentryRoleRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TDropSentryRoleRequest.java
index d804e2f..e2971ec 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TDropSentryRoleRequest.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TDropSentryRoleRequest.java
@@ -36,8 +36,7 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
 
   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_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 ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)3);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -47,15 +46,13 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
 
   private int protocol_version; // required
   private String requestorUserName; // required
-  private Set<String> requestorGroupNames; // required
   private String roleName; // 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_NAMES((short)3, "requestorGroupNames"),
-    ROLE_NAME((short)4, "roleName");
+    ROLE_NAME((short)3, "roleName");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -74,9 +71,7 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
           return PROTOCOL_VERSION;
         case 2: // REQUESTOR_USER_NAME
           return REQUESTOR_USER_NAME;
-        case 3: // REQUESTOR_GROUP_NAMES
-          return REQUESTOR_GROUP_NAMES;
-        case 4: // ROLE_NAME
+        case 3: // ROLE_NAME
           return ROLE_NAME;
         default:
           return null;
@@ -127,9 +122,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
         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_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)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -144,14 +136,12 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
   public TDropSentryRoleRequest(
     int protocol_version,
     String requestorUserName,
-    Set<String> requestorGroupNames,
     String roleName)
   {
     this();
     this.protocol_version = protocol_version;
     setProtocol_versionIsSet(true);
     this.requestorUserName = requestorUserName;
-    this.requestorGroupNames = requestorGroupNames;
     this.roleName = roleName;
   }
 
@@ -164,13 +154,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
     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;
     }
@@ -185,7 +168,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
     this.protocol_version = 1;
 
     this.requestorUserName = null;
-    this.requestorGroupNames = null;
     this.roleName = null;
   }
 
@@ -234,44 +216,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
     }
   }
 
-  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;
-  }
-
-  /** Returns true if field requestorGroupNames is set (has been assigned a value) and false otherwise */
-  public boolean isSetRequestorGroupNames() {
-    return this.requestorGroupNames != null;
-  }
-
-  public void setRequestorGroupNamesIsSet(boolean value) {
-    if (!value) {
-      this.requestorGroupNames = null;
-    }
-  }
-
   public String getRoleName() {
     return this.roleName;
   }
@@ -313,14 +257,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
       }
       break;
 
-    case REQUESTOR_GROUP_NAMES:
-      if (value == null) {
-        unsetRequestorGroupNames();
-      } else {
-        setRequestorGroupNames((Set<String>)value);
-      }
-      break;
-
     case ROLE_NAME:
       if (value == null) {
         unsetRoleName();
@@ -340,9 +276,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
     case REQUESTOR_USER_NAME:
       return getRequestorUserName();
 
-    case REQUESTOR_GROUP_NAMES:
-      return getRequestorGroupNames();
-
     case ROLE_NAME:
       return getRoleName();
 
@@ -361,8 +294,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
       return isSetProtocol_version();
     case REQUESTOR_USER_NAME:
       return isSetRequestorUserName();
-    case REQUESTOR_GROUP_NAMES:
-      return isSetRequestorGroupNames();
     case ROLE_NAME:
       return isSetRoleName();
     }
@@ -400,15 +331,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
         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) {
@@ -435,11 +357,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
     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)
@@ -476,16 +393,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
         return lastComparison;
       }
     }
-    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;
@@ -528,14 +435,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
     }
     first = false;
     if (!first) sb.append(", ");
-    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");
@@ -557,10 +456,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' 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());
     }
@@ -620,25 +515,7 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // REQUESTOR_GROUP_NAMES
-            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
-              {
-                org.apache.thrift.protocol.TSet _set8 = iprot.readSetBegin();
-                struct.requestorGroupNames = new HashSet<String>(2*_set8.size);
-                for (int _i9 = 0; _i9 < _set8.size; ++_i9)
-                {
-                  String _elem10; // required
-                  _elem10 = iprot.readString();
-                  struct.requestorGroupNames.add(_elem10);
-                }
-                iprot.readSetEnd();
-              }
-              struct.setRequestorGroupNamesIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // ROLE_NAME
+          case 3: // ROLE_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.roleName = iprot.readString();
               struct.setRoleNameIsSet(true);
@@ -667,18 +544,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
         oprot.writeString(struct.requestorUserName);
         oprot.writeFieldEnd();
       }
-      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.requestorGroupNames.size()));
-          for (String _iter11 : struct.requestorGroupNames)
-          {
-            oprot.writeString(_iter11);
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
       if (struct.roleName != null) {
         oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
         oprot.writeString(struct.roleName);
@@ -703,13 +568,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeI32(struct.protocol_version);
       oprot.writeString(struct.requestorUserName);
-      {
-        oprot.writeI32(struct.requestorGroupNames.size());
-        for (String _iter12 : struct.requestorGroupNames)
-        {
-          oprot.writeString(_iter12);
-        }
-      }
       oprot.writeString(struct.roleName);
     }
 
@@ -720,17 +578,6 @@ public class TDropSentryRoleRequest implements org.apache.thrift.TBase<TDropSent
       struct.setProtocol_versionIsSet(true);
       struct.requestorUserName = iprot.readString();
       struct.setRequestorUserNameIsSet(true);
-      {
-        org.apache.thrift.protocol.TSet _set13 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.requestorGroupNames = new HashSet<String>(2*_set13.size);
-        for (int _i14 = 0; _i14 < _set13.size; ++_i14)
-        {
-          String _elem15; // required
-          _elem15 = iprot.readString();
-          struct.requestorGroupNames.add(_elem15);
-        }
-      }
-      struct.setRequestorGroupNamesIsSet(true);
       struct.roleName = iprot.readString();
       struct.setRoleNameIsSet(true);
     }

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesForProviderRequest.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesForProviderRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesForProviderRequest.java
index 09704ae..65fd5b5 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesForProviderRequest.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesForProviderRequest.java
@@ -533,13 +533,13 @@ public class TListSentryPrivilegesForProviderRequest implements org.apache.thrif
           case 2: // GROUPS
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set112 = iprot.readSetBegin();
-                struct.groups = new HashSet<String>(2*_set112.size);
-                for (int _i113 = 0; _i113 < _set112.size; ++_i113)
+                org.apache.thrift.protocol.TSet _set48 = iprot.readSetBegin();
+                struct.groups = new HashSet<String>(2*_set48.size);
+                for (int _i49 = 0; _i49 < _set48.size; ++_i49)
                 {
-                  String _elem114; // required
-                  _elem114 = iprot.readString();
-                  struct.groups.add(_elem114);
+                  String _elem50; // required
+                  _elem50 = iprot.readString();
+                  struct.groups.add(_elem50);
                 }
                 iprot.readSetEnd();
               }
@@ -577,9 +577,9 @@ public class TListSentryPrivilegesForProviderRequest implements org.apache.thrif
         oprot.writeFieldBegin(GROUPS_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.groups.size()));
-          for (String _iter115 : struct.groups)
+          for (String _iter51 : struct.groups)
           {
-            oprot.writeString(_iter115);
+            oprot.writeString(_iter51);
           }
           oprot.writeSetEnd();
         }
@@ -610,9 +610,9 @@ public class TListSentryPrivilegesForProviderRequest implements org.apache.thrif
       oprot.writeI32(struct.protocol_version);
       {
         oprot.writeI32(struct.groups.size());
-        for (String _iter116 : struct.groups)
+        for (String _iter52 : struct.groups)
         {
-          oprot.writeString(_iter116);
+          oprot.writeString(_iter52);
         }
       }
       struct.roleSet.write(oprot);
@@ -624,13 +624,13 @@ public class TListSentryPrivilegesForProviderRequest implements org.apache.thrif
       struct.protocol_version = iprot.readI32();
       struct.setProtocol_versionIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set117 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.groups = new HashSet<String>(2*_set117.size);
-        for (int _i118 = 0; _i118 < _set117.size; ++_i118)
+        org.apache.thrift.protocol.TSet _set53 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.groups = new HashSet<String>(2*_set53.size);
+        for (int _i54 = 0; _i54 < _set53.size; ++_i54)
         {
-          String _elem119; // required
-          _elem119 = iprot.readString();
-          struct.groups.add(_elem119);
+          String _elem55; // required
+          _elem55 = iprot.readString();
+          struct.groups.add(_elem55);
         }
       }
       struct.setGroupsIsSet(true);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesForProviderResponse.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesForProviderResponse.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesForProviderResponse.java
index dff80b6..4c571c2 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesForProviderResponse.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesForProviderResponse.java
@@ -447,13 +447,13 @@ public class TListSentryPrivilegesForProviderResponse implements org.apache.thri
           case 2: // PRIVILEGES
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set120 = iprot.readSetBegin();
-                struct.privileges = new HashSet<String>(2*_set120.size);
-                for (int _i121 = 0; _i121 < _set120.size; ++_i121)
+                org.apache.thrift.protocol.TSet _set56 = iprot.readSetBegin();
+                struct.privileges = new HashSet<String>(2*_set56.size);
+                for (int _i57 = 0; _i57 < _set56.size; ++_i57)
                 {
-                  String _elem122; // required
-                  _elem122 = iprot.readString();
-                  struct.privileges.add(_elem122);
+                  String _elem58; // required
+                  _elem58 = iprot.readString();
+                  struct.privileges.add(_elem58);
                 }
                 iprot.readSetEnd();
               }
@@ -484,9 +484,9 @@ public class TListSentryPrivilegesForProviderResponse implements org.apache.thri
         oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.privileges.size()));
-          for (String _iter123 : struct.privileges)
+          for (String _iter59 : struct.privileges)
           {
-            oprot.writeString(_iter123);
+            oprot.writeString(_iter59);
           }
           oprot.writeSetEnd();
         }
@@ -512,9 +512,9 @@ public class TListSentryPrivilegesForProviderResponse implements org.apache.thri
       struct.status.write(oprot);
       {
         oprot.writeI32(struct.privileges.size());
-        for (String _iter124 : struct.privileges)
+        for (String _iter60 : struct.privileges)
         {
-          oprot.writeString(_iter124);
+          oprot.writeString(_iter60);
         }
       }
     }
@@ -526,13 +526,13 @@ public class TListSentryPrivilegesForProviderResponse implements org.apache.thri
       struct.status.read(iprot);
       struct.setStatusIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set125 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.privileges = new HashSet<String>(2*_set125.size);
-        for (int _i126 = 0; _i126 < _set125.size; ++_i126)
+        org.apache.thrift.protocol.TSet _set61 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.privileges = new HashSet<String>(2*_set61.size);
+        for (int _i62 = 0; _i62 < _set61.size; ++_i62)
         {
-          String _elem127; // required
-          _elem127 = iprot.readString();
-          struct.privileges.add(_elem127);
+          String _elem63; // required
+          _elem63 = iprot.readString();
+          struct.privileges.add(_elem63);
         }
       }
       struct.setPrivilegesIsSet(true);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesRequest.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesRequest.java
index 56e4cc7..89afb70 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesRequest.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesRequest.java
@@ -36,8 +36,7 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
 
   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_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 ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)3);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -47,15 +46,13 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
 
   private int protocol_version; // required
   private String requestorUserName; // required
-  private Set<String> requestorGroupNames; // required
   private String roleName; // 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_NAMES((short)3, "requestorGroupNames"),
-    ROLE_NAME((short)4, "roleName");
+    ROLE_NAME((short)3, "roleName");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -74,9 +71,7 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
           return PROTOCOL_VERSION;
         case 2: // REQUESTOR_USER_NAME
           return REQUESTOR_USER_NAME;
-        case 3: // REQUESTOR_GROUP_NAMES
-          return REQUESTOR_GROUP_NAMES;
-        case 4: // ROLE_NAME
+        case 3: // ROLE_NAME
           return ROLE_NAME;
         default:
           return null;
@@ -127,9 +122,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
         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_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)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -144,14 +136,12 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
   public TListSentryPrivilegesRequest(
     int protocol_version,
     String requestorUserName,
-    Set<String> requestorGroupNames,
     String roleName)
   {
     this();
     this.protocol_version = protocol_version;
     setProtocol_versionIsSet(true);
     this.requestorUserName = requestorUserName;
-    this.requestorGroupNames = requestorGroupNames;
     this.roleName = roleName;
   }
 
@@ -164,13 +154,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
     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;
     }
@@ -185,7 +168,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
     this.protocol_version = 1;
 
     this.requestorUserName = null;
-    this.requestorGroupNames = null;
     this.roleName = null;
   }
 
@@ -234,44 +216,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
     }
   }
 
-  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;
-  }
-
-  /** Returns true if field requestorGroupNames is set (has been assigned a value) and false otherwise */
-  public boolean isSetRequestorGroupNames() {
-    return this.requestorGroupNames != null;
-  }
-
-  public void setRequestorGroupNamesIsSet(boolean value) {
-    if (!value) {
-      this.requestorGroupNames = null;
-    }
-  }
-
   public String getRoleName() {
     return this.roleName;
   }
@@ -313,14 +257,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
       }
       break;
 
-    case REQUESTOR_GROUP_NAMES:
-      if (value == null) {
-        unsetRequestorGroupNames();
-      } else {
-        setRequestorGroupNames((Set<String>)value);
-      }
-      break;
-
     case ROLE_NAME:
       if (value == null) {
         unsetRoleName();
@@ -340,9 +276,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
     case REQUESTOR_USER_NAME:
       return getRequestorUserName();
 
-    case REQUESTOR_GROUP_NAMES:
-      return getRequestorGroupNames();
-
     case ROLE_NAME:
       return getRoleName();
 
@@ -361,8 +294,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
       return isSetProtocol_version();
     case REQUESTOR_USER_NAME:
       return isSetRequestorUserName();
-    case REQUESTOR_GROUP_NAMES:
-      return isSetRequestorGroupNames();
     case ROLE_NAME:
       return isSetRoleName();
     }
@@ -400,15 +331,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
         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) {
@@ -435,11 +357,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
     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)
@@ -476,16 +393,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
         return lastComparison;
       }
     }
-    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;
@@ -528,14 +435,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
     }
     first = false;
     if (!first) sb.append(", ");
-    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");
@@ -557,10 +456,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' 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());
     }
@@ -620,25 +515,7 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // REQUESTOR_GROUP_NAMES
-            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
-              {
-                org.apache.thrift.protocol.TSet _set88 = iprot.readSetBegin();
-                struct.requestorGroupNames = new HashSet<String>(2*_set88.size);
-                for (int _i89 = 0; _i89 < _set88.size; ++_i89)
-                {
-                  String _elem90; // required
-                  _elem90 = iprot.readString();
-                  struct.requestorGroupNames.add(_elem90);
-                }
-                iprot.readSetEnd();
-              }
-              struct.setRequestorGroupNamesIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // ROLE_NAME
+          case 3: // ROLE_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.roleName = iprot.readString();
               struct.setRoleNameIsSet(true);
@@ -667,18 +544,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
         oprot.writeString(struct.requestorUserName);
         oprot.writeFieldEnd();
       }
-      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.requestorGroupNames.size()));
-          for (String _iter91 : struct.requestorGroupNames)
-          {
-            oprot.writeString(_iter91);
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
       if (struct.roleName != null) {
         oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
         oprot.writeString(struct.roleName);
@@ -703,13 +568,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeI32(struct.protocol_version);
       oprot.writeString(struct.requestorUserName);
-      {
-        oprot.writeI32(struct.requestorGroupNames.size());
-        for (String _iter92 : struct.requestorGroupNames)
-        {
-          oprot.writeString(_iter92);
-        }
-      }
       oprot.writeString(struct.roleName);
     }
 
@@ -720,17 +578,6 @@ public class TListSentryPrivilegesRequest implements org.apache.thrift.TBase<TLi
       struct.setProtocol_versionIsSet(true);
       struct.requestorUserName = iprot.readString();
       struct.setRequestorUserNameIsSet(true);
-      {
-        org.apache.thrift.protocol.TSet _set93 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.requestorGroupNames = new HashSet<String>(2*_set93.size);
-        for (int _i94 = 0; _i94 < _set93.size; ++_i94)
-        {
-          String _elem95; // required
-          _elem95 = iprot.readString();
-          struct.requestorGroupNames.add(_elem95);
-        }
-      }
-      struct.setRequestorGroupNamesIsSet(true);
       struct.roleName = iprot.readString();
       struct.setRoleNameIsSet(true);
     }

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesResponse.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesResponse.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesResponse.java
index 53a0f78..7d1e18b 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesResponse.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryPrivilegesResponse.java
@@ -447,14 +447,14 @@ public class TListSentryPrivilegesResponse implements org.apache.thrift.TBase<TL
           case 2: // PRIVILEGES
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set96 = iprot.readSetBegin();
-                struct.privileges = new HashSet<TSentryPrivilege>(2*_set96.size);
-                for (int _i97 = 0; _i97 < _set96.size; ++_i97)
+                org.apache.thrift.protocol.TSet _set32 = iprot.readSetBegin();
+                struct.privileges = new HashSet<TSentryPrivilege>(2*_set32.size);
+                for (int _i33 = 0; _i33 < _set32.size; ++_i33)
                 {
-                  TSentryPrivilege _elem98; // required
-                  _elem98 = new TSentryPrivilege();
-                  _elem98.read(iprot);
-                  struct.privileges.add(_elem98);
+                  TSentryPrivilege _elem34; // required
+                  _elem34 = new TSentryPrivilege();
+                  _elem34.read(iprot);
+                  struct.privileges.add(_elem34);
                 }
                 iprot.readSetEnd();
               }
@@ -485,9 +485,9 @@ public class TListSentryPrivilegesResponse implements org.apache.thrift.TBase<TL
         oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.privileges.size()));
-          for (TSentryPrivilege _iter99 : struct.privileges)
+          for (TSentryPrivilege _iter35 : struct.privileges)
           {
-            _iter99.write(oprot);
+            _iter35.write(oprot);
           }
           oprot.writeSetEnd();
         }
@@ -513,9 +513,9 @@ public class TListSentryPrivilegesResponse implements org.apache.thrift.TBase<TL
       struct.status.write(oprot);
       {
         oprot.writeI32(struct.privileges.size());
-        for (TSentryPrivilege _iter100 : struct.privileges)
+        for (TSentryPrivilege _iter36 : struct.privileges)
         {
-          _iter100.write(oprot);
+          _iter36.write(oprot);
         }
       }
     }
@@ -527,14 +527,14 @@ public class TListSentryPrivilegesResponse implements org.apache.thrift.TBase<TL
       struct.status.read(iprot);
       struct.setStatusIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set101 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.privileges = new HashSet<TSentryPrivilege>(2*_set101.size);
-        for (int _i102 = 0; _i102 < _set101.size; ++_i102)
+        org.apache.thrift.protocol.TSet _set37 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.privileges = new HashSet<TSentryPrivilege>(2*_set37.size);
+        for (int _i38 = 0; _i38 < _set37.size; ++_i38)
         {
-          TSentryPrivilege _elem103; // required
-          _elem103 = new TSentryPrivilege();
-          _elem103.read(iprot);
-          struct.privileges.add(_elem103);
+          TSentryPrivilege _elem39; // required
+          _elem39 = new TSentryPrivilege();
+          _elem39.read(iprot);
+          struct.privileges.add(_elem39);
         }
       }
       struct.setPrivilegesIsSet(true);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryRolesRequest.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryRolesRequest.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryRolesRequest.java
index c8873a8..4eec1ed 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryRolesRequest.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryRolesRequest.java
@@ -36,8 +36,7 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
 
   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_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 GROUP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("groupName", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField GROUP_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("groupName", org.apache.thrift.protocol.TType.STRING, (short)3);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -47,15 +46,13 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
 
   private int protocol_version; // required
   private String requestorUserName; // required
-  private Set<String> requestorGroupNames; // required
   private String groupName; // optional
 
   /** 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_NAMES((short)3, "requestorGroupNames"),
-    GROUP_NAME((short)4, "groupName");
+    GROUP_NAME((short)3, "groupName");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -74,9 +71,7 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
           return PROTOCOL_VERSION;
         case 2: // REQUESTOR_USER_NAME
           return REQUESTOR_USER_NAME;
-        case 3: // REQUESTOR_GROUP_NAMES
-          return REQUESTOR_GROUP_NAMES;
-        case 4: // GROUP_NAME
+        case 3: // GROUP_NAME
           return GROUP_NAME;
         default:
           return null;
@@ -128,9 +123,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
         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_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.GROUP_NAME, new org.apache.thrift.meta_data.FieldMetaData("groupName", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -144,14 +136,12 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
 
   public TListSentryRolesRequest(
     int protocol_version,
-    String requestorUserName,
-    Set<String> requestorGroupNames)
+    String requestorUserName)
   {
     this();
     this.protocol_version = protocol_version;
     setProtocol_versionIsSet(true);
     this.requestorUserName = requestorUserName;
-    this.requestorGroupNames = requestorGroupNames;
   }
 
   /**
@@ -163,13 +153,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
     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.isSetGroupName()) {
       this.groupName = other.groupName;
     }
@@ -184,7 +167,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
     this.protocol_version = 1;
 
     this.requestorUserName = null;
-    this.requestorGroupNames = null;
     this.groupName = null;
   }
 
@@ -233,44 +215,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
     }
   }
 
-  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;
-  }
-
-  /** Returns true if field requestorGroupNames is set (has been assigned a value) and false otherwise */
-  public boolean isSetRequestorGroupNames() {
-    return this.requestorGroupNames != null;
-  }
-
-  public void setRequestorGroupNamesIsSet(boolean value) {
-    if (!value) {
-      this.requestorGroupNames = null;
-    }
-  }
-
   public String getGroupName() {
     return this.groupName;
   }
@@ -312,14 +256,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
       }
       break;
 
-    case REQUESTOR_GROUP_NAMES:
-      if (value == null) {
-        unsetRequestorGroupNames();
-      } else {
-        setRequestorGroupNames((Set<String>)value);
-      }
-      break;
-
     case GROUP_NAME:
       if (value == null) {
         unsetGroupName();
@@ -339,9 +275,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
     case REQUESTOR_USER_NAME:
       return getRequestorUserName();
 
-    case REQUESTOR_GROUP_NAMES:
-      return getRequestorGroupNames();
-
     case GROUP_NAME:
       return getGroupName();
 
@@ -360,8 +293,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
       return isSetProtocol_version();
     case REQUESTOR_USER_NAME:
       return isSetRequestorUserName();
-    case REQUESTOR_GROUP_NAMES:
-      return isSetRequestorGroupNames();
     case GROUP_NAME:
       return isSetGroupName();
     }
@@ -399,15 +330,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
         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_groupName = true && this.isSetGroupName();
     boolean that_present_groupName = true && that.isSetGroupName();
     if (this_present_groupName || that_present_groupName) {
@@ -434,11 +356,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
     if (present_requestorUserName)
       builder.append(requestorUserName);
 
-    boolean present_requestorGroupNames = true && (isSetRequestorGroupNames());
-    builder.append(present_requestorGroupNames);
-    if (present_requestorGroupNames)
-      builder.append(requestorGroupNames);
-
     boolean present_groupName = true && (isSetGroupName());
     builder.append(present_groupName);
     if (present_groupName)
@@ -475,16 +392,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
         return lastComparison;
       }
     }
-    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(isSetGroupName()).compareTo(typedOther.isSetGroupName());
     if (lastComparison != 0) {
       return lastComparison;
@@ -526,14 +433,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
       sb.append(this.requestorUserName);
     }
     first = false;
-    if (!first) sb.append(", ");
-    sb.append("requestorGroupNames:");
-    if (this.requestorGroupNames == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.requestorGroupNames);
-    }
-    first = false;
     if (isSetGroupName()) {
       if (!first) sb.append(", ");
       sb.append("groupName:");
@@ -558,10 +457,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorUserName' is unset! Struct:" + toString());
     }
 
-    if (!isSetRequestorGroupNames()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestorGroupNames' is unset! Struct:" + toString());
-    }
-
     // check for sub-struct validity
   }
 
@@ -617,25 +512,7 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 3: // REQUESTOR_GROUP_NAMES
-            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
-              {
-                org.apache.thrift.protocol.TSet _set64 = iprot.readSetBegin();
-                struct.requestorGroupNames = new HashSet<String>(2*_set64.size);
-                for (int _i65 = 0; _i65 < _set64.size; ++_i65)
-                {
-                  String _elem66; // required
-                  _elem66 = iprot.readString();
-                  struct.requestorGroupNames.add(_elem66);
-                }
-                iprot.readSetEnd();
-              }
-              struct.setRequestorGroupNamesIsSet(true);
-            } else { 
-              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
-            }
-            break;
-          case 4: // GROUP_NAME
+          case 3: // GROUP_NAME
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
               struct.groupName = iprot.readString();
               struct.setGroupNameIsSet(true);
@@ -664,18 +541,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
         oprot.writeString(struct.requestorUserName);
         oprot.writeFieldEnd();
       }
-      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.requestorGroupNames.size()));
-          for (String _iter67 : struct.requestorGroupNames)
-          {
-            oprot.writeString(_iter67);
-          }
-          oprot.writeSetEnd();
-        }
-        oprot.writeFieldEnd();
-      }
       if (struct.groupName != null) {
         if (struct.isSetGroupName()) {
           oprot.writeFieldBegin(GROUP_NAME_FIELD_DESC);
@@ -702,13 +567,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
       TTupleProtocol oprot = (TTupleProtocol) prot;
       oprot.writeI32(struct.protocol_version);
       oprot.writeString(struct.requestorUserName);
-      {
-        oprot.writeI32(struct.requestorGroupNames.size());
-        for (String _iter68 : struct.requestorGroupNames)
-        {
-          oprot.writeString(_iter68);
-        }
-      }
       BitSet optionals = new BitSet();
       if (struct.isSetGroupName()) {
         optionals.set(0);
@@ -726,17 +584,6 @@ public class TListSentryRolesRequest implements org.apache.thrift.TBase<TListSen
       struct.setProtocol_versionIsSet(true);
       struct.requestorUserName = iprot.readString();
       struct.setRequestorUserNameIsSet(true);
-      {
-        org.apache.thrift.protocol.TSet _set69 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.requestorGroupNames = new HashSet<String>(2*_set69.size);
-        for (int _i70 = 0; _i70 < _set69.size; ++_i70)
-        {
-          String _elem71; // required
-          _elem71 = iprot.readString();
-          struct.requestorGroupNames.add(_elem71);
-        }
-      }
-      struct.setRequestorGroupNamesIsSet(true);
       BitSet incoming = iprot.readBitSet(1);
       if (incoming.get(0)) {
         struct.groupName = iprot.readString();

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryRolesResponse.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryRolesResponse.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryRolesResponse.java
index 3440b5e..f3dfac2 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryRolesResponse.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TListSentryRolesResponse.java
@@ -447,14 +447,14 @@ public class TListSentryRolesResponse implements org.apache.thrift.TBase<TListSe
           case 2: // ROLES
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set80 = iprot.readSetBegin();
-                struct.roles = new HashSet<TSentryRole>(2*_set80.size);
-                for (int _i81 = 0; _i81 < _set80.size; ++_i81)
+                org.apache.thrift.protocol.TSet _set24 = iprot.readSetBegin();
+                struct.roles = new HashSet<TSentryRole>(2*_set24.size);
+                for (int _i25 = 0; _i25 < _set24.size; ++_i25)
                 {
-                  TSentryRole _elem82; // required
-                  _elem82 = new TSentryRole();
-                  _elem82.read(iprot);
-                  struct.roles.add(_elem82);
+                  TSentryRole _elem26; // required
+                  _elem26 = new TSentryRole();
+                  _elem26.read(iprot);
+                  struct.roles.add(_elem26);
                 }
                 iprot.readSetEnd();
               }
@@ -485,9 +485,9 @@ public class TListSentryRolesResponse implements org.apache.thrift.TBase<TListSe
         oprot.writeFieldBegin(ROLES_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.roles.size()));
-          for (TSentryRole _iter83 : struct.roles)
+          for (TSentryRole _iter27 : struct.roles)
           {
-            _iter83.write(oprot);
+            _iter27.write(oprot);
           }
           oprot.writeSetEnd();
         }
@@ -513,9 +513,9 @@ public class TListSentryRolesResponse implements org.apache.thrift.TBase<TListSe
       struct.status.write(oprot);
       {
         oprot.writeI32(struct.roles.size());
-        for (TSentryRole _iter84 : struct.roles)
+        for (TSentryRole _iter28 : struct.roles)
         {
-          _iter84.write(oprot);
+          _iter28.write(oprot);
         }
       }
     }
@@ -527,14 +527,14 @@ public class TListSentryRolesResponse implements org.apache.thrift.TBase<TListSe
       struct.status.read(iprot);
       struct.setStatusIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set85 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.roles = new HashSet<TSentryRole>(2*_set85.size);
-        for (int _i86 = 0; _i86 < _set85.size; ++_i86)
+        org.apache.thrift.protocol.TSet _set29 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.roles = new HashSet<TSentryRole>(2*_set29.size);
+        for (int _i30 = 0; _i30 < _set29.size; ++_i30)
         {
-          TSentryRole _elem87; // required
-          _elem87 = new TSentryRole();
-          _elem87.read(iprot);
-          struct.roles.add(_elem87);
+          TSentryRole _elem31; // required
+          _elem31 = new TSentryRole();
+          _elem31.read(iprot);
+          struct.roles.add(_elem31);
         }
       }
       struct.setRolesIsSet(true);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryActiveRoleSet.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryActiveRoleSet.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryActiveRoleSet.java
index 8a4f62a..573dc26 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryActiveRoleSet.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryActiveRoleSet.java
@@ -443,13 +443,13 @@ public class TSentryActiveRoleSet implements org.apache.thrift.TBase<TSentryActi
           case 2: // ROLES
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set104 = iprot.readSetBegin();
-                struct.roles = new HashSet<String>(2*_set104.size);
-                for (int _i105 = 0; _i105 < _set104.size; ++_i105)
+                org.apache.thrift.protocol.TSet _set40 = iprot.readSetBegin();
+                struct.roles = new HashSet<String>(2*_set40.size);
+                for (int _i41 = 0; _i41 < _set40.size; ++_i41)
                 {
-                  String _elem106; // required
-                  _elem106 = iprot.readString();
-                  struct.roles.add(_elem106);
+                  String _elem42; // required
+                  _elem42 = iprot.readString();
+                  struct.roles.add(_elem42);
                 }
                 iprot.readSetEnd();
               }
@@ -478,9 +478,9 @@ public class TSentryActiveRoleSet implements org.apache.thrift.TBase<TSentryActi
         oprot.writeFieldBegin(ROLES_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.roles.size()));
-          for (String _iter107 : struct.roles)
+          for (String _iter43 : struct.roles)
           {
-            oprot.writeString(_iter107);
+            oprot.writeString(_iter43);
           }
           oprot.writeSetEnd();
         }
@@ -506,9 +506,9 @@ public class TSentryActiveRoleSet implements org.apache.thrift.TBase<TSentryActi
       oprot.writeBool(struct.all);
       {
         oprot.writeI32(struct.roles.size());
-        for (String _iter108 : struct.roles)
+        for (String _iter44 : struct.roles)
         {
-          oprot.writeString(_iter108);
+          oprot.writeString(_iter44);
         }
       }
     }
@@ -519,13 +519,13 @@ public class TSentryActiveRoleSet implements org.apache.thrift.TBase<TSentryActi
       struct.all = iprot.readBool();
       struct.setAllIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set109 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-        struct.roles = new HashSet<String>(2*_set109.size);
-        for (int _i110 = 0; _i110 < _set109.size; ++_i110)
+        org.apache.thrift.protocol.TSet _set45 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+        struct.roles = new HashSet<String>(2*_set45.size);
+        for (int _i46 = 0; _i46 < _set45.size; ++_i46)
         {
-          String _elem111; // required
-          _elem111 = iprot.readString();
-          struct.roles.add(_elem111);
+          String _elem47; // required
+          _elem47 = iprot.readString();
+          struct.roles.add(_elem47);
         }
       }
       struct.setRolesIsSet(true);

http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/61a67cb9/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryRole.java
----------------------------------------------------------------------
diff --git a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryRole.java b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryRole.java
index 0e004f6..f43a6d5 100644
--- a/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryRole.java
+++ b/sentry-provider/sentry-provider-db/src/gen/thrift/gen-javabean/org/apache/sentry/provider/db/service/thrift/TSentryRole.java
@@ -528,14 +528,14 @@ public class TSentryRole implements org.apache.thrift.TBase<TSentryRole, TSentry
           case 2: // GROUPS
             if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
               {
-                org.apache.thrift.protocol.TSet _set72 = iprot.readSetBegin();
-                struct.groups = new HashSet<TSentryGroup>(2*_set72.size);
-                for (int _i73 = 0; _i73 < _set72.size; ++_i73)
+                org.apache.thrift.protocol.TSet _set16 = iprot.readSetBegin();
+                struct.groups = new HashSet<TSentryGroup>(2*_set16.size);
+                for (int _i17 = 0; _i17 < _set16.size; ++_i17)
                 {
-                  TSentryGroup _elem74; // required
-                  _elem74 = new TSentryGroup();
-                  _elem74.read(iprot);
-                  struct.groups.add(_elem74);
+                  TSentryGroup _elem18; // required
+                  _elem18 = new TSentryGroup();
+                  _elem18.read(iprot);
+                  struct.groups.add(_elem18);
                 }
                 iprot.readSetEnd();
               }
@@ -574,9 +574,9 @@ public class TSentryRole implements org.apache.thrift.TBase<TSentryRole, TSentry
         oprot.writeFieldBegin(GROUPS_FIELD_DESC);
         {
           oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.groups.size()));
-          for (TSentryGroup _iter75 : struct.groups)
+          for (TSentryGroup _iter19 : struct.groups)
           {
-            _iter75.write(oprot);
+            _iter19.write(oprot);
           }
           oprot.writeSetEnd();
         }
@@ -607,9 +607,9 @@ public class TSentryRole implements org.apache.thrift.TBase<TSentryRole, TSentry
       oprot.writeString(struct.roleName);
       {
         oprot.writeI32(struct.groups.size());
-        for (TSentryGroup _iter76 : struct.groups)
+        for (TSentryGroup _iter20 : struct.groups)
         {
-          _iter76.write(oprot);
+          _iter20.write(oprot);
         }
       }
       oprot.writeString(struct.grantorPrincipal);
@@ -621,14 +621,14 @@ public class TSentryRole implements org.apache.thrift.TBase<TSentryRole, TSentry
       struct.roleName = iprot.readString();
       struct.setRoleNameIsSet(true);
       {
-        org.apache.thrift.protocol.TSet _set77 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
-        struct.groups = new HashSet<TSentryGroup>(2*_set77.size);
-        for (int _i78 = 0; _i78 < _set77.size; ++_i78)
+        org.apache.thrift.protocol.TSet _set21 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.groups = new HashSet<TSentryGroup>(2*_set21.size);
+        for (int _i22 = 0; _i22 < _set21.size; ++_i22)
         {
-          TSentryGroup _elem79; // required
-          _elem79 = new TSentryGroup();
-          _elem79.read(iprot);
-          struct.groups.add(_elem79);
+          TSentryGroup _elem23; // required
+          _elem23 = new TSentryGroup();
+          _elem23.read(iprot);
+          struct.groups.add(_elem23);
         }
       }
       struct.setGroupsIsSet(true);