下面来说下hadoop配置hdfs-site.xml文件的配置过程:
增加hdfs配置信息(namenode、datanode端口和目录位置)hdfs-site.xml文件中包含的信息,如复制数据的值,名称节点的路径,本地文件系统的数据节点的路径。
<configuration>
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>bigdata:9001</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/opt/media/hadoop-2.6.0/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/opt/medis/hadoop-2.6.0/dfs/data</value>
</property>
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
<property>
<name>dfs.permissions</name>
<value>false</value>
</property>
<description>
If "true", enable permission checking in HDFS.
If "false", permission checking is turned off,but all other behavior is unchanged.
Switching from one parameter value to the other does not change the mode, owner or group of files or directories.
</description>
</configuration>