File system tree


2 Answer(s)


Namenode follow namespace hierarchy.

The HDFS namespace is a hierarchy of files and directories. Files and directories are represented on the NameNode by inodes. Inodes record attributes like permissions, modification and access times, namespace and disk space quotas. The file content is split into large blocks (typically 128 megabytes, but user selectable file-by-file), and each block of the file is independently replicated at multiple DataNodes (typically three, but user selectable file-by-file). The NameNode maintains the namespace tree and the mapping of blocks to DataNodes. The current design has a single NameNode for each cluster. The cluster can have thousands of DataNodes and tens of thousands of HDFS clients per cluster, as each DataNode may execute multiple application tasks concurrently.

hi Aurobrata,
NN stores the metadata in a hierarchy, which has, File to Block level mapping, Block to Datanode mapping and Data node to RaC mapping, this is called as "fsimage" and it also maintains an "editLog".