码迷,mamicode.com
首页 > 其他好文 > 详细

配置SecondaryNameNode和NameNode分离

时间:2015-01-03 22:33:04      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:

环境:Hadoop1.2.1

配置SecondaryNameNode节点
[grid@hadoop1 hadoop-1.2.1]$ cat ./conf/masters
hadoop2

配置NameNode节点、同步检查时间

[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同步文件夹永远为空

[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>





配置SecondaryNameNode和NameNode分离

标签:

原文地址:http://my.oschina.net/zc741520/blog/363269

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!