iceboy
iceboy

Reputation: 51

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

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!

Upvotes: 1

Views: 2074

Answers (2)

Magham Ravi
Magham Ravi

Reputation: 603

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

Upvotes: 1

David Gruzman
David Gruzman

Reputation: 8088

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.

Upvotes: 1

Related Questions