You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by "guoquan (JIRA)" <ji...@apache.org> on 2015/05/14 12:22:03 UTC

[jira] [Updated] (SENTRY-736) Add a new constructor to HadoopGroupMappingService

     [ https://issues.apache.org/jira/browse/SENTRY-736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

guoquan updated SENTRY-736:
---------------------------
    Description: 
The SentryPolicyStoreProcessor needs to get the groupMappingService to parse username. The function code as followings:
{code}
    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);
    Constructor<?> constrctor = Class.forName(groupMapping)
          .getDeclaredConstructor(Configuration.class, String.class);
      constrctor.setAccessible(true);
      groupMappingService = (GroupMappingService) constrctor
          .newInstance(new Object[] { conf, authResoruce });
{code}

When create a 

> Add a new constructor to HadoopGroupMappingService
> --------------------------------------------------
>
>                 Key: SENTRY-736
>                 URL: https://issues.apache.org/jira/browse/SENTRY-736
>             Project: Sentry
>          Issue Type: Bug
>            Reporter: guoquan
>            Assignee: guoquan
>
> The SentryPolicyStoreProcessor needs to get the groupMappingService to parse username. The function code as followings:
> {code}
>     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);
>     Constructor<?> constrctor = Class.forName(groupMapping)
>           .getDeclaredConstructor(Configuration.class, String.class);
>       constrctor.setAccessible(true);
>       groupMappingService = (GroupMappingService) constrctor
>           .newInstance(new Object[] { conf, authResoruce });
> {code}
> When create a 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)