Github user liancheng commented on the pull request:
https://github.com/apache/spark/pull/8125#issuecomment-130566869
@watermen The use case you mentioned totally makes sense. However, I think
usually people choose to compact fine grained files into much larger and fewer
files as time goes by. A more reasonable solution might be:
1. Saving the most recent hot data (say 1 hr) every 5 min in simple file
formats like CSV or JSON.
These files tend to be pretty small, and I'd assume that using complex
columnar formats like ORC and Parquet generally don't give you much performance
benefits on the read path, but you still suffer from their costs like larger
memory footprints and lower speed on the write path (it's more related to the
width of the table rather than the number of rows.)
2. Compacting outdated data periodically (say every a few hours) into much
larger and fewer chunks of data files in analytics friendly formats like ORC
and Parquet
In this way you avoid reading a large number of small files and enjoy
the performance benefits brought by columnar formats.
3. Exposing the whole dataset by making two (or more) DataFrames out of
these two parts of data and union them
Of course, the above comment is more like a design issue of the upper
application. For this PR, the biggest problem I see is that, it makes a not
recommended special use case as default case and introduces performance
regression for other (more commonly seen) use cases.
---
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]