From 563f2aafb148291a077d9d25797256fd6e4567af Mon Sep 17 00:00:00 2001 From: Artem Aliev Date: Tue, 20 Oct 2015 13:27:41 +0300 Subject: [PATCH] [SPARK-11208] [SQL] Filter out 'hive.metastore.rawstore.impl' from executionHive temporary config The executionHive assumed to be a standard meta store located in temporary directory as a derby db. But hive.metastore.rawstore.impl was not filtered out so any custom implementation of the metastore with other storage properties (not JDO) will persist that temporary functions. CassandraMetaStore from DataStax Enterprise is one of examples. --- .../src/main/scala/org/apache/spark/sql/hive/HiveContext.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala index 38c195bc7db0e..43e7bd4db26bf 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala @@ -725,7 +725,8 @@ private[hive] object HiveContext { // We have to mask all properties in hive-site.xml that relates to metastore data source // as we used a local metastore here. HiveConf.ConfVars.values().foreach { confvar => - if (confvar.varname.contains("datanucleus") || confvar.varname.contains("jdo")) { + if (confvar.varname.contains("datanucleus") || confvar.varname.contains("jdo") + || confvar.varname.contains("hive.metastore.rawstore.impl")) { propMap.put(confvar.varname, confvar.getDefaultExpr()) } }