> On Dec. 6, 2018, 5:15 p.m., Sergio Pena wrote: > > I'd like to see the part of the SentryPolicyStoreProcessor with this patch > > to give me a bette idea of how both classes will work together. I saw that > > the previous export method requires role -> privileges mapping, but this > > returns only the list of privileges. I don't know what's the idea, but if > > you write the code for SentryPolicyStoreProcessor too would be helpful.
Here is the basic idea. This is the suedo code to understand how the new api is used. public Map<String, Set<TSentryPrivilege>> getRoleNameTPrivilegesMap(List<TSentryAuthorizable> authorizables) throws Exception { return tm.executeTransaction( pm -> { List<MSentryPrivilege> mSentryPrivileges = **getPrivilegesForAuthorizables(pm, authorizables);** return getRolePrivilegesMap(mSentryPrivileges); }); } - kalyan kumar ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/69353/#review211096 ----------------------------------------------------------- On Nov. 15, 2018, 9:06 p.m., kalyan kumar kalvagadda wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/69353/ > ----------------------------------------------------------- > > (Updated Nov. 15, 2018, 9:06 p.m.) > > > Review request for sentry and Sergio Pena. > > > Bugs: SENTRY-2454 > https://issues.apache.org/jira/browse/SENTRY-2454 > > > Repository: sentry > > > Description > ------- > > New sentry API should be implemented to fetch the privileges granted to > authorizables and it's children. authorizables include database, tables, > columns and URI's. > > > Diffs > ----- > > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java > e2d6c85ac6b285e286c12f7eec669b841cf76e9d > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStoreInterface.java > e48eea377b842475f72b6fab4567a82c8fd93098 > > sentry-service/sentry-service-server/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java > ca8c41610d3dcd12b267579c3d3cbe5b7ba7b208 > > > Diff: https://reviews.apache.org/r/69353/diff/1/ > > > Testing > ------- > > Added new unit tests to test the API added. > > > Thanks, > > kalyan kumar kalvagadda > >