Search⌘ K
AI Features

Writing and Reading

Explore how clients write and read files in the Hadoop Distributed File System by understanding interactions with Namenode and DataNodes. Learn to follow data flow during writes, block location retrieval during reads, and error handling mechanisms that ensure data integrity and system efficiency.

We'll cover the following...

Writing and Reading

We’ll now study the interactions between a client application and HDFS when reading or writing files.

Write path

A client initiates the write process. A client could be an application using the Java API or a person working with the hdfs command line utility. The flow of this interaction between client and HDFS goes like this:

  • A client buffers data on the local disk initially. It waits for one HDFS-block worth of data to accumulate before contacting the Namenode.

  • The Namenode, once contacted by the client, verifies if the file exists and that the client has the required permissions to create that file. If these checks pass, the Namenode makes ...