<configuration>
<property>
<name>dfs.replication</name>
<value>2</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/hadoop/hadoop-3.1.2/hdfs/name</value>
<final>true</final>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/hadoop/hadoop-3.1.2/hdfs/data</value>
<final>true</final>
</property>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>master:50090</value>
</property>
<property>
<name>dfs.http.address</name>
<value>master:50070</value>
</property>
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
</configuration>
- dfs.replication
- 设置副本数
<property>
<name>dfs.replication</name>
<value>2</value>
</property>
- dfs.namenode.name.dir
- 设置存放NameNode的文件路径
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/hadoop/hadoop-3.1.2/hdfs/name</value>
<final>true</final>
</property>
- dfs.datanode.data.dir
- 设置存放DataNode的文件路径
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/hadoop/hadoop-3.1.2/hdfs/data</value>
<final>true</final>
</property>
- dfs.permissions
- 权限还是不要的好
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
- dfs.secondary.http.address
- SNN路径
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>master:50090</value>
</property>
dfs.permissions
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>