0 votes
in Big Data | Hadoop by

How can you overwrite the replication factors in HDFS? 

1 Answer

0 votes
by

 

The replication factor in HDFS can be modified or overwritten in 2 ways-

 

1)Using the Hadoop FS Shell, replication factor can be changed per file basis using the below command-

 

$hadoop fs –setrep –w 2 /my/test_file (test_file is the filename whose replication factor will be set to 2)

 

2)Using the Hadoop FS Shell, replication factor of all files under a given directory can be modified using the below command-

 

3)$hadoop fs –setrep –w 5 /my/test_dir (test_dir is the name of the directory and all the files in this directory will have a replication factor set to 5)

 

Attend a Hadoop Interview session with experts from the industry!

hadoop scenario based interview questions

 

Related questions

0 votes
asked Nov 7, 2020 in Hadoop by SakshiSharma
0 votes
asked Feb 22, 2020 in Big Data | Hadoop by SakshiSharma
...