java - How to read only inner segments of a file using NIO -
my batch process needs reading lines huge files (1-3g), each of can processed independently of another. files can have 10-50m rows. thinking of spawning dozen threads each of processing predetermined range of buffers, e.g. t1 read range 0-1, t2 1-2, etc. concurrently. means, of course, t2 needs jump instantly buffer position 2, without reading 0-2.
is type of segmentation of buffered file reading purposes of concurrency possible java nio?
there no point this. cpu may allow multiple threads disk still single-threaded. cause disk thrashing. forget it.
Comments
Post a Comment