[Ubuntu]Replication Factor not reading correctly from hdfs-site.xml


1 Answer(s)


Hi Himanshu,

You are right.
dfs.replication property [available in hdfs-site.xml] controls the replication factor for hdfs blocks.
In this case, I can see there is no data-node up [Number of data-nodes:0]
As replication factor is a client-side configuration, we need to re-start the hdfs service after making change in hdfs-site.xml.
You can do that using :
1. stop-dfs.sh
2. start-dfs.sh
Make sure, after second command, datanode and namenode are up and running.
Create a new directory then, in hdfs and then check for the replication factor of those files.[or re-run the fsck command]

Please post whatever result you get.
Hope this helps.
Happy Learning @ Dezyre !!