HDFS modify the default number of copies

Description: HDFS modify the number of copies of 2
First step: the number of copies to modify an existing file on HDFS 2

hdfs dfs -setrep 2 -R -w / 


Step: 2 is modified dfs.replication (page operation), and then restart the HDFS
HDFS-the site.xml file:

<property>
  <name>dfs.replication</name>
  <value>2</value>
</property>

 

The third step: After modifying the number of copies be checked

hdfs fsck / -files -blocks

The fourth step is to manually create a file, uploaded to HDFS, observe the number of copies
if the number of copies or three, first make sure whether a copy of the parameters already in force (the third step of the command can be viewed),
If not, re-download client, in try

Guess you like

Origin www.cnblogs.com/yfb918/p/11410600.html