You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by pr...@apache.org on 2014/09/17 18:38:31 UTC
git commit: SENTRY-441: Improve the message for SemanticException
(Sravya Tirukkovalur via Prasad Mujumdar)
Repository: incubator-sentry
Updated Branches:
refs/heads/master b8f0622ff -> 58be76016
SENTRY-441: Improve the message for SemanticException (Sravya Tirukkovalur via Prasad Mujumdar)
Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/58be7601
Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/58be7601
Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/58be7601
Branch: refs/heads/master
Commit: 58be76016768fdb38f2cdb7e4b0acd7d8e468d0d
Parents: b8f0622
Author: Prasad Mujumdar <pr...@cloudera.com>
Authored: Wed Sep 17 09:36:49 2014 -0700
Committer: Prasad Mujumdar <pr...@cloudera.com>
Committed: Wed Sep 17 09:36:49 2014 -0700
----------------------------------------------------------------------
.../org/apache/sentry/binding/hive/HiveAuthzBindingHook.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/58be7601/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 a760516..6a00dc9 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
@@ -317,7 +317,9 @@ public class HiveAuthzBindingHook extends AbstractSemanticAnalyzerHook {
permsRequired += perm + ";";
}
SessionState.get().getConf().set(HiveAuthzConf.HIVE_SENTRY_AUTH_ERRORS, permsRequired);
- throw new SemanticException(HiveAuthzConf.HIVE_SENTRY_PRIVILEGE_ERROR_MESSAGE, e);
+ String msg = HiveAuthzConf.HIVE_SENTRY_PRIVILEGE_ERROR_MESSAGE + "\n Required privileges for this query: "
+ + permsRequired;
+ throw new SemanticException(msg, e);
}
if ("true".equalsIgnoreCase(context.getConf().
get(HiveAuthzConf.HIVE_SENTRY_MOCK_COMPILATION))) {