Java multithreading reading a single large file

前端 未结 4 1278
长发绾君心
长发绾君心 2021-02-09 06:44

What is an efficient way for a Java multithreaded application where many threads have to read the exact same file (> 1GB in size) and expose it as an input stream? I\'ve notice

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-09 07:06

    Thats a very big file. Can you get the file delivered as a smaller set of files? Just delivering this file will be a big job even on a corporate network.

    Sometimes it is easier to change the process than the program.

    You may even be better writing something to split the file up into a number of chunks and process them separately.

提交回复
热议问题