hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From the...@apache.org
Subject hive git commit: HIVE-10507 : Expose RetryingMetastoreClient to other external users of metastore client like Flume and Storm. (Hari Sankar Sivarama Subramaniyan via Thejas Nair)
Date Fri, 01 May 2015 00:32:39 GMT
Repository: hive
Updated Branches:
  refs/heads/master bcde1ce1d -> 9b4587437


HIVE-10507 : Expose  RetryingMetastoreClient to other external users of metastore client like
Flume and Storm. (Hari Sankar Sivarama Subramaniyan via Thejas Nair)


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

Branch: refs/heads/master
Commit: 9b4587437803ab9c20785ee89e0fac496eb8ef41
Parents: bcde1ce
Author: Thejas Nair <thejas@hortonworks.com>
Authored: Thu Apr 30 17:32:30 2015 -0700
Committer: Thejas Nair <thejas@hortonworks.com>
Committed: Thu Apr 30 17:32:30 2015 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hive/metastore/HiveMetaStoreClient.java |  3 ++-
 .../hadoop/hive/metastore/RetryingMetaStoreClient.java    | 10 ++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/9b458743/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
index b3f7859..de577ab 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
@@ -34,7 +34,6 @@ import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -153,6 +152,8 @@ import org.apache.thrift.transport.TTransportException;
  * Hive Metastore Client.
  * The public implementation of IMetaStoreClient. Methods not inherited from IMetaStoreClient
  * are not public and can change. Hence this is marked as unstable.
+ * For users who require retry mechanism when the connection between metastore and client
is
+ * broken, RetryingMetaStoreClient class should be used.
  */
 @Public
 @Unstable

http://git-wip-us.apache.org/repos/asf/hive/blob/9b458743/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java
b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java
index 16b4910..77da6f7 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java
@@ -29,6 +29,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hive.common.classification.InterfaceAudience.Public;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.security.UserGroupInformation;
@@ -44,6 +45,7 @@ import org.apache.thrift.transport.TTransportException;
  * each call.
  *
  */
+@Public
 public class RetryingMetaStoreClient implements InvocationHandler {
 
   private static final Log LOG = LogFactory.getLog(RetryingMetaStoreClient.class.getName());
@@ -68,11 +70,19 @@ public class RetryingMetaStoreClient implements InvocationHandler {
         HiveConf.class, HiveMetaHookLoader.class}, new Object[] {hiveConf, hookLoader});
   }
 
+  public static IMetaStoreClient getProxy(HiveConf hiveConf, HiveMetaHookLoader hookLoader)
throws MetaException {
+    return getProxy(hiveConf, hookLoader, null, HiveMetaStoreClient.class.getName());
+  }
+
   public static IMetaStoreClient getProxy(HiveConf hiveConf, HiveMetaHookLoader hookLoader,
       String mscClassName) throws MetaException {
     return getProxy(hiveConf, hookLoader, null, mscClassName);
   }
 
+  /**
+   * This constructor is meant for Hive internal use only.
+   * Please use getProxy(HiveConf hiveConf, HiveMetaHookLoader hookLoader) for external purpose.
+   */
   public static IMetaStoreClient getProxy(HiveConf hiveConf, HiveMetaHookLoader hookLoader,
       Map<String, Long> metaCallTimeMap, String mscClassName) throws MetaException
{
 


Mime
View raw message