----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54454/#review167795 -----------------------------------------------------------
sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 29 (patched) <https://reviews.apache.org/r/54454/#comment239765> The comment reflects the old code, not the current one sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 32 (patched) <https://reviews.apache.org/r/54454/#comment239766> can be final sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 36 (patched) <https://reviews.apache.org/r/54454/#comment239767> Remove "this method". "Validate privileges within the input request" sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 37 (patched) <https://reviews.apache.org/r/54454/#comment239768> s/invoked/invokes/ "Each privilege should have a non-empty server name and action." sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 39 (patched) <https://reviews.apache.org/r/54454/#comment239769> There is no need to specify type in the javadoc - it is available in the code. sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 40 (patched) <https://reviews.apache.org/r/54454/#comment239770> @throws SentryInvalidInputException if one of the rivileges is missing mandatory fields or the grant option of the privilege is invalid sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 44 (patched) <https://reviews.apache.org/r/54454/#comment239771> extra empty line sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 45 (patched) <https://reviews.apache.org/r/54454/#comment239772> It was already documented above - is there a need to repeat? sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 47 (patched) <https://reviews.apache.org/r/54454/#comment239773> space after if sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 52 (patched) <https://reviews.apache.org/r/54454/#comment239774> missing newline sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 53 (patched) <https://reviews.apache.org/r/54454/#comment239775> Remove "This function" sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 56 (patched) <https://reviews.apache.org/r/54454/#comment239776> @throws sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 58 (patched) <https://reviews.apache.org/r/54454/#comment239777> This function seems to be the same as the one in RevokePrivilegeRequestValidator() - is it possible to just call it? sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 71 (patched) <https://reviews.apache.org/r/54454/#comment239778> new line sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 72 (patched) <https://reviews.apache.org/r/54454/#comment239779> Remove "This function" sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 76 (patched) <https://reviews.apache.org/r/54454/#comment239780> Add @throws javadoc sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 78 (patched) <https://reviews.apache.org/r/54454/#comment239781> space before { sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 80 (patched) <https://reviews.apache.org/r/54454/#comment239782> space after if sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java Lines 82 (patched) <https://reviews.apache.org/r/54454/#comment239783> s/grant/GRANT/ sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/RevokePrivilegeRequestValidator.java Lines 27 (patched) <https://reviews.apache.org/r/54454/#comment239784> Stale comment sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/RevokePrivilegeRequestValidator.java Lines 31 (patched) <https://reviews.apache.org/r/54454/#comment239785> can be final sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/RevokePrivilegeRequestValidator.java Lines 35 (patched) <https://reviews.apache.org/r/54454/#comment239786> See comments for the GrantPrivilegeRequestValidator - most of them apply here. - Alexander Kolbasov On March 2, 2017, 2:44 p.m., kalyan kumar kalvagadda wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54454/ > ----------------------------------------------------------- > > (Updated March 2, 2017, 2:44 p.m.) > > > Review request for sentry, Alexander Kolbasov, Hao Hao, Vamsee Yarlagadda, > and Vadim Spector. > > > Bugs: SENTRY-1548 > https://issues.apache.org/jira/browse/SENTRY-1548 > > > Repository: sentry > > > Description > ------- > > SENTRY-1548 Setting GrantOption to UNSET upsets Sentry > > I'm working on SENTRY-1547 and SENTRY-1548. Fixe for both the issues should > be addressed together. Last patch was bit confusing as I had to remove the > changes done for SENTRY-1547. This diff has changes for both of them. > > > Diffs > ----- > > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/SentryPolicyStoreProcessor.java > b10c2f2 > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/GrantPrivilegeRequestValidator.java > PRE-CREATION > > sentry-service/sentry-service-server/src/main/java/org/apache/sentry/provider/db/service/thrift/validator/RevokePrivilegeRequestValidator.java > PRE-CREATION > > > Diff: https://reviews.apache.org/r/54454/diff/7/ > > > Testing > ------- > > Verfied the changes using sentry thrift client. > > > Thanks, > > kalyan kumar kalvagadda > >
