You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by "Lenni Kuff (JIRA)" <ji...@apache.org> on 2015/09/25 20:32:04 UTC

[jira] [Commented] (SENTRY-570) Bug fixing for the test case "TestMetaStoreWithPigHCat"

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

Lenni Kuff commented on SENTRY-570:
-----------------------------------

Is the test failure related to this patch or is it ready to be reviewed?

> Bug fixing for the test case "TestMetaStoreWithPigHCat"
> -------------------------------------------------------
>
>                 Key: SENTRY-570
>                 URL: https://issues.apache.org/jira/browse/SENTRY-570
>             Project: Sentry
>          Issue Type: Test
>            Reporter: Colin Ma
>            Assignee: Colin Ma
>         Attachments: SENTRY-570.001.patch
>
>
> The policyFile is not set correctly.
> Currently, the privilege is set by the following code, "server=server1->db=db_1->{color:red}table=*{color}->action=SELECT", and the value of table is "*". The method List<MSentryPrivilege> getMSentryPrivileges(Set<String> roleNames, TSentryAuthorizable authHierarchy) in SentryStore can't get this privilege.
> {code}
> .addPermissionsToRole(db_all_role, "server=server1->db=" + dbName)
>          .addPermissionsToRole("read_db_role",
>            "server=server1->db=" + dbName + "->table=*->action=SELECT")
> {code}
> The error setting cause the following exception,
> {code}
> try {
>    execPigLatin(USER2_1, pigServer, "store A into '" + dbName + "." + tabName + "' using "
>           + HCatStorer.class.getName() + " ('part_col=part2');");
>       fail("USER2_1 has no access to the metadata, exception will be thrown.");
>     } catch (IOException e) {
>       // ignore the exception
>     }
> {code}



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