Repository: incubator-sentry
Updated Branches:
  refs/heads/master 597a3cdd3 -> 7f123002c


Fix PMD error for unused field when enable Hive authz V2 (Dapeng Sun, reviewed 
by Colin Ma)


Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/7f123002
Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/7f123002
Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/7f123002

Branch: refs/heads/master
Commit: 7f123002cdd031fe8a821eb869fc83152539b6c5
Parents: 597a3cd
Author: Sun Dapeng <[email protected]>
Authored: Wed Feb 3 09:48:42 2016 +0800
Committer: Sun Dapeng <[email protected]>
Committed: Wed Feb 3 09:48:42 2016 +0800

----------------------------------------------------------------------
 .../DefaultSentryAccessController.java          | 21 ++++++++------------
 1 file changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/7f123002/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryAccessController.java
----------------------------------------------------------------------
diff --git 
a/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryAccessController.java
 
b/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryAccessController.java
index 9e72b78..57de2ac 100644
--- 
a/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryAccessController.java
+++ 
b/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryAccessController.java
@@ -181,8 +181,7 @@ public class DefaultSentryAccessController extends 
SentryHiveAccessController {
       List<HivePrivilege> hivePrivileges, HivePrivilegeObject hivePrivObject,
       HivePrincipal grantorPrincipal, boolean grantOption) throws 
HiveAuthzPluginException,
       HiveAccessControlException {
-    grantOrRevokePrivlegeOnRole(hivePrincipals, hivePrivileges, 
hivePrivObject, grantorPrincipal,
-        grantOption, true);
+    grantOrRevokePrivlegeOnRole(hivePrincipals, hivePrivileges, 
hivePrivObject, grantOption, true);
   }
 
   @Override
@@ -190,22 +189,21 @@ public class DefaultSentryAccessController extends 
SentryHiveAccessController {
       List<HivePrivilege> hivePrivileges, HivePrivilegeObject hivePrivObject,
       HivePrincipal grantorPrincipal, boolean grantOption) throws 
HiveAuthzPluginException,
       HiveAccessControlException {
-    grantOrRevokePrivlegeOnRole(hivePrincipals, hivePrivileges, 
hivePrivObject, grantorPrincipal,
-        grantOption, false);
+    grantOrRevokePrivlegeOnRole(hivePrincipals, hivePrivileges, 
hivePrivObject, grantOption, false);
   }
 
   @Override
   public void grantRole(List<HivePrincipal> hivePrincipals, List<String> roles,
       boolean grantOption, HivePrincipal grantorPrinc) throws 
HiveAuthzPluginException,
       HiveAccessControlException {
-    grantOrRevokeRoleOnGroup(hivePrincipals, roles, grantOption, grantorPrinc, 
true);
+    grantOrRevokeRoleOnGroup(hivePrincipals, roles, grantorPrinc, true);
   }
 
   @Override
   public void revokeRole(List<HivePrincipal> hivePrincipals, List<String> 
roles,
       boolean grantOption, HivePrincipal grantorPrinc) throws 
HiveAuthzPluginException,
       HiveAccessControlException {
-    grantOrRevokeRoleOnGroup(hivePrincipals, roles, grantOption, grantorPrinc, 
false);
+    grantOrRevokeRoleOnGroup(hivePrincipals, roles, grantorPrinc, false);
   }
 
 
@@ -358,14 +356,12 @@ public class DefaultSentryAccessController extends 
SentryHiveAccessController {
    * @param hivePrincipals
    * @param hivePrivileges
    * @param hivePrivObject
-   * @param grantorPrincipal
    * @param grantOption
    * @param isGrant
    */
   private void grantOrRevokePrivlegeOnRole(List<HivePrincipal> hivePrincipals,
-      List<HivePrivilege> hivePrivileges, HivePrivilegeObject hivePrivObject,
-      HivePrincipal grantorPrincipal, boolean grantOption, boolean isGrant)
-      throws HiveAuthzPluginException, HiveAccessControlException {
+      List<HivePrivilege> hivePrivileges, HivePrivilegeObject hivePrivObject, 
boolean grantOption,
+      boolean isGrant) throws HiveAuthzPluginException, 
HiveAccessControlException {
     try {
       sentryClient = getSentryClient();
 
@@ -477,13 +473,12 @@ public class DefaultSentryAccessController extends 
SentryHiveAccessController {
    *
    * @param hivePrincipals
    * @param roles
-   * @param grantOption
    * @param grantorPrinc
    * @param isGrant
    */
   private void grantOrRevokeRoleOnGroup(List<HivePrincipal> hivePrincipals, 
List<String> roles,
-      boolean grantOption, HivePrincipal grantorPrinc, boolean isGrant)
-      throws HiveAuthzPluginException, HiveAccessControlException {
+      HivePrincipal grantorPrinc, boolean isGrant) throws 
HiveAuthzPluginException,
+      HiveAccessControlException {
     try {
       sentryClient = getSentryClient();
       // get principals

Reply via email to