Datanode

This lesson explains the role of Datanode in HDFS.

We'll cover the following

DataNodes

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 dfs.datanode.data.dir. 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.