[grid@hadoop1 hadoop-1.2.1]$ cat ./conf/masters hadoop2
配置NameNode節點、同步檢查時間 node
[grid@hadoop1 hadoop-1.2.1]$ cat ./conf/core-site.xml <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>fs.checkpoint.period</name> <value>20</value> <description>The number of seconds between two periodic checkpoints. </description> </property> <property> <name>fs.default.name</name> <value>hdfs://hadoop1:9000</value> </property> <property> <name>hadoop.tmp.dir</name> <value>/home/grid/hadoop-1.2.1/tmp</value> </property> </configuration>
配置 dfs.http.address,若是不配置,secondary namenode同步文件夾永遠爲空 web
[grid@hadoop1 hadoop-1.2.1]$ cat ./conf/hdfs-site.xml <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>dfs.http.address</name> <value>hadoop1:50070</value> <!-- your namenode ip --> <description> The address and the base port where the dfs namenode web ui will listen on.If the port is 0 then the server will start on a free port. </description> </property> <property> <name>dfs.replication</name> <value>2</value> </property> </configuration>