GitHub user wangyum opened a pull request: https://github.com/apache/spark/pull/17505
[SPARK-20187][SQL] Replace loadTable with moveFile to speed up load table for many output files ## What changes were proposed in this pull request? [HiveClientImpl.loadTable](https://github.com/apache/spark/blob/v2.1.0/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala#L667) load files one by one, so this step will take a long time if a job generates many files. This PR replace `Hive.loadTable` with [`Hive.moveFile`](https://github.com/apache/hive/blob/release-1.2.1/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L2567) to speed up this step for `create table tableName as select ...` and `insert overwrite table tableName select ...`. ## How was this patch tested? manual tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/wangyum/spark SPARK-20187 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/17505.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 #17505 ---- commit c608c4fa0914969966115bf728c21b4631003359 Author: Yuming Wang <wgy...@gmail.com> Date: 2017-04-01T10:28:08Z Replace loadTable with moveFile to speed up load table for many output files. ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org