Modifying HDFS Default Configuration

This post discusses how to change the current HDFS configuration, such as the default block replication, the data node directory, the default block size, etc.

HDFS configuration settings are available in hdfs-site.xml and it can be modified through “vi editor”. 

Open the terminal window and type the below command.
sudo vi /etc/hadoop/conf/hdfs-site.xml

The default location of hdfs-site.xml is /etc/hadoop/conf in Cloudera’s VM. It may be different in other hadoop distributions. Change the location according to it.

The above command will open the hdfs-site.xml in “vi editor” however, in order to edit the configuration or add new settings, click “i” which means “INSERT” mode. You can change the settings as per your requirement now.

If you want to save the changes and quit from the editor mode, press “Esc” button to enter into command mode and type “:wq!” to exit.

Hope you liked this post.
Please do follow for more interesting updates.

One comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s