Repository: incubator-sentry Updated Branches: refs/heads/master 357d83fbc -> a48cc8c43
SENTRY-723: Clean unused methods in HiveAuthzBindingHook (Dapeng Sun, reviewed by Guoquan Shen) Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/a48cc8c4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/a48cc8c4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/a48cc8c4 Branch: refs/heads/master Commit: a48cc8c43ee813c73c2aa8d9f603e96350c641e5 Parents: 357d83f Author: Sun Dapeng <[email protected]> Authored: Tue May 12 15:32:07 2015 +0800 Committer: Sun Dapeng <[email protected]> Committed: Tue May 12 15:32:07 2015 +0800 ---------------------------------------------------------------------- .../sentry/binding/hive/HiveAuthzBindingHook.java | 17 ----------------- 1 file changed, 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/a48cc8c4/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 814e65d..23b6757 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 @@ -517,23 +517,6 @@ public class HiveAuthzBindingHook extends AbstractSemanticAnalyzerHook { inputHierarchy, outputHierarchy); } - private boolean isUDF(ReadEntity readEntity) { - return readEntity.getType().equals(Type.FUNCTION); - } - - private void checkUDFWhiteList(String queryUDF) throws AuthorizationException { - String whiteList = authzConf.get(HiveAuthzConf.AuthzConfVars.AUTHZ_UDF_WHITELIST.getVar()); - if (whiteList == null) { - return; - } - for (String hiveUDF : Splitter.on(",").omitEmptyStrings().trimResults().split(whiteList)) { - if (queryUDF.equalsIgnoreCase(hiveUDF)) { - return; // found the given UDF in whitelist - } - } - throw new AuthorizationException("The UDF " + queryUDF + " is not found in the list of allowed UDFs"); - } - private HiveOperation getCurrentHiveStmtOp() { SessionState sessState = SessionState.get(); if (sessState == null) {
