hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jxi...@apache.org
Subject [1/2] hive git commit: HIVE-13043: Reload function has no impact to function registry (Jimmy, reviewed by Sergey)
Date Tue, 16 Feb 2016 16:07:32 GMT
Repository: hive
Updated Branches:
  refs/heads/master e5c184acb -> fab8700b9


HIVE-13043: Reload function has no impact to function registry (Jimmy, reviewed by Sergey)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/21cf6ff3
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/21cf6ff3
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/21cf6ff3

Branch: refs/heads/master
Commit: 21cf6ff3789ed94bdf61587e2e73fb94b1d9304c
Parents: e5c184a
Author: Jimmy Xiang <jxiang@apache.org>
Authored: Thu Feb 11 08:45:32 2016 -0800
Committer: Jimmy Xiang <jxiang@apache.org>
Committed: Mon Feb 15 07:53:56 2016 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java | 1 +
 ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java    | 1 +
 .../java/org/apache/hadoop/hive/ql/processors/HiveCommand.java   | 4 ++++
 .../hive/ql/security/authorization/plugin/HiveOperationType.java | 1 +
 .../authorization/plugin/sqlstd/Operation2Privilege.java         | 2 ++
 5 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/21cf6ff3/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java
index 98860c6..759cc36 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzerFactory.java
@@ -75,6 +75,7 @@ public final class SemanticAnalyzerFactory {
     commandType.put(HiveParser.TOK_SHOWCONF, HiveOperation.SHOWCONF);
     commandType.put(HiveParser.TOK_CREATEFUNCTION, HiveOperation.CREATEFUNCTION);
     commandType.put(HiveParser.TOK_DROPFUNCTION, HiveOperation.DROPFUNCTION);
+    commandType.put(HiveParser.TOK_RELOADFUNCTION, HiveOperation.RELOADFUNCTION);
     commandType.put(HiveParser.TOK_CREATEMACRO, HiveOperation.CREATEMACRO);
     commandType.put(HiveParser.TOK_DROPMACRO, HiveOperation.DROPMACRO);
     commandType.put(HiveParser.TOK_CREATEVIEW, HiveOperation.CREATEVIEW);

http://git-wip-us.apache.org/repos/asf/hive/blob/21cf6ff3/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java
index 07134b3..188cd6f 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/HiveOperation.java
@@ -74,6 +74,7 @@ public enum HiveOperation {
   SHOWCONF("SHOWCONF", null, null),
   CREATEFUNCTION("CREATEFUNCTION", null, null),
   DROPFUNCTION("DROPFUNCTION", null, null),
+  RELOADFUNCTION("RELOADFUNCTION", null, null),
   CREATEMACRO("CREATEMACRO", null, null),
   DROPMACRO("DROPMACRO", null, null),
   CREATEVIEW("CREATEVIEW", new Privilege[]{Privilege.SELECT}, new Privilege[]{Privilege.CREATE}),

http://git-wip-us.apache.org/repos/asf/hive/blob/21cf6ff3/ql/src/java/org/apache/hadoop/hive/ql/processors/HiveCommand.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/processors/HiveCommand.java b/ql/src/java/org/apache/hadoop/hive/ql/processors/HiveCommand.java
index c8c9831..58becda 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/processors/HiveCommand.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/processors/HiveCommand.java
@@ -75,6 +75,10 @@ public enum HiveCommand {
       } else if(command.length > 1 && "from".equalsIgnoreCase(command[1])) {
         //special handling for SQL "delete from <table> where..."
         return null;
+      } else if(command.length > 1 && "reload".equalsIgnoreCase(command[0])
+          && "function".equalsIgnoreCase(command[1])) {
+        //special handling for SQL "reload function"
+        return null;
       }
       else if(command.length > 1 && "set".equalsIgnoreCase(command[0]) &&
"autocommit".equalsIgnoreCase(command[1])) {
         return null;//don't want set autocommit true|false to get mixed with set hive.foo.bar...

http://git-wip-us.apache.org/repos/asf/hive/blob/21cf6ff3/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveOperationType.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveOperationType.java
b/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveOperationType.java
index 078f07e..c05ec3c 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveOperationType.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/HiveOperationType.java
@@ -76,6 +76,7 @@ public enum HiveOperationType {
   SHOWCONF,
   CREATEFUNCTION,
   DROPFUNCTION,
+  RELOADFUNCTION,
   CREATEMACRO,
   DROPMACRO,
   CREATEVIEW,

http://git-wip-us.apache.org/repos/asf/hive/blob/21cf6ff3/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/Operation2Privilege.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/Operation2Privilege.java
b/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/Operation2Privilege.java
index c6143f6..4ad874e 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/Operation2Privilege.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/Operation2Privilege.java
@@ -338,6 +338,8 @@ public class Operation2Privilege {
 (null, ADMIN_PRIV_AR));
     op2Priv.put(HiveOperationType.DROPFUNCTION, PrivRequirement.newIOPrivRequirement
 (null, ADMIN_PRIV_AR));
+    op2Priv.put(HiveOperationType.RELOADFUNCTION, PrivRequirement.newIOPrivRequirement
+(null, null));
     op2Priv.put(HiveOperationType.CREATEMACRO, PrivRequirement.newIOPrivRequirement
 (null, ADMIN_PRIV_AR));
     op2Priv.put(HiveOperationType.DROPMACRO, PrivRequirement.newIOPrivRequirement


Mime
View raw message