'Why does datanode report block infomation to namenode in hdfs?

When writing a file, the namenode determines which datanodes each block of the file is to be written to. At this time, the namenode maintains the mapping of files to blocks and blocks to datanodes.
Why do datanodes still need to report block information(the mapping of blocks to datanodes)?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source