mapreduce - To change replication factor of a directory in hadoop -


is there way change replication factor of directory in hadoop when expect change applicable on files written directory in future?

you can change replication factor of file using command:

hdfs dfs –setrep –w 3 /user/hdfs/file.txt  

you can change replication factor of directory using command:

hdfs dfs -setrep -r 2 /user/hdfs/test 

but changing replication factor directory affect existing files , new files under directory created default replication factor (dfs.replication hdfs-site.xml) of cluster.

please see link understand more on it.

please see link configure replication factor hdfs.

but can temporarily override , turn off hdfs default replication factor passing:

-d dfs.replication=1 

this should work when pass map/reduce job. job specific only.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -