This lesson explains the role of Datanode in HDFS.

We'll cover the following


The Datanode stores the actual data. It stores the data blocks on its local filesystem and sends a block report to the Namenode.

The data for HDFS files will be stored in the directory specified as the value for the configuration setting The default value of this setting is ${hadoop.tmp.dir}/dfs/data. In our terminal setup the data directory is located at usr/local/tmp/dfs/data/. We’ll upload a file to HDFS containing a string; the corresponding data is written to the local disk of the DataNode. Execute the commands in the terminal and examine the outcome. A screen-shot of the directory with the data appears below:

Get hands-on with 1200+ tech skills courses.