You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by ls...@apache.org on 2016/01/30 08:23:17 UTC

incubator-sentry git commit: SENTRY-1007: Sentry column-level performance for wide tables (Dapeng Sun via Lenni Kuff)

Repository: incubator-sentry
Updated Branches:
  refs/heads/master a01a75011 -> 6ed0a1701


SENTRY-1007: Sentry column-level performance for wide tables (Dapeng Sun via Lenni Kuff)

Change-Id: I2299d0d45f33d082ee35a7e6a5e81a1587e5042b


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

Branch: refs/heads/master
Commit: 6ed0a17012fb1ff352fdbbd395cddd9018e26573
Parents: a01a750
Author: Lenni Kuff <ls...@cloudera.com>
Authored: Fri Jan 29 23:21:42 2016 -0800
Committer: Lenni Kuff <ls...@cloudera.com>
Committed: Fri Jan 29 23:21:42 2016 -0800

----------------------------------------------------------------------
 .../apache/sentry/binding/hive/HiveAuthzBindingHook.java | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/6ed0a170/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
----------------------------------------------------------------------
diff --git a/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java b/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
index ee00889..7d56435 100644
--- a/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
+++ b/sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
@@ -595,9 +595,16 @@ public class HiveAuthzBindingHook extends AbstractSemanticAnalyzerHook {
           stmtAuthObject.getOperationScope().toString());
     }
 
+    HiveAuthzBinding binding = null;
+    try {
+      binding = getHiveBindingWithPrivilegeCache(hiveAuthzBinding, context.getUserName());
+    } catch (SemanticException e) {
+      // Will use the original hiveAuthzBinding
+      binding = hiveAuthzBinding;
+    }
     // validate permission
-    hiveAuthzBinding.authorize(stmtOperation, stmtAuthObject, getCurrentSubject(context),
-        inputHierarchy, outputHierarchy);
+    binding.authorize(stmtOperation, stmtAuthObject, getCurrentSubject(context), inputHierarchy,
+        outputHierarchy);
   }
 
   private HiveOperation getCurrentHiveStmtOp() {