Re: Review Request 34086: SENTRY-734: Update SentryPolicyStoreProcessor for grant user to role

2016-04-11 Thread Jerry Chen
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34086/#review128081 --- LGTM - Jerry Chen On April 11, 2016, 6:20 a.m., Colin Ma wrote

Re: Review Request 34086: SENTRY-734: Update SentryPolicyStoreProcessor for grant user to role

2016-04-08 Thread Jerry Chen
directly assigned to the user. - Jerry Chen On April 8, 2016, 6:40 a.m., Colin Ma wrote: > > --- > This is an automatically generated e-mail. To reply, visit

Re: Review Request 34086: SENTRY-734: Update SentryPolicyStoreProcessor for grant user to role

2016-04-07 Thread Jerry Chen
at we pass requtorUserNames. If we want to use new cases to cover this and don't want to modify here, I suggest to still use null. - Jerry Chen On April 8, 2016, 4:26 a.m., Colin Ma wrote: > > --- > This is an

Re: Review Request 34079: SENTRY-727: Update jdo model for grant user to role

2016-04-07 Thread Jerry Chen
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34079/#review127737 --- Ship it! Ship It! - Jerry Chen On April 8, 2016, 3:13 a.m

Re: Review Request 34082: SENTRY-730: Update policy engine for grant user to role

2016-04-07 Thread Jerry Chen
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34082/#review127735 --- Ship it! Ship It! - Jerry Chen On April 8, 2016, 3:45 a.m

Re: Review Request 45730: SENTRY-1178: Update Sentry Policy Service for export with specific auth object

2016-04-06 Thread Jerry Chen
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45730/#review127566 --- Ship it! Ship It! - Jerry Chen On April 6, 2016, 3:56 a.m

Re: Review Request 34087: SENTRY-735: Update AuthorizationProvider and e2e test for grant user to role

2016-04-06 Thread Jerry Chen
r what this is for: show the reason how the users and groups is related in testing roles for user feature? - Jerry Chen On April 6, 2016, 2:58 p.m., Colin Ma wrote: > > --- > This is an automatically generated e-mai

Re: Review Request 34086: SENTRY-734: Update SentryPolicyStoreProcessor for grant user to role

2016-04-06 Thread Jerry Chen
/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java <https://reviews.apache.org/r/34086/#comment190942> Question: why we need to remove the exception handler? - Jerry Chen On April 6, 2016, 2:56 p.m., Colin Ma

Re: Review Request 34086: SENTRY-734: Update SentryPolicyStoreProcessor for grant user to role

2016-04-06 Thread Jerry Chen
R to construct the userNames. requestorUserNames = Sets.newHashSet(ADMIN_USER); And perform grantRoleToUser similar to group to test both groups and users in this case instead of passing the empty user list. - Jerry Chen On April 6, 2016, 2:56 p.

Re: Review Request 34083: SENTRY-731: Update provider-backend for grant user to role

2016-04-06 Thread Jerry Chen
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34083/#review127553 --- LGTM - Jerry Chen On April 6, 2016, 2:55 p.m., Colin Ma wrote

Re: Review Request 34082: SENTRY-730: Update policy engine for grant user to role

2016-04-06 Thread Jerry Chen
icy/indexer/SimpleIndexerPolicyEngine.java (line 95) <https://reviews.apache.org/r/34082/#comment190912> Debug log as: ("Getting permissions for groups: {}, users: {}", groups, users); The same comment for several other instances. - Jerry Chen On April 6, 2016

Re: Review Request 34081: SENTRY-729: Update binding-hive for grant user to role

2016-04-06 Thread Jerry Chen
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34081/#review127550 --- LGTM - Jerry Chen On April 6, 2016, 2:50 p.m., Colin Ma wrote

Re: Review Request 34080: SENTRY-728: Update audit log for grant user to role

2016-04-06 Thread Jerry Chen
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34080/#review127549 --- LGTM - Jerry Chen On April 6, 2016, 2:48 p.m., Colin Ma wrote

Re: Review Request 34079: SENTRY-727: Update jdo model for grant user to role

2016-04-06 Thread Jerry Chen
st/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java (line 2016) <https://reviews.apache.org/r/34079/#comment190895> Suggest to pass null instead of new HashSet(). The same for the next instance. - Jerry Chen On

Re: Review Request 34078: SENTRY-726: Update thrift API for grant user to role

2016-04-06 Thread Jerry Chen
/sentry_policy_service.thrift (line 109) <https://reviews.apache.org/r/34078/#comment190889> Please don't change the index of field if we don't see specific reasons here. - Jerry Chen On April 6, 2016, 2:39 p.m., Colin Ma wrote: > >

Re: Review Request 34078: SENTRY-726: Update thrift API for grant user to role

2016-04-05 Thread Jerry Chen
/sentry_policy_service.thrift (line 231) <https://reviews.apache.org/r/34078/#comment190539> required field of users will make the thrift API not compatible. Suggest optional for this to keep API compatible. - Jerry Chen On April 6, 2016, 5:09 a.m., Colin Ma

Re: Review Request 45732: SENTRY-1179: Update Sentry config tool for export with specific auth object

2016-04-05 Thread Jerry Chen
me as null. but test it to make sure. - Jerry Chen On April 6, 2016, 2:52 a.m., Colin Ma wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https:/

Re: Review Request 45727: SENTRY-1177: Update SentryStore for export with specific auth object

2016-04-05 Thread Jerry Chen
/sentry/provider/db/service/persistent/SentryStore.java (line 2080) <https://reviews.apache.org/r/45727/#comment190504> Wrong indent spaces. 6 here. There are a lot other instances with 8 spaces indent including the code in tests. Should comply the format style. - Jerry Chen On

Re: Review Request 45730: SENTRY-1178: Update Sentry Policy Service for export with specific auth object

2016-04-05 Thread Jerry Chen
/sentry/service/thrift/SentryServiceUtil.java (line 72) <https://reviews.apache.org/r/45730/#comment190502> This static method is not trictly related to export. It is an general object path. Should name as parseObjectPath. - Jerry Chen On April 6, 2016, 2:38 a.m., Colin Ma

Re: Review Request 45730: SENTRY-1178: Update Sentry Policy Service for export with specific auth object

2016-04-05 Thread Jerry Chen
lines. But here we saw 8 spaces. There are a lot of other instances. Please correct them too. - Jerry Chen On April 6, 2016, 2:38 a.m., Colin Ma wrote: > > --- > This is an automatically generated e-mail. To r

Re: Review Request 45730: SENTRY-1178: Update Sentry Policy Service for export with specific auth object

2016-04-05 Thread Jerry Chen
/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java (line 912) <https://reviews.apache.org/r/45730/#comment190216> Can we add a new method if we cannot found instead of using convertToTSentryPrivilege which looks like a little wired? - Jerry Chen On April 5, 2016, 8:

Re: Review Request 45732: SENTRY-1179: Update Sentry config tool for export with specific auth object

2016-04-05 Thread Jerry Chen
ere is identical to the comments added above. - Jerry Chen On April 5, 2016, 8:03 a.m., Colin Ma wrote: > > --- > This is an automatically generated e-mail. To reply, vi

Re: Review Request 45727: SENTRY-1177: Update SentryStore for export with specific auth object

2016-04-05 Thread Jerry Chen
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45727/#review127061 --- LGTM - Jerry Chen On April 5, 2016, 7:38 a.m., Colin Ma wrote

Re: Review Request 45730: SENTRY-1178: Update Sentry Policy Service for export with specific auth object

2016-04-05 Thread Jerry Chen
return some role set and this role set will be passed to getGroupNameRoleNamesMap. This will not be the same as we pass getGroupNameRoleNamesMap(null). While we may want getGroupNameRoleNamesMap(null) for databaseName == null and tableName == null case. - Jerry Chen On April 5, 2016, 7:

Re: Review Request 45727: SENTRY-1177: Update SentryStore for export with specific auth object

2016-04-04 Thread Jerry Chen
l help. sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java (line 2113) <https://reviews.apache.org/r/45727/#comment190200> Please early return if null to keep the indent depth minimum. - Jerry Chen On April 5, 2016, 6:48 a.

Re: Review Request 45728: SENTRY-1176: Update thrift API for export with specific auth object

2016-04-04 Thread Jerry Chen
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45728/#review127053 --- LGTM - Jerry Chen On April 5, 2016, 6:28 a.m., Colin Ma wrote

Re: Review Request 45732: SENTRY-1179: Update Sentry config tool for export with specific auth object

2016-04-04 Thread Jerry Chen
ntry-binding/sentry-binding-hive-common/src/main/java/org/apache/sentry/binding/hive/authz/SentryConfigTool.java (line 460) <https://reviews.apache.org/r/45732/#comment190193> We may want to reconsider what character to use for the new concept name. - Jerry Chen On April 5, 2016, 5:49 a.

Re: Review Request 45730: SENTRY-1178: Update Sentry Policy Service for export with specific auth object

2016-04-04 Thread Jerry Chen
ry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/thrift/TestSentryServiceImportExport.java (line 96) <https://reviews.apache.org/r/45730/#comment190189> Use null to indicate NO value for the parameter. The same to other instance below.

Re: Review Request 45727: SENTRY-1177: Update SentryStore for export with specific auth object

2016-04-04 Thread Jerry Chen
apache.org/r/45727/#comment190174> sentryRolePrivilegesMap: local variable, doen'st have to be so long. It can be as simple as rolePrivilegesMap. It also nice to put the code from 2138 to 2153 into method so simplify the code logic and also reduce levels of code blocks. - Jer

Re: Review Request 45728: SENTRY-1176: Update thrift API for export with specific auth object

2016-04-04 Thread Jerry Chen
/sentry_policy_service.thrift (line 244) <https://reviews.apache.org/r/45728/#comment190170> My oppinion authObjectFilter is not quite a good name here. Naming suggestions: objectName objectPath - Jerry Chen On April 5, 2016, 3:53 a.m., Colin Ma

Re: Review Request 34087: SENTRY-735: Update AuthorizationProvider and e2e test for grant user to role

2016-03-31 Thread Jerry Chen
ling white space here. sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestGrantUserToRole.java (line 139) <https://reviews.apache.org/r/34087/#comment189575> Let's remove the trail

Re: Review Request 34086: SENTRY-734: Update SentryPolicyStoreProcessor for grant user to role

2016-03-31 Thread Jerry Chen
556> The same as to the name "ug". - Jerry Chen On May 12, 2015, 7:11 a.m., Colin Ma wrote: > > --- > This is an automatically generated e-mail. To reply,

Re: Review Request 34085: SENTRY-733: Update notification handler for grant user to role

2016-03-31 Thread Jerry Chen
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34085/#review126527 --- LGTM - Jerry Chen On May 12, 2015, 7:08 a.m., Colin Ma wrote

Re: Review Request 34084: SENTRY-732: Update sentry plugin for grant user to role

2016-03-31 Thread Jerry Chen
/hdfs/SentryPlugin.java (line 161) <https://reviews.apache.org/r/34084/#comment189541> Complete the todo. sentry-hdfs/sentry-hdfs-service/src/main/java/org/apache/sentry/hdfs/SentryPlugin.java (line 167) <https://reviews.apache.org/r/34084/#comment189543> Complete the tod

Re: Review Request 34083: SENTRY-731: Update provider-backend for grant user to role

2016-03-31 Thread Jerry Chen
et instance for other utility. - Jerry Chen On May 12, 2015, 8:19 a.m., Colin Ma wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https:/

Re: Review Request 34082: SENTRY-730: Update policy engine for grant user to role

2016-03-31 Thread Jerry Chen
licy/sqoop/SimpleSqoopPolicyEngine.java (line 72) <https://reviews.apache.org/r/34082/#comment189534> The same question above as to user support. - Jerry Chen On May 12, 2015, 7:01 a.m., Colin Ma wrote: > > --- > This is an automat

Re: Review Request 34081: SENTRY-729: Update binding-hive for grant user to role

2016-03-31 Thread Jerry Chen
/hadoop/hive/ql/exec/SentryGrantRevokeTask.java (line 237) <https://reviews.apache.org/r/34081/#comment189522> Suggest to use "name" instead of desc.getName() since name variable is there and used by other clauses. - Jerry Chen On May 12, 2015, 6:59 a.m.

Re: Review Request 34078: SENTRY-726: Update thrift API for grant user to role

2016-03-31 Thread Jerry Chen
in/resources/sentry_policy_service.thrift (line 296) <https://reviews.apache.org/r/34078/#comment189520> The same suggestion on using "ug". Since the names are already long, I may don't have to use shorten here. - Jerry Chen On May 12

Re: Review Request 34080: SENTRY-728: Update audit log for grant user to role

2016-03-31 Thread Jerry Chen
224) <https://reviews.apache.org/r/34080/#comment189516> Can this code block put after the group related code block? It seems that we follow a pattern to add the code for user after the group. But this time is reverse? - Jerry Chen On May 12, 2015, 6:57 a.

Re: Review Request 34079: SENTRY-727: Update jdo model for grant user to role

2016-03-31 Thread Jerry Chen
ava (line 1398) <https://reviews.apache.org/r/34079/#comment189237> Check: Do the two calls getRoleNamesForGroups and getRoleNamesForUsers need to be in the same transaction? - Jerry Chen On May 12, 2015, 6:54 a.m., Colin Ma wrote: > > ---