Changing Replication factor in Hadoop on fly, the may be many time when you need to define replication factor of a specific file or directory on the fly, so following command will help you to change it.
The command used for this is "setrep"
How will you do it?
Solution :
Here are the steps :
Syntax :
This will return 0, and -1 on failure.
Some Examples of the commnad:
./bin/hadoop dfs -setrep -R -w 2 /
This will change the replication recursively.
The command used for this is "setrep"
How will you do it?
Solution :
Here are the steps :
Syntax :
- hadoop dfs -setrep [-R] <path>
This will return 0, and -1 on failure.
Some Examples of the commnad:
- hadoop dfs -setrep -w 2 /home/filename <---- </home/filename is path of file on hdfs>
./bin/hadoop dfs -setrep -R -w 2 /
This will change the replication recursively.
No comments:
Post a Comment
Thank you for Commenting Will reply soon ......