hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject hive git commit: HIVE-12918 : LLAP should never create embedded metastore when localizing functions (Sergey Shelukhin, reviewed by Sushanth Sowmyan)
Date Fri, 12 Feb 2016 20:37:37 GMT
Repository: hive
Updated Branches:
  refs/heads/master 4f90a7156 -> 28cf89266


HIVE-12918 : LLAP should never create embedded metastore when localizing functions (Sergey
Shelukhin, reviewed by Sushanth Sowmyan)


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

Branch: refs/heads/master
Commit: 28cf8926660ec3abdd4fa0ef40478e48333f5f13
Parents: 4f90a71
Author: Sergey Shelukhin <sershe@apache.org>
Authored: Fri Feb 12 12:28:45 2016 -0800
Committer: Sergey Shelukhin <sershe@apache.org>
Committed: Fri Feb 12 12:28:45 2016 -0800

----------------------------------------------------------------------
 .../hive/hcatalog/common/HiveClientCache.java   | 12 +++---
 .../apache/hive/hcatalog/cli/TestPermsGrp.java  |  2 +-
 .../mapreduce/TestHCatMultiOutputFormat.java    |  2 +-
 .../mapreduce/TestHCatOutputFormat.java         |  2 +-
 .../mapreduce/TestHCatPartitionPublish.java     |  2 +-
 .../AbstractTestAuthorizationApiAuthorizer.java |  2 +-
 .../metastore/TestEmbeddedHiveMetaStore.java    |  2 +-
 .../hadoop/hive/metastore/TestFilterHooks.java  |  2 +-
 ...TestHiveMetaStoreWithEnvironmentContext.java |  2 +-
 .../hadoop/hive/metastore/TestHiveMetaTool.java |  2 +-
 .../hive/metastore/TestMarkPartition.java       |  2 +-
 .../TestMetaStoreEndFunctionListener.java       |  2 +-
 .../metastore/TestMetaStoreEventListener.java   |  2 +-
 .../TestMetaStoreEventListenerOnlyOnCommit.java |  2 +-
 .../metastore/TestMetaStoreInitListener.java    |  2 +-
 .../TestPartitionNameWhitelistValidation.java   |  2 +-
 .../hive/metastore/TestRetryingHMSHandler.java  |  2 +-
 .../security/StorageBasedMetastoreTestBase.java |  2 +-
 .../TestAuthorizationPreEventListener.java      |  2 +-
 .../TestClientSideAuthorizationProvider.java    |  2 +-
 .../TestMetastoreAuthorizationProvider.java     |  2 +-
 .../TestMultiAuthorizationPreEventListener.java |  2 +-
 .../llap/daemon/impl/FunctionLocalizer.java     | 13 +++++-
 .../hive/metastore/HiveMetaStoreClient.java     | 13 +++---
 .../hive/metastore/RetryingMetaStoreClient.java | 45 +++++++++-----------
 .../metastore/TestHiveMetaStoreTimeout.java     |  2 +-
 .../apache/hadoop/hive/ql/metadata/Hive.java    | 21 ++++++---
 .../ql/metadata/SessionHiveMetaStoreClient.java |  9 ++--
 .../hive/metastore/TestMetastoreExpr.java       |  2 +-
 29 files changed, 92 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HiveClientCache.java
----------------------------------------------------------------------
diff --git a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HiveClientCache.java
b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HiveClientCache.java
index 0966581..9b30703 100644
--- a/hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HiveClientCache.java
+++ b/hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HiveClientCache.java
@@ -82,7 +82,7 @@ class HiveClientCache {
   }
 
   public static IMetaStoreClient getNonCachedHiveMetastoreClient(HiveConf hiveConf) throws
MetaException {
-    return RetryingMetaStoreClient.getProxy(hiveConf);
+    return RetryingMetaStoreClient.getProxy(hiveConf, true);
   }
 
   public HiveClientCache(HiveConf hiveConf) {
@@ -227,10 +227,11 @@ class HiveClientCache {
       return hiveCache.get(cacheKey, new Callable<ICacheableMetaStoreClient>() {
         @Override
         public ICacheableMetaStoreClient call() throws MetaException {
+          // This is called from HCat, so always allow embedded metastore (as was the default).
           return
               (ICacheableMetaStoreClient) RetryingMetaStoreClient.getProxy(cacheKey.getHiveConf(),
-                  new Class<?>[]{HiveConf.class, Integer.class},
-                  new Object[]{cacheKey.getHiveConf(), timeout},
+                  new Class<?>[]{HiveConf.class, Integer.class, Boolean.class},
+                  new Object[]{cacheKey.getHiveConf(), timeout, true},
                   CacheableHiveMetaStoreClient.class.getName());
         }
       });
@@ -326,8 +327,9 @@ class HiveClientCache {
     private final long expiryTime;
     private static final int EXPIRY_TIME_EXTENSION_IN_MILLIS = 60 * 1000;
 
-    CacheableHiveMetaStoreClient(final HiveConf conf, final Integer timeout) throws MetaException
{
-      super(conf);
+    CacheableHiveMetaStoreClient(final HiveConf conf, final Integer timeout, Boolean allowEmbedded)
+        throws MetaException {
+      super(conf, null, allowEmbedded);
       // Extend the expiry time with some extra time on top of guava expiry time to make
sure
       // that items closed() are for sure expired and would never be returned by guava.
       this.expiryTime = System.currentTimeMillis() + timeout * 1000 + EXPIRY_TIME_EXTENSION_IN_MILLIS;

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestPermsGrp.java
----------------------------------------------------------------------
diff --git a/hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestPermsGrp.java b/hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestPermsGrp.java
index 41c6b16..327ad6b 100644
--- a/hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestPermsGrp.java
+++ b/hcatalog/core/src/test/java/org/apache/hive/hcatalog/cli/TestPermsGrp.java
@@ -99,7 +99,7 @@ public class TestPermsGrp extends TestCase {
     hcatConf.setTimeVar(HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT, 60, TimeUnit.SECONDS);
     hcatConf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, false);
     clientWH = new Warehouse(hcatConf);
-    msc = new HiveMetaStoreClient(hcatConf, null);
+    msc = new HiveMetaStoreClient(hcatConf);
     System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " ");
     System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " ");
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java
----------------------------------------------------------------------
diff --git a/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java
b/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java
index 61efc1a..1964410 100644
--- a/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java
+++ b/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatMultiOutputFormat.java
@@ -208,7 +208,7 @@ public class TestHCatMultiOutputFormat {
 
     hiveConf.set(HiveConf.ConfVars.METASTOREWAREHOUSE.varname, warehousedir.toString());
     try {
-      hmsc = new HiveMetaStoreClient(hiveConf, null);
+      hmsc = new HiveMetaStoreClient(hiveConf);
       initalizeTables();
     } catch (Throwable e) {
       LOG.error("Exception encountered while setting up testcase", e);

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatOutputFormat.java
----------------------------------------------------------------------
diff --git a/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatOutputFormat.java
b/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatOutputFormat.java
index f716da9..d96b385 100644
--- a/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatOutputFormat.java
+++ b/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatOutputFormat.java
@@ -64,7 +64,7 @@ public class TestHCatOutputFormat extends TestCase {
     hiveConf = new HiveConf(this.getClass());
 
     try {
-      client = new HiveMetaStoreClient(hiveConf, null);
+      client = new HiveMetaStoreClient(hiveConf);
 
       initTable();
     } catch (Throwable e) {

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java
----------------------------------------------------------------------
diff --git a/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java
b/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java
index 5f9379b..1823f2e 100644
--- a/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java
+++ b/hcatalog/core/src/test/java/org/apache/hive/hcatalog/mapreduce/TestHCatPartitionPublish.java
@@ -125,7 +125,7 @@ public class TestHCatPartitionPublish {
     hcatConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
     hcatConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname,
         "false");
-    msc = new HiveMetaStoreClient(hcatConf, null);
+    msc = new HiveMetaStoreClient(hcatConf);
     System.setProperty(HiveConf.ConfVars.PREEXECHOOKS.varname, " ");
     System.setProperty(HiveConf.ConfVars.POSTEXECHOOKS.varname, " ");
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/AbstractTestAuthorizationApiAuthorizer.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/AbstractTestAuthorizationApiAuthorizer.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/AbstractTestAuthorizationApiAuthorizer.java
index f79372d..341c7ba 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/AbstractTestAuthorizationApiAuthorizer.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/AbstractTestAuthorizationApiAuthorizer.java
@@ -66,7 +66,7 @@ public abstract class AbstractTestAuthorizationApiAuthorizer {
     hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
     hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
 
-    msc = new HiveMetaStoreClient(hiveConf, null);
+    msc = new HiveMetaStoreClient(hiveConf);
 
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java
index b6b0e6e..c6a906a 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java
@@ -30,7 +30,7 @@ public class TestEmbeddedHiveMetaStore extends TestHiveMetaStore {
         HiveConf.ConfVars.HIVE_WAREHOUSE_SUBDIR_INHERIT_PERMS.varname, true);
     warehouse = new Warehouse(hiveConf);
     try {
-      client = new HiveMetaStoreClient(hiveConf, null);
+      client = new HiveMetaStoreClient(hiveConf);
     } catch (Throwable e) {
       System.err.println("Unable to open the metastore");
       System.err.println(StringUtils.stringifyException(e));

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestFilterHooks.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestFilterHooks.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestFilterHooks.java
index b8cf94f..1073abb 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestFilterHooks.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestFilterHooks.java
@@ -178,7 +178,7 @@ public class TestFilterHooks {
     MetaStoreUtils.startMetaStore(port, ShimLoader.getHadoopThriftAuthBridge(), hiveConf);
 
     SessionState.start(new CliSessionState(hiveConf));
-    msc = new HiveMetaStoreClient(hiveConf, null);
+    msc = new HiveMetaStoreClient(hiveConf);
     driver = new Driver(hiveConf);
 
     driver.run("drop database if exists " + DBNAME1  + " cascade");

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
index 8a37c11..00d70b0 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
@@ -83,7 +83,7 @@ public class TestHiveMetaStoreWithEnvironmentContext extends TestCase {
     hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
     hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
     SessionState.start(new CliSessionState(hiveConf));
-    msc = new HiveMetaStoreClient(hiveConf, null);
+    msc = new HiveMetaStoreClient(hiveConf);
 
     msc.dropDatabase(dbName, true, true);
 

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaTool.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaTool.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaTool.java
index 569bfd0..4bf918c 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaTool.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaTool.java
@@ -73,7 +73,7 @@ public class TestHiveMetaTool extends TestCase {
 
     try {
       HiveConf hiveConf = new HiveConf(HiveMetaTool.class);
-      client = new HiveMetaStoreClient(hiveConf, null);
+      client = new HiveMetaStoreClient(hiveConf);
 
       // Setup output stream to redirect output to
       os = new ByteArrayOutputStream();

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartition.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartition.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartition.java
index 57a5e6b..7cf351f 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartition.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartition.java
@@ -60,7 +60,7 @@ public class TestMarkPartition extends TestCase{
   public void testMarkingPartitionSet() throws CommandNeedRetryException, MetaException,
   TException, NoSuchObjectException, UnknownDBException, UnknownTableException,
   InvalidPartitionException, UnknownPartitionException, InterruptedException {
-    HiveMetaStoreClient msc = new HiveMetaStoreClient(hiveConf, null);
+    HiveMetaStoreClient msc = new HiveMetaStoreClient(hiveConf);
     driver = new Driver(hiveConf);
     driver.run("drop database if exists hive2215 cascade");
     driver.run("create database hive2215");

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
index e2c860c..1e78ff1 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
@@ -56,7 +56,7 @@ public class TestMetaStoreEndFunctionListener extends TestCase {
     hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
     hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
     SessionState.start(new CliSessionState(hiveConf));
-    msc = new HiveMetaStoreClient(hiveConf, null);
+    msc = new HiveMetaStoreClient(hiveConf);
     driver = new Driver(hiveConf);
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
index 2f3c04b..af16f75 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
@@ -102,7 +102,7 @@ public class TestMetaStoreEventListener extends TestCase {
     hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
     hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
     SessionState.start(new CliSessionState(hiveConf));
-    msc = new HiveMetaStoreClient(hiveConf, null);
+    msc = new HiveMetaStoreClient(hiveConf);
     driver = new Driver(hiveConf);
 
     driver.run("drop database if exists " + dbName + " cascade");

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerOnlyOnCommit.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerOnlyOnCommit.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerOnlyOnCommit.java
index 6a14982..0c3e703 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerOnlyOnCommit.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerOnlyOnCommit.java
@@ -60,7 +60,7 @@ public class TestMetaStoreEventListenerOnlyOnCommit extends TestCase {
     hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
     hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
     SessionState.start(new CliSessionState(hiveConf));
-    msc = new HiveMetaStoreClient(hiveConf, null);
+    msc = new HiveMetaStoreClient(hiveConf);
     driver = new Driver(hiveConf);
 
     DummyListener.notifyList.clear();

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreInitListener.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreInitListener.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreInitListener.java
index 42232fd..e8171e5 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreInitListener.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreInitListener.java
@@ -51,7 +51,7 @@ public class TestMetaStoreInitListener extends TestCase {
     hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
     hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
     SessionState.start(new CliSessionState(hiveConf));
-    msc = new HiveMetaStoreClient(hiveConf, null);
+    msc = new HiveMetaStoreClient(hiveConf);
     driver = new Driver(hiveConf);
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestPartitionNameWhitelistValidation.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestPartitionNameWhitelistValidation.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestPartitionNameWhitelistValidation.java
index 61d08cd..e0a905a 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestPartitionNameWhitelistValidation.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestPartitionNameWhitelistValidation.java
@@ -53,7 +53,7 @@ public class TestPartitionNameWhitelistValidation extends TestCase {
     hiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, "thrift://localhost:" + port);
     hiveConf.setIntVar(HiveConf.ConfVars.METASTORETHRIFTCONNECTIONRETRIES, 3);
     SessionState.start(new CliSessionState(hiveConf));
-    msc = new HiveMetaStoreClient(hiveConf, null);
+    msc = new HiveMetaStoreClient(hiveConf);
     driver = new Driver(hiveConf);
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
index e51ced7..99c09b7 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
@@ -61,7 +61,7 @@ public class TestRetryingHMSHandler extends TestCase {
     hiveConf.setIntVar(HiveConf.ConfVars.HMSHANDLERATTEMPTS, 2);
     hiveConf.setTimeVar(HiveConf.ConfVars.HMSHANDLERINTERVAL, 0, TimeUnit.MILLISECONDS);
     hiveConf.setBoolVar(HiveConf.ConfVars.HMSHANDLERFORCERELOADCONF, false);
-    msc = new HiveMetaStoreClient(hiveConf, null);
+    msc = new HiveMetaStoreClient(hiveConf);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/StorageBasedMetastoreTestBase.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/StorageBasedMetastoreTestBase.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/StorageBasedMetastoreTestBase.java
index 157ce62..0d88e09 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/StorageBasedMetastoreTestBase.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/StorageBasedMetastoreTestBase.java
@@ -94,7 +94,7 @@ public class StorageBasedMetastoreTestBase {
     ugi = Utils.getUGI();
 
     SessionState.start(new CliSessionState(clientHiveConf));
-    msc = new HiveMetaStoreClient(clientHiveConf, null);
+    msc = new HiveMetaStoreClient(clientHiveConf);
     driver = new Driver(clientHiveConf);
 
     setupFakeUser();

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestAuthorizationPreEventListener.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestAuthorizationPreEventListener.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestAuthorizationPreEventListener.java
index b8f5dd1..9dc45f2 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestAuthorizationPreEventListener.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestAuthorizationPreEventListener.java
@@ -75,7 +75,7 @@ public class TestAuthorizationPreEventListener extends TestCase {
 
 
     SessionState.start(new CliSessionState(clientHiveConf));
-    msc = new HiveMetaStoreClient(clientHiveConf, null);
+    msc = new HiveMetaStoreClient(clientHiveConf);
     driver = new Driver(clientHiveConf);
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestClientSideAuthorizationProvider.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestClientSideAuthorizationProvider.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestClientSideAuthorizationProvider.java
index 2e2da99..d895da8 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestClientSideAuthorizationProvider.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestClientSideAuthorizationProvider.java
@@ -86,7 +86,7 @@ public class TestClientSideAuthorizationProvider extends TestCase {
     ugi = Utils.getUGI();
 
     SessionState.start(new CliSessionState(clientHiveConf));
-    msc = new HiveMetaStoreClient(clientHiveConf, null);
+    msc = new HiveMetaStoreClient(clientHiveConf);
     driver = new Driver(clientHiveConf);
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestMetastoreAuthorizationProvider.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestMetastoreAuthorizationProvider.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestMetastoreAuthorizationProvider.java
index 3596e30..c228720 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestMetastoreAuthorizationProvider.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestMetastoreAuthorizationProvider.java
@@ -115,7 +115,7 @@ public class TestMetastoreAuthorizationProvider extends TestCase {
     ugi = Utils.getUGI();
 
     SessionState.start(new CliSessionState(clientHiveConf));
-    msc = new HiveMetaStoreClient(clientHiveConf, null);
+    msc = new HiveMetaStoreClient(clientHiveConf);
     driver = new Driver(clientHiveConf);
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestMultiAuthorizationPreEventListener.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestMultiAuthorizationPreEventListener.java
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestMultiAuthorizationPreEventListener.java
index 299812f..5c9bf05 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestMultiAuthorizationPreEventListener.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestMultiAuthorizationPreEventListener.java
@@ -70,7 +70,7 @@ public class TestMultiAuthorizationPreEventListener {
     clientHiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
 
     SessionState.start(new CliSessionState(clientHiveConf));
-    msc = new HiveMetaStoreClient(clientHiveConf, null);
+    msc = new HiveMetaStoreClient(clientHiveConf);
     driver = new Driver(clientHiveConf);
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/FunctionLocalizer.java
----------------------------------------------------------------------
diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/FunctionLocalizer.java
b/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/FunctionLocalizer.java
index ce6112f..2a6ef3a 100644
--- a/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/FunctionLocalizer.java
+++ b/llap-server/src/java/org/apache/hadoop/hive/llap/daemon/impl/FunctionLocalizer.java
@@ -28,8 +28,12 @@ import java.util.concurrent.LinkedBlockingQueue;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
 import org.apache.hadoop.hive.metastore.api.Function;
+import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.hive.metastore.api.ResourceUri;
+import org.apache.hadoop.hive.metastore.HiveMetaStoreClient;
 import org.apache.hadoop.hive.ql.exec.FunctionRegistry;
 import org.apache.hadoop.hive.ql.exec.FunctionTask;
 import org.apache.hadoop.hive.ql.exec.Utilities;
@@ -95,7 +99,14 @@ public class FunctionLocalizer implements GenericUDFBridge.UdfWhitelistChecker
{
   }
 
   public void startLocalizeAllFunctions() throws HiveException {
-    List<Function> fns = Hive.get(false).getAllFunctions();
+    Hive hive = Hive.get(false);
+    // Do not allow embedded metastore in LLAP unless we are in test.
+    try {
+      hive.getMSC(HiveConf.getBoolVar(conf, ConfVars.HIVE_IN_TEST), true);
+    } catch (MetaException e) {
+      throw new HiveException(e);
+    }
+    List<Function> fns = hive.getAllFunctions();
     for (Function fn : fns) {
       String fqfn = fn.getDbName() + "." + fn.getFunctionName();
       List<ResourceUri> resources = fn.getResourceUris();

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/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 564fca4..bcc729c 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
@@ -192,12 +192,11 @@ public class HiveMetaStoreClient implements IMetaStoreClient {
 
   static final protected Logger LOG = LoggerFactory.getLogger("hive.metastore");
 
-  public HiveMetaStoreClient(HiveConf conf)
-    throws MetaException {
-    this(conf, null);
+  public HiveMetaStoreClient(HiveConf conf) throws MetaException {
+    this(conf, null, true);
   }
 
-  public HiveMetaStoreClient(HiveConf conf, HiveMetaHookLoader hookLoader)
+  public HiveMetaStoreClient(HiveConf conf, HiveMetaHookLoader hookLoader, Boolean allowEmbedded)
     throws MetaException {
 
     this.hookLoader = hookLoader;
@@ -209,9 +208,13 @@ public class HiveMetaStoreClient implements IMetaStoreClient {
     fileMetadataBatchSize = HiveConf.getIntVar(
         conf, HiveConf.ConfVars.METASTORE_BATCH_RETRIEVE_OBJECTS_MAX);
 
-    String msUri = conf.getVar(HiveConf.ConfVars.METASTOREURIS);
+    String msUri = conf.getVar(ConfVars.METASTOREURIS);
     localMetaStore = HiveConfUtil.isEmbeddedMetaStore(msUri);
     if (localMetaStore) {
+      if (!allowEmbedded) {
+        throw new MetaException("Embedded metastore is not allowed here. Please configure
"
+            + ConfVars.METASTOREURIS.varname + "; it is currently set to [" + msUri + "]");
+      }
       // instantiate the metastore server handler directly instead of connecting
       // through the network
       if (conf.getBoolVar(ConfVars.METASTORE_FASTPATH)) {

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/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 2b05837..f672adf 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingMetaStoreClient.java
@@ -38,6 +38,8 @@ import org.apache.thrift.TException;
 import org.apache.thrift.protocol.TProtocolException;
 import org.apache.thrift.transport.TTransportException;
 
+import com.google.common.annotations.VisibleForTesting;
+
 /**
  * RetryingMetaStoreClient. Creates a proxy for a IMetaStoreClient
  * implementation and retries calls to it on failure.
@@ -58,52 +60,46 @@ public class RetryingMetaStoreClient implements InvocationHandler {
   private long lastConnectionTime;
   private boolean localMetaStore;
 
-  protected RetryingMetaStoreClient(HiveConf hiveConf, HiveMetaHookLoader hookLoader,
-      Map<String, Long> metaCallTimeMap, Class<? extends IMetaStoreClient> msClientClass)
throws MetaException {
-
-    this(hiveConf,
-        new Class[] {HiveConf.class, HiveMetaHookLoader.class},
-        new Object[] {hiveConf, hookLoader},
-        metaCallTimeMap,
-        msClientClass);
-  }
 
   protected RetryingMetaStoreClient(HiveConf hiveConf, Class<?>[] constructorArgTypes,
-      Object[] constructorArgs, Map<String, Long> metaCallTimeMap, Class<? extends
IMetaStoreClient> msClientClass)
-      throws MetaException {
+      Object[] constructorArgs, Map<String, Long> metaCallTimeMap,
+      Class<? extends IMetaStoreClient> msClientClass) throws MetaException {
 
     this.retryLimit = hiveConf.getIntVar(HiveConf.ConfVars.METASTORETHRIFTFAILURERETRIES);
     this.retryDelaySeconds = hiveConf.getTimeVar(
         HiveConf.ConfVars.METASTORE_CLIENT_CONNECT_RETRY_DELAY, TimeUnit.SECONDS);
     this.metaCallTimeMap = metaCallTimeMap;
-    this.connectionLifeTimeInMillis =
-        hiveConf.getTimeVar(HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_LIFETIME, TimeUnit.SECONDS)
* 1000;
+    this.connectionLifeTimeInMillis = hiveConf.getTimeVar(
+        HiveConf.ConfVars.METASTORE_CLIENT_SOCKET_LIFETIME, TimeUnit.MILLISECONDS);
     this.lastConnectionTime = System.currentTimeMillis();
     String msUri = hiveConf.getVar(HiveConf.ConfVars.METASTOREURIS);
     localMetaStore = (msUri == null) || msUri.trim().isEmpty();
 
     reloginExpiringKeytabUser();
-    this.base = (IMetaStoreClient) MetaStoreUtils.newInstance(msClientClass, constructorArgTypes,
constructorArgs);
+    this.base = (IMetaStoreClient) MetaStoreUtils.newInstance(
+        msClientClass, constructorArgTypes, constructorArgs);
   }
 
-  public static IMetaStoreClient getProxy(HiveConf hiveConf) throws MetaException {
-
-    return getProxy(hiveConf, new Class[]{HiveConf.class}, new Object[]{hiveConf}, null,
-        HiveMetaStoreClient.class.getName()
+  public static IMetaStoreClient getProxy(
+      HiveConf hiveConf, boolean allowEmbedded) throws MetaException {
+    return getProxy(hiveConf, new Class[]{HiveConf.class, Boolean.class},
+        new Object[]{hiveConf, allowEmbedded}, null, HiveMetaStoreClient.class.getName()
     );
   }
 
+  @VisibleForTesting
   public static IMetaStoreClient getProxy(HiveConf hiveConf, HiveMetaHookLoader hookLoader,
       String mscClassName) throws MetaException {
-    return getProxy(hiveConf, hookLoader, null, mscClassName);
+    return getProxy(hiveConf, hookLoader, null, mscClassName, true);
   }
 
   public static IMetaStoreClient getProxy(HiveConf hiveConf, HiveMetaHookLoader hookLoader,
-      Map<String, Long> metaCallTimeMap, String mscClassName) throws MetaException
{
+      Map<String, Long> metaCallTimeMap, String mscClassName, boolean allowEmbedded)
+          throws MetaException {
 
     return getProxy(hiveConf,
-        new Class[] {HiveConf.class, HiveMetaHookLoader.class},
-        new Object[] {hiveConf, hookLoader},
+        new Class[] {HiveConf.class, HiveMetaHookLoader.class, Boolean.class},
+        new Object[] {hiveConf, hookLoader, allowEmbedded},
         metaCallTimeMap,
         mscClassName
     );
@@ -126,8 +122,9 @@ public class RetryingMetaStoreClient implements InvocationHandler {
       Object[] constructorArgs, Map<String, Long> metaCallTimeMap,
       String mscClassName) throws MetaException {
 
-    Class<? extends IMetaStoreClient> baseClass = (Class<? extends IMetaStoreClient>)
MetaStoreUtils
-        .getClass(mscClassName);
+    @SuppressWarnings("unchecked")
+    Class<? extends IMetaStoreClient> baseClass =
+        (Class<? extends IMetaStoreClient>)MetaStoreUtils.getClass(mscClassName);
 
     RetryingMetaStoreClient handler =
         new RetryingMetaStoreClient(hiveConf, constructorArgTypes, constructorArgs,

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTimeout.java
----------------------------------------------------------------------
diff --git a/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTimeout.java
b/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTimeout.java
index 9c30689..f8eed18 100644
--- a/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTimeout.java
+++ b/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTimeout.java
@@ -49,7 +49,7 @@ public class TestHiveMetaStoreTimeout {
         TimeUnit.MILLISECONDS);
     warehouse = new Warehouse(hiveConf);
     try {
-      client = new HiveMetaStoreClient(hiveConf, null);
+      client = new HiveMetaStoreClient(hiveConf);
     } catch (Throwable e) {
       System.err.println("Unable to open the metastore");
       System.err.println(StringUtils.stringifyException(e));

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
index a92c002..f51e1a4 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
@@ -3092,7 +3092,7 @@ private void constructOneLBLocationMap(FileStatus fSta,
    * @throws HiveMetaException
    *           if a working client can't be created
    */
-  private IMetaStoreClient createMetaStoreClient() throws MetaException {
+  private IMetaStoreClient createMetaStoreClient(boolean allowEmbedded) throws MetaException
{
 
     HiveMetaHookLoader hookLoader = new HiveMetaHookLoader() {
         @Override
@@ -3120,10 +3120,10 @@ private void constructOneLBLocationMap(FileStatus fSta,
       };
 
     if (conf.getBoolVar(ConfVars.METASTORE_FASTPATH)) {
-      return new SessionHiveMetaStoreClient(conf, hookLoader);
+      return new SessionHiveMetaStoreClient(conf, hookLoader, allowEmbedded);
     } else {
       return RetryingMetaStoreClient.getProxy(conf, hookLoader, metaCallTimeMap,
-          SessionHiveMetaStoreClient.class.getName());
+          SessionHiveMetaStoreClient.class.getName(), allowEmbedded);
     }
   }
 
@@ -3141,7 +3141,18 @@ private void constructOneLBLocationMap(FileStatus fSta,
   @LimitedPrivate(value = {"Hive"})
   @Unstable
   public synchronized IMetaStoreClient getMSC() throws MetaException {
-    if (metaStoreClient == null) {
+    return getMSC(true, false);
+  }
+
+  /**
+   * @return the metastore client for the current thread
+   * @throws MetaException
+   */
+  @LimitedPrivate(value = {"Hive"})
+  @Unstable
+  public synchronized IMetaStoreClient getMSC(
+      boolean allowEmbedded, boolean forceCreate) throws MetaException {
+    if (metaStoreClient == null || forceCreate) {
       try {
         owner = UserGroupInformation.getCurrentUser();
       } catch(IOException e) {
@@ -3150,7 +3161,7 @@ private void constructOneLBLocationMap(FileStatus fSta,
         throw new MetaException(msg + "\n" + StringUtils.stringifyException(e));
       }
       try {
-        metaStoreClient = createMetaStoreClient();
+        metaStoreClient = createMetaStoreClient(allowEmbedded);
       } catch (RuntimeException ex) {
         Throwable t = ex.getCause();
         while (t != null) {

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java
b/ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java
index 581a919..ff8fdf8 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/SessionHiveMetaStoreClient.java
@@ -59,12 +59,13 @@ import org.apache.thrift.TException;
 
 public class SessionHiveMetaStoreClient extends HiveMetaStoreClient implements IMetaStoreClient
{
 
-  SessionHiveMetaStoreClient(HiveConf conf) throws MetaException {
-    super(conf);
+  SessionHiveMetaStoreClient(HiveConf conf, Boolean allowEmbedded) throws MetaException {
+    super(conf, null, allowEmbedded);
   }
 
-  SessionHiveMetaStoreClient(HiveConf conf, HiveMetaHookLoader hookLoader) throws MetaException
{
-    super(conf, hookLoader);
+  SessionHiveMetaStoreClient(
+      HiveConf conf, HiveMetaHookLoader hookLoader, Boolean allowEmbedded) throws MetaException
{
+    super(conf, hookLoader, allowEmbedded);
   }
 
   private Warehouse wh = null;

http://git-wip-us.apache.org/repos/asf/hive/blob/28cf8926/ql/src/test/org/apache/hadoop/hive/metastore/TestMetastoreExpr.java
----------------------------------------------------------------------
diff --git a/ql/src/test/org/apache/hadoop/hive/metastore/TestMetastoreExpr.java b/ql/src/test/org/apache/hadoop/hive/metastore/TestMetastoreExpr.java
index 5e53604..b1d58ad 100644
--- a/ql/src/test/org/apache/hadoop/hive/metastore/TestMetastoreExpr.java
+++ b/ql/src/test/org/apache/hadoop/hive/metastore/TestMetastoreExpr.java
@@ -79,7 +79,7 @@ public class TestMetastoreExpr extends TestCase {
   protected void setUp() throws Exception {
     super.setUp();
     try {
-      client = new HiveMetaStoreClient(new HiveConf(this.getClass()), null);
+      client = new HiveMetaStoreClient(new HiveConf(this.getClass()));
     } catch (Throwable e) {
       System.err.println("Unable to open the metastore");
       System.err.println(StringUtils.stringifyException(e));


Mime
View raw message