diff --git a/data/conf/hive-site.xml b/data/conf/hive-site.xml
index 0c3adb4b0f..667f235d7b 100644
--- a/data/conf/hive-site.xml
+++ b/data/conf/hive-site.xml
@@ -135,11 +135,16 @@
hive.metastore.rawstore.impl
- org.apache.hadoop.hive.metastore.ObjectStore
+ org.apache.hadoop.hive.metastore.cache.CachedStore
Name of the class that implements org.apache.hadoop.hive.metastore.rawstore interface. This class is used to store and retrieval of raw metadata objects such as table, database
+ hive.metastore.cached.rawstore.impl
+ org.apache.hadoop.hive.metastore.ObjectStore
+
+
+
hive.querylog.location
${test.tmp.dir}/tmp
Location of the structured hive logs
diff --git a/data/conf/llap/hive-site.xml b/data/conf/llap/hive-site.xml
index 44ca6c9daf..876e7261c4 100644
--- a/data/conf/llap/hive-site.xml
+++ b/data/conf/llap/hive-site.xml
@@ -145,11 +145,16 @@
hive.metastore.rawstore.impl
- org.apache.hadoop.hive.metastore.ObjectStore
+ org.apache.hadoop.hive.metastore.cache.CachedStore
Name of the class that implements org.apache.hadoop.hive.metastore.rawstore interface. This class is used to store and retrieval of raw metadata objects such as table, database
+ hive.metastore.cached.rawstore.impl
+ org.apache.hadoop.hive.metastore.ObjectStore
+
+
+
hive.querylog.location
${test.tmp.dir}/tmp
Location of the structured hive logs
diff --git a/data/conf/perf-reg/tez/hive-site.xml b/data/conf/perf-reg/tez/hive-site.xml
index 78a5481e03..4a268916ad 100644
--- a/data/conf/perf-reg/tez/hive-site.xml
+++ b/data/conf/perf-reg/tez/hive-site.xml
@@ -144,11 +144,16 @@
hive.metastore.rawstore.impl
- org.apache.hadoop.hive.metastore.ObjectStore
+ org.apache.hadoop.hive.metastore.cache.CachedStore
Name of the class that implements org.apache.hadoop.hive.metastore.rawstore interface. This class is used to store and retrieval of raw metadata objects such as table, database
+ hive.metastore.cached.rawstore.impl
+ org.apache.hadoop.hive.metastore.ObjectStore
+
+
+
hive.querylog.location
${test.tmp.dir}/tmp
Location of the structured hive logs
diff --git a/data/conf/tez/hive-site.xml b/data/conf/tez/hive-site.xml
index 236adc7087..1d2fe60ad3 100644
--- a/data/conf/tez/hive-site.xml
+++ b/data/conf/tez/hive-site.xml
@@ -139,11 +139,16 @@
hive.metastore.rawstore.impl
- org.apache.hadoop.hive.metastore.ObjectStore
+ org.apache.hadoop.hive.metastore.cache.CachedStore
Name of the class that implements org.apache.hadoop.hive.metastore.rawstore interface. This class is used to store and retrieval of raw metadata objects such as table, database
+ hive.metastore.cached.rawstore.impl
+ org.apache.hadoop.hive.metastore.ObjectStore
+
+
+
hive.querylog.location
${test.tmp.dir}/tmp
Location of the structured hive logs
diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
index f73047f9ff..1d53244484 100644
--- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
+++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
@@ -1258,18 +1258,21 @@ public boolean getPartitionsByExpr(String catName, String dbName, String tblName
dbName = StringUtils.normalizeIdentifier(dbName);
tblName = StringUtils.normalizeIdentifier(tblName);
if (!shouldCacheTable(catName, dbName, tblName)) {
- return rawStore.getPartitionsByExpr(catName, dbName, tblName, expr, defaultPartitionName, maxParts,
- result);
+ return rawStore.getPartitionsByExpr(catName, dbName, tblName, expr, defaultPartitionName, maxParts, result);
}
List partNames = new LinkedList<>();
Table table = sharedCache.getTableFromCache(catName, dbName, tblName);
if (table == null) {
// The table is not yet loaded in cache
- return rawStore.getPartitionsByExpr(catName, dbName, tblName, expr, defaultPartitionName, maxParts,
- result);
+ return rawStore.getPartitionsByExpr(catName, dbName, tblName, expr, defaultPartitionName, maxParts, result);
+ }
+ boolean hasUnknownPartitions =
+ getPartitionNamesPrunedByExprNoTxn(table, expr, defaultPartitionName, maxParts, partNames, sharedCache);
+ for (String partName : partNames) {
+ Partition part = sharedCache.getPartitionFromCache(catName, dbName, tblName, partNameToVals(partName));
+ part.unsetPrivileges();
+ result.add(part);
}
- boolean hasUnknownPartitions = getPartitionNamesPrunedByExprNoTxn(table, expr,
- defaultPartitionName, maxParts, partNames, sharedCache);
return hasUnknownPartitions;
}
diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
index cf5fbbefa6..96ac65f84d 100644
--- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
+++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
@@ -651,7 +651,7 @@ public static ConfVars getMetaConf(String name) {
PWD("javax.jdo.option.ConnectionPassword", "javax.jdo.option.ConnectionPassword", "mine",
"password to use against metastore database"),
RAW_STORE_IMPL("metastore.rawstore.impl", "hive.metastore.rawstore.impl",
- "org.apache.hadoop.hive.metastore.ObjectStore",
+ "org.apache.hadoop.hive.metastore.cache.CachedStore",
"Name of the class that implements org.apache.riven.rawstore interface. \n" +
"This class is used to store and retrieval of raw metadata objects such as table, database"),
REPLCMDIR("metastore.repl.cmrootdir", "hive.repl.cmrootdir", "/user/${system:user.name}/cmroot/",