How setrep command is used and what is the description to this?

0 votes
Can any one explain how setrep command is used and what is the description to this?
Jun 19 in Big Data Hadoop by Rena
13 views

1 answer to this question.

0 votes

Hi,

This HDFS command is used to change the replication factor of a file. If the entered path is a directory, then this command changes the replication factor of all the files present in the directory tree rooted at the path provided by user recursively.

HDFS setrep Command usage:

setrep [-R] [-w] rep <path>

HDFS setrep Command Example

hdfs dfs -setrep -w 3 /user/dataflair/dir1

Here, the -w flag requests that the command waits for the replication process to get completed. This may likely take a very long time to get completed.

The -R flag is accepted for backward compatibility. It does not make any changes.

answered Jun 19 by Gitika
• 19,720 points

Related Questions In Big Data Hadoop

0 votes
10 answers
0 votes
5 answers
0 votes
1 answer

What is the command to navigate in HDFS?

First of all there is no command ...READ MORE

answered Apr 27, 2018 in Big Data Hadoop by Shubham
• 13,190 points
341 views
0 votes
1 answer

What is the command to find the free space in HDFS?

You can use dfsadmin which runs a ...READ MORE

answered Apr 29, 2018 in Big Data Hadoop by Shubham
• 13,190 points
121 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,110 points
2,052 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,110 points
196 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
10,495 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
765 views
0 votes
1 answer

What is the difference in DistCP command and Sqoop command in Hadoop?

Both the distCP (Distributed copy in Hadoop) ...READ MORE

answered Apr 11 in Big Data Hadoop by Gitika
• 19,720 points
41 views
0 votes
1 answer

What command is used to install MySql in centos?

You can use this command to install ...READ MORE

answered Apr 12 in Big Data Hadoop by Gitika
• 19,720 points
58 views