hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stak...@apache.org
Subject hive git commit: HIVE-17179: Add InterfaceAudience and InterfaceStability annotations for Hook APIs (Sahil Takiar, reviewed by Aihua Xu)
Date Fri, 28 Jul 2017 18:34:34 GMT
Repository: hive
Updated Branches:
  refs/heads/master f5091f55a -> 1c1ad5e73


HIVE-17179: Add InterfaceAudience and InterfaceStability annotations for Hook APIs (Sahil
Takiar, reviewed by Aihua Xu)


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

Branch: refs/heads/master
Commit: 1c1ad5e738fa6110c44a8c05eb33963ce56914e0
Parents: f5091f5
Author: Sahil Takiar <takiar.sahil@gmail.com>
Authored: Fri Jul 28 11:29:55 2017 -0700
Committer: Sahil Takiar <stakiar@cloudera.com>
Committed: Fri Jul 28 11:29:55 2017 -0700

----------------------------------------------------------------------
 .../hadoop/hive/metastore/hooks/JDOConnectionURLHook.java      | 4 ++++
 ql/src/java/org/apache/hadoop/hive/ql/HiveDriverRunHook.java   | 4 ++++
 .../org/apache/hadoop/hive/ql/HiveDriverRunHookContext.java    | 4 ++++
 .../apache/hadoop/hive/ql/hooks/ExecuteWithHookContext.java    | 5 +++++
 ql/src/java/org/apache/hadoop/hive/ql/hooks/Hook.java          | 6 ++++++
 ql/src/java/org/apache/hadoop/hive/ql/hooks/HookContext.java   | 4 ++++
 ql/src/java/org/apache/hadoop/hive/ql/hooks/PostExecute.java   | 4 ++++
 ql/src/java/org/apache/hadoop/hive/ql/hooks/PreExecute.java    | 4 ++++
 .../org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHook.java     | 5 +++++
 .../apache/hadoop/hive/ql/hooks/QueryLifeTimeHookContext.java  | 4 ++++
 .../hadoop/hive/ql/hooks/QueryLifeTimeHookWithParseHooks.java  | 5 +++++
 .../apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHook.java  | 4 ++++
 .../hadoop/hive/ql/parse/HiveSemanticAnalyzerHookContext.java  | 4 ++++
 .../org/apache/hive/service/cli/session/HiveSessionHook.java   | 4 ++++
 14 files changed, 61 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/metastore/src/java/org/apache/hadoop/hive/metastore/hooks/JDOConnectionURLHook.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/hooks/JDOConnectionURLHook.java
b/metastore/src/java/org/apache/hadoop/hive/metastore/hooks/JDOConnectionURLHook.java
index 4fa841b..a1a2fb9 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/hooks/JDOConnectionURLHook.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/hooks/JDOConnectionURLHook.java
@@ -19,12 +19,16 @@
 package org.apache.hadoop.hive.metastore.hooks;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
 
 /**
  * JDOConnectURLHook is used to get the URL that JDO uses to connect to the
  * database that stores the metastore data. Classes implementing this must be
  * thread-safe (for Thrift server).
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface JDOConnectionURLHook {
 
   /**

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/HiveDriverRunHook.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/HiveDriverRunHook.java b/ql/src/java/org/apache/hadoop/hive/ql/HiveDriverRunHook.java
index 4dafeac..94fde3b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/HiveDriverRunHook.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/HiveDriverRunHook.java
@@ -18,6 +18,8 @@
 
 package org.apache.hadoop.hive.ql;
 
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
 import org.apache.hadoop.hive.ql.hooks.Hook;
 
 /**
@@ -29,6 +31,8 @@ import org.apache.hadoop.hive.ql.hooks.Hook;
  * Note that the lifetime of an instantiated hook object is scoped to
  * the analysis of a single statement; hook instances are never reused.
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface HiveDriverRunHook extends Hook {
   /**
    * Invoked before Hive begins any processing of a command in the Driver,

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/HiveDriverRunHookContext.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/HiveDriverRunHookContext.java b/ql/src/java/org/apache/hadoop/hive/ql/HiveDriverRunHookContext.java
index 777730b..ce2b28d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/HiveDriverRunHookContext.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/HiveDriverRunHookContext.java
@@ -19,11 +19,15 @@
 package org.apache.hadoop.hive.ql;
 
 import org.apache.hadoop.conf.Configurable;
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
 
 /**
  * Context information provided by Hive to implementations of
  * HiveDriverRunHook.
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface HiveDriverRunHookContext extends Configurable{
   public String getCommand();
   public void setCommand(String command);

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/hooks/ExecuteWithHookContext.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/ExecuteWithHookContext.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/ExecuteWithHookContext.java
index 2c75878..aa3b88a 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/ExecuteWithHookContext.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/ExecuteWithHookContext.java
@@ -18,12 +18,17 @@
 
 package org.apache.hadoop.hive.ql.hooks;
 
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
+
 /**
  *
  * ExecuteWithHookContext is a new interface that the Pre/Post Execute Hook can run with
the HookContext.
  *
  */
 
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface ExecuteWithHookContext extends Hook {
 
   /**

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/hooks/Hook.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/Hook.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/Hook.java
index bd40e4b..fa71c19 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/Hook.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/Hook.java
@@ -17,11 +17,17 @@
  */
 
 package org.apache.hadoop.hive.ql.hooks;
+
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
+
 /**
  *
  * The new interface for all the pre execute hooks and post execute hooks
  *
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface Hook {
 
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/hooks/HookContext.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/HookContext.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/HookContext.java
index 97ad3c7..7b61730 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/HookContext.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/HookContext.java
@@ -25,6 +25,8 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.hadoop.fs.ContentSummary;
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.ql.QueryInfo;
 import org.apache.hadoop.hive.ql.QueryPlan;
@@ -41,6 +43,8 @@ import org.apache.hadoop.yarn.api.records.ApplicationId;
  * Hook Context keeps all the necessary information for all the hooks.
  * New implemented hook can get the query plan, job conf and the list of all completed tasks
from this hook context
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public class HookContext {
 
   static public enum HookType {

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/hooks/PostExecute.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/PostExecute.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/PostExecute.java
index 453abfa..466450e 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/PostExecute.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/PostExecute.java
@@ -20,6 +20,8 @@ package org.apache.hadoop.hive.ql.hooks;
 
 import java.util.Set;
 
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
 import org.apache.hadoop.hive.ql.session.SessionState;
 import org.apache.hadoop.security.UserGroupInformation;
 
@@ -27,6 +29,8 @@ import org.apache.hadoop.security.UserGroupInformation;
  * The post execute hook interface. A list of such hooks can be configured to be
  * called after compilation and before execution.
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface PostExecute extends Hook {
 
   /**

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/hooks/PreExecute.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/PreExecute.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/PreExecute.java
index 8ca9b1b..bc16334 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/PreExecute.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/PreExecute.java
@@ -20,6 +20,8 @@ package org.apache.hadoop.hive.ql.hooks;
 
 import java.util.Set;
 
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
 import org.apache.hadoop.hive.ql.session.SessionState;
 import org.apache.hadoop.security.UserGroupInformation;
 
@@ -27,6 +29,8 @@ import org.apache.hadoop.security.UserGroupInformation;
  * The pre execute hook interface. A list of such hooks can be configured to be
  * called after compilation and before execution.
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface PreExecute extends Hook {
 
   /**

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHook.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHook.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHook.java
index be57452..3c04fcc 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHook.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHook.java
@@ -18,9 +18,14 @@
 
 package org.apache.hadoop.hive.ql.hooks;
 
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
+
 /**
  * A type of hook which triggers before query compilation and after query execution.
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface QueryLifeTimeHook extends Hook {
 
   /**

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookContext.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookContext.java b/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookContext.java
index c599173..b0a9f96 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookContext.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookContext.java
@@ -18,11 +18,15 @@
 
 package org.apache.hadoop.hive.ql.hooks;
 
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
 import org.apache.hadoop.hive.conf.HiveConf;
 
 /**
  * Hook context for {@link QueryLifeTimeHook}.
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface QueryLifeTimeHookContext {
   /**
    * Get the current Hive configuration

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookWithParseHooks.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookWithParseHooks.java
b/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookWithParseHooks.java
index 787590d..afdf527 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookWithParseHooks.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/hooks/QueryLifeTimeHookWithParseHooks.java
@@ -18,9 +18,14 @@
 package org.apache.hadoop.hive.ql.hooks;
 
 
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
+
 /**
  * Extension of {@link QueryLifeTimeHook} that has hooks for pre and post parsing of a query.
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface QueryLifeTimeHookWithParseHooks extends QueryLifeTimeHook {
 
   /**

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHook.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHook.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHook.java
index d1e761b..08aa7e0 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHook.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHook.java
@@ -21,6 +21,8 @@ package org.apache.hadoop.hive.ql.parse;
 import java.io.Serializable;
 import java.util.List;
 
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
 import org.apache.hadoop.hive.ql.exec.Task;
 import org.apache.hadoop.hive.ql.hooks.Hook;
 
@@ -36,6 +38,8 @@ import org.apache.hadoop.hive.ql.hooks.Hook;
  * Note that the lifetime of an instantiated hook object is scoped to
  * the analysis of a single statement; hook instances are never reused.
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface HiveSemanticAnalyzerHook extends Hook {
   /**
    * Invoked before Hive performs its own semantic analysis on

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHookContext.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHookContext.java
b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHookContext.java
index 166375c..0481b48 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHookContext.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveSemanticAnalyzerHookContext.java
@@ -21,6 +21,8 @@ package org.apache.hadoop.hive.ql.parse;
 import java.util.Set;
 
 import org.apache.hadoop.conf.Configurable;
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
 import org.apache.hadoop.hive.ql.hooks.ReadEntity;
 import org.apache.hadoop.hive.ql.hooks.WriteEntity;
 import org.apache.hadoop.hive.ql.metadata.Hive;
@@ -31,6 +33,8 @@ import org.apache.hadoop.hive.ql.plan.HiveOperation;
  * Context information provided by Hive to implementations of
  * HiveSemanticAnalyzerHook.
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface HiveSemanticAnalyzerHookContext extends Configurable{
   /**
    * @return the Hive db instance; hook implementations can use this for

http://git-wip-us.apache.org/repos/asf/hive/blob/1c1ad5e7/service/src/java/org/apache/hive/service/cli/session/HiveSessionHook.java
----------------------------------------------------------------------
diff --git a/service/src/java/org/apache/hive/service/cli/session/HiveSessionHook.java b/service/src/java/org/apache/hive/service/cli/session/HiveSessionHook.java
index 06388cc..5a7b634 100644
--- a/service/src/java/org/apache/hive/service/cli/session/HiveSessionHook.java
+++ b/service/src/java/org/apache/hive/service/cli/session/HiveSessionHook.java
@@ -18,6 +18,8 @@
 
 package org.apache.hive.service.cli.session;
 
+import org.apache.hadoop.hive.common.classification.InterfaceAudience;
+import org.apache.hadoop.hive.common.classification.InterfaceStability;
 import org.apache.hadoop.hive.ql.hooks.Hook;
 import org.apache.hive.service.cli.HiveSQLException;
 
@@ -27,6 +29,8 @@ import org.apache.hive.service.cli.HiveSQLException;
  *  when session manager starts a new session
  *
  */
+@InterfaceAudience.Public
+@InterfaceStability.Stable
 public interface HiveSessionHook extends Hook {
 
   /**


Mime
View raw message