NameNode Server in HDFS
The main node in HDFS is that it maintains and manages the blocks on the DataNodes. NameNode is a very high-availability server that manages the file namespace and controls user access to files. The HDFS architecture is such that user data is not mounted on NameNode. These data are only mounted on NameNodes.
NameNode's mission are as follows:
- A major process that maintains and manages DataNodes.
- It records the metadata of all files stored in the cluster (for example, the location of stored blocks, file sizes, permissions, hierarchies, etc.). Two files associated with metadata are:
- FsImage: includes the full status of the file system namespace since the start of the NameNode.
- EditLogs: Includes all recent changes to the latest FsImage.
- Any changes that occur on the file system metadata are logged. For example, if a file is deleted in HDFS, NameNode immediately logs it in EditLog.
- It regularly receives heart beats and block's report from all DataNodes to ensure their viability.
- Holds a record of all blocks in the HDFS, and there are nodes in which the blocks are located.
- It is also responsible for taking care of all factors of the replication of all blocks.
- In the event of a DataNode failure, it selects a new DataNode for duplication, use of disk balancing and traffic control for DataNode.