GitHub user rxin opened a pull request: https://github.com/apache/spark/pull/16204
[SPARK-18775][SQL] Limit the max number of records written per file - WIP ## What changes were proposed in this pull request? Currently, Spark writes a single file out per task, sometimes leading to very large files. It would be great to have an option to limit the max number of records written per file in a task, to avoid humongous files. This patch introduces a new write config option `maxRecordsPerFile` (default to a session-wide setting `spark.sql.files.maxRecordsPerFile`) that limits the max number of records written to a single file. ## How was this patch tested? I tested this manually for now. Will add some automated tests once I see what other tests are failing. You can merge this pull request into a Git repository by running: $ git pull https://github.com/rxin/spark SPARK-18775 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16204.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 #16204 ---- commit fca401f19d717a25e0b6a028ce5ba7ad3b7b5ea2 Author: Reynold Xin <r...@databricks.com> Date: 2016-12-08T00:45:10Z [SPARK-18775][SQL] Limit the max number of records written per file ---- --- 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