For example I have a 1 Gb file in HDFS like
2018-10-10 12:30
EVENT INFORMATION
2018-10-10 12:35
ANOTHER EVENT INFORMATION
...
So I need to use NLineInputFormat (N = 2), right?
The question is about more conceptual principles. When and where is this 1 Gb file transformed into InputSplits? How does hadoop handle different splitting logic? Does it need to parse the whole file to create splits (because we need to go through the file to count lines one-by-one)?
This file is divided into 8 blocks in HDFS (1024 / 128). So, when I submit a job hadoop starts mapper on each node with the blocks for this file (with default split size).
What will happen if my file isn't divided neatly? Like
<block1>
...
2018-10-10 12:
</block1>
<block2>
40
EVENT INFORMATION
...
</block2>
How will first mapper know about remaining part that is located on another datanode?
What happen if split size = 1/2 block size? Or 4/5 block size? How does application master know which node should it pick to run a split?
Can you please make it clear and give me some links to get it more deeply?
