You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by to...@apache.org on 2018/08/31 18:51:25 UTC

[2/2] impala git commit: IMPALA-7513: Fix Sentry compilation error in 2.x

IMPALA-7513: Fix Sentry compilation error in 2.x

An update to Sentry 1.5.1-cdh5.16.0-SNAPSHOT broke the build. This patch
fixes it by uploading the new CDH components, which includes Sentry server
to make sure the Sentry client and server dependencies are coherent.

Testing:
- Ran FE tests

Change-Id: I99c1aba398ea798a80fbbf76b4c5f8ad289be2ad
Reviewed-on: http://gerrit.cloudera.org:8080/11362
Reviewed-by: Fredy Wijaya <fw...@cloudera.com>
Reviewed-by: Quanlong Huang <hu...@gmail.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


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

Branch: refs/heads/2.x
Commit: 7f44a99c8c2392f188937656617ceeac21a28d3e
Parents: 4c2f35f
Author: Fredy Wijaya <fw...@cloudera.com>
Authored: Thu Aug 30 12:32:11 2018 -0700
Committer: Fredy Wijaya <fw...@cloudera.com>
Committed: Fri Aug 31 13:06:02 2018 +0000

----------------------------------------------------------------------
 .../apache/impala/catalog/AuthorizationPolicy.java    | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/7f44a99c/fe/src/main/java/org/apache/impala/catalog/AuthorizationPolicy.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/catalog/AuthorizationPolicy.java b/fe/src/main/java/org/apache/impala/catalog/AuthorizationPolicy.java
index bc83522..fd7fb56 100644
--- a/fe/src/main/java/org/apache/impala/catalog/AuthorizationPolicy.java
+++ b/fe/src/main/java/org/apache/impala/catalog/AuthorizationPolicy.java
@@ -24,7 +24,6 @@ import java.util.Set;
 import org.apache.commons.net.ntp.TimeStamp;
 import org.apache.log4j.Logger;
 import org.apache.sentry.core.common.ActiveRoleSet;
-import org.apache.sentry.provider.cache.PrivilegeCache;
 
 import org.apache.impala.thrift.TColumn;
 import org.apache.impala.thrift.TPrivilege;
@@ -36,6 +35,7 @@ import com.google.common.base.Strings;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
+import org.apache.sentry.provider.cache.SentryPrivilegeCache;
 
 /**
  * A thread safe authorization policy cache, consisting of roles, groups that are
@@ -51,11 +51,11 @@ import com.google.common.collect.Sets;
  * rather than embedding the role name. When a privilege is added to a role, we do
  * a lookup to get the role ID to using the roleIds_ map.
  * Acts as the backing cache for the Sentry cached based provider (which is why
- * PrivilegeCache is implemented).
+ * SentryPrivilegeCache is implemented).
  * TODO: Instead of calling into Sentry to perform final authorization checks, we
  * should parse/validate the privileges in Impala.
  */
-public class AuthorizationPolicy implements PrivilegeCache {
+public class AuthorizationPolicy implements SentryPrivilegeCache {
   private static final Logger LOG = Logger.getLogger(AuthorizationPolicy.class);
 
   // Cache of role names (case-insensitive) to role objects.
@@ -295,8 +295,14 @@ public class AuthorizationPolicy implements PrivilegeCache {
   }
 
   @Override
+  public Set<String> listPrivileges(Set<String> groups, Set<String> users,
+      ActiveRoleSet roleSet) {
+    return listPrivileges(groups, roleSet);
+  }
+
+  @Override
   public void close() {
-    // Nothing to do, but required by PrivilegeCache.
+    // Nothing to do, but required by SentryPrivilegeCache.
   }
 
   /**