Andrzej Bialecki wrote:
Hmm ... the idea was to avoid the cost of additional I/O, and read the parts directly as they are. If I understand it correctly, the Sorter.merge() needs to rewrite the files in order to merge them, which means a lot of I/O.
It only rewrites things if there are more parts than the mergefactor. So if you increase the mergefactor to the number of parts, then no data will be written.
Doug