- dfs.replication: Default block replication. The actual number of replications can be specified when the file is created. The default is used if replication is not specified in create time.
- dfs.replication.max: Maximal block replication.
- dfs.namenode.replication.min: Minimal block replication.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<property> | |
<name>dfs.replication</name> | |
<value>3</value> | |
</property> | |
<property> | |
<name>dfs.replication.max</name> | |
<value>5</value> | |
</property> | |
<property> | |
<name>dfs.namenode.replication.min</name> | |
<value>1</value> | |
</property> | |
<property> | |
<name>dfs.namenode.logging.level</name> | |
<value>all</value> | |
</property> | |
<property> | |
<name>dfs.data.dir</name> | |
<value>/home/user/data</value> | |
</property> | |
</configuration> |
hdfs setrep
command like this.
hdfs dfs -setrep 5 /user/user/aesop.txt
Then i could verify the effect of replication settings like this
Then the last option is to set replication factor programmatically
No comments:
Post a Comment