GitHub user yhuai opened a pull request:
https://github.com/apache/spark/pull/6252
[SPARK-7713] [SQL] Use shared broadcast hadoop conf for partitioned table
scan.
https://issues.apache.org/jira/browse/SPARK-7713
I tested the performance with the following code:
```scala
import sqlContext._
import sqlContext.implicits._
(1 to 5000).foreach { i =>
val df = (1 to 1000).map(j => (j, s"str$j")).toDF("a",
"b").save(s"/tmp/partitioned/i=$i")
}
sqlContext.sql("""
CREATE TEMPORARY TABLE partitionedParquet
USING org.apache.spark.sql.parquet
OPTIONS (
path '/tmp/partitioned'
)""")
table("partitionedParquet").explain(true)
```
In our master `explain` takes 40s in my laptop. With this PR, `explain`
takes 14s.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/yhuai/spark broadcastHadoopConf
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/6252.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #6252
----
commit 9e7c3cd1984bcee9e5538c72f556ffd8d91f3f23
Author: Yin Huai <[email protected]>
Date: 2015-05-19T02:19:41Z
Use a shared broadcast Hadoop Configuration for partitioned
HadoopFsRelations.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]