GitHub user davies opened a pull request:
https://github.com/apache/spark/pull/13229
[SPARK-14031] [SQL] speedup CSV writer
## What changes were proposed in this pull request?
Currently, we create an CSVWriter for every row, it's very expensive and
memory hungry, took about 15 seconds to write out 1 mm rows (two columns).
This PR will write the rows in batch mode, create a CSVWriter for every 1k
rows, which could write out 1 mm rows in about 1 seconds (15X faster).
## How was this patch tested?
Manually benchmark it.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/davies/spark csv_writer
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/13229.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 #13229
----
commit 43f3760bee09eb233a6bbf3d63b6cefbbc924998
Author: Davies Liu <[email protected]>
Date: 2016-05-20T20:04:35Z
speedup CSV writer
----
---
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]