Parallel File Processing: What are recommended ways?
问题 This is by large combination of design and code problem. Use Case - Given many log files in range (2MB - 2GB), I need to parse each of these logs and apply some processing, generate Java POJO . - For this problem, lets assume that we have just 1 log file - Also, the idea is to making best use of System. Multiple cores are available. Alternative 1 - Open file (synchronous), read each line, generate POJO s FileActor -> read each line -> List<POJO> Pros : simple to understand Cons : Serial