aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Armbrust <michael@databricks.com>2014-07-04 19:15:48 -0700
committerReynold Xin <rxin@apache.org>2014-07-04 19:15:48 -0700
commit9d006c97371ddf357e0b821d5c6d1535d9b6fe41 (patch)
tree3c5f35f698c662af1e18fcad60eaeec371effba6
parent0db5d5a22ef8dd6e3fbb2759cd25aac46bdf2ce9 (diff)
downloadspark-9d006c97371ddf357e0b821d5c6d1535d9b6fe41.tar.gz
spark-9d006c97371ddf357e0b821d5c6d1535d9b6fe41.tar.bz2
spark-9d006c97371ddf357e0b821d5c6d1535d9b6fe41.zip
[SPARK-2370][SQL] Decrease metadata retrieved for partitioned hive queries.
Author: Michael Armbrust <michael@databricks.com> Closes #1305 from marmbrus/usePrunerPartitions and squashes the following commits: 744aa20 [Michael Armbrust] Use getAllPartitionsForPruner instead of getPartitions, which avoids retrieving auth data
-rw-r--r--sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
index 90eacf4268..7c24b5cabf 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
@@ -53,7 +53,7 @@ private[hive] class HiveMetastoreCatalog(hive: HiveContext) extends Catalog with
val table = client.getTable(databaseName, tableName)
val partitions: Seq[Partition] =
if (table.isPartitioned) {
- client.getPartitions(table)
+ client.getAllPartitionsForPruner(table).toSeq
} else {
Nil
}