1
votes

how to restore under-replicated blocks to the replication factor by myself?

I have two datanodes ,three files on them. because file is very small ,so one block one file . the replication factor is 2,now there is only 3 under-replicated blocks in the cluster. How can I restore the blocks to 6?

thank you for your help!

2
With only two datanode, I do not think you can have a replication factor of more than 2. - jfg956

2 Answers

1
votes

If there enough data nodes for the defined replicated factor - NameNode will take care to restore replication factor
If you want it to happen just now - I think copy files will do the job.

1
votes

Use hadoop dfs -setrep [-R] [-w] path/file