HDFS Replication – a quick demo

Hi BigD,

I want to share with you a quick demo of replication. Let’s open the DFS health page first.

hadoop021 - replication

3 is the default replication factor for production clusters

So the content will be replicated 3 times. This can be overridden in /opt/hadoop/etc/hadoop/hdfs-site.xml as given below.


Let’s make it as 1, using CLI.

hadoop@gandhari:~$ hadoop dfs -setrep -w 1 /data
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

Replication 1 set: /data
Waiting for /data ... done
hadoop022 - replication

After changing the replication factor



Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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