1. dfs.name.dir
This parameter is used to determine in what directory the metadata of the HDFS file system is stored. If this parameter is set to multiple directories, multiple copies of the meta information are stored in these directories. In actual production, a machine will usually have multiple physical disks. This configuration item will be configured in multiple directories, and each directory will be placed on a different disk to prevent a certain disk in the machine from being damaged and unable to recover fsimage. catastrophic consequences.
Such as:
<property>
<name>dfs.name.dir</name>
<value>/pvdata/hadoopdata/name/,/opt/hadoopdata/name/</value>
</property>
<name>dfs.name.dir</name>
<value>/pvdata/hadoopdata/name/,/opt/hadoopdata/name/</value>
</property>
Fs 、 dfs.data.dir
This parameter is used to determine the directory in which the data of the HDFS file system is stored. We can set this parameter to multiple partition directories to build HDFS on different partitions.
Such as:
<property>
<name>dfs.data.dir</name>
<value>/dev/sda3/hadoopdata/,/dev/sda1/hadoopdata/</value>
</property>
<name>dfs.data.dir</name>
<value>/dev/sda3/hadoopdata/,/dev/sda1/hadoopdata/</value>
</property>
Citing the following author's article
http://blog.itpub.net/24167542/viewspace-1120232/
4. Comparison of old and new configuration of hadoop
Citing author articles
http://blog.csdn.net/lifuxiangcaohui/article/details/39106243