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

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

    [ https://issues.apache.org/jira/browse/SENTRY-736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14543506#comment-14543506 ] 

Hadoop QA commented on SENTRY-736:
----------------------------------

Here are the results of testing the latest attachment
https://issues.apache.org/jira/secure/attachment/12732829/SENTRY-736.001.patch against master.

{color:green}Overall:{color} +1 all checks pass

{color:green}SUCCESS:{color} all tests passed

Console output: https://builds.apache.org/job/PreCommit-SENTRY-Build/597/console

This message is automatically generated.

> 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
>         Attachments: SENTRY-736.001.patch
>
>
> 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 HadoopGroupMappingService new instance, it will throw a NoSuchMethodException, the log is as following:
> {code}
>        org.apache.sentry.SentryUserException: Unable to instantiate group mapping
> 	at org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.getGroupsFromUserName(SentryPolicyStoreProcessor.java:640)
> 	at org.apache.sentry.provider.db.generic.service.thrift.SentryGenericPolicyProcessor.getRequestorGroups(SentryGenericPolicyProcessor.java:111)
> 	at org.apache.sentry.provider.db.generic.service.thrift.SentryGenericPolicyProcessor$2.handle(SentryGenericPolicyProcessor.java:282)
> 	at org.apache.sentry.provider.db.generic.service.thrift.SentryGenericPolicyProcessor.requestHandle(SentryGenericPolicyProcessor.java:173)
> 	at org.apache.sentry.provider.db.generic.service.thrift.SentryGenericPolicyProcessor.create_sentry_role(SentryGenericPolicyProcessor.java:279)
> 	at org.apache.sentry.provider.db.generic.service.thrift.SentryGenericPolicyService$Processor$create_sentry_role.getResult(SentryGenericPolicyService.java:773)
> 	at org.apache.sentry.provider.db.generic.service.thrift.SentryGenericPolicyService$Processor$create_sentry_role.getResult(SentryGenericPolicyService.java:758)
> 	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> 	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> 	at org.apache.thrift.TMultiplexedProcessor.process(TMultiplexedProcessor.java:123)
> 	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NoSuchMethodException: org.apache.sentry.provider.common.HadoopGroupMappingService.<init>(org.apache.hadoop.conf.Configuration, java.lang.String)
> 	at java.lang.Class.getConstructor0(Class.java:2849)
> 	at java.lang.Class.getDeclaredConstructor(Class.java:2053)
> 	at org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.getGroupsFromUserName(SentryPolicyStoreProcessor.java:634)
> 	... 13 more
> {code}



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