HADOOP综合应用架构之一 配置Secondarynamenode在另一台机器运行

secondarynamenode的作用就是用来做checkpoint---相当于对NameNode节点的元数据备份
现在将secondarynamenode部署在另一台机器,是为了引入Zookeeper做自动切换
具体方法如下
1.修改conf/core-site.xml
增加或修改
<property>
<name>fs.checkpoint.period</name>
<value>3600</value>
<description>The number of seconds between two periodic checkpoints. </description>
</property>
<property>
<name>fs.checkpoint.size</name>
<value>67108864</value>
<description>The size of the current edit log (in bytes) that triggers a periodic checkpoint even if the fs.checkpoint.period hasn't expired. </description>
</property>
<property>
<name>fs.checkpoint.dir</name>  --可以不写,默认为 {hadoopdata}/dfs/namesecondary
<value>/data/work/hdfs/namesecondary</value>
<description>Determines where on the local filesystem the DFS secondary name node should store the temporary images to merge. If this is a comma-delimited list of directories then the image is replicated in all of the directories for redundancy. </description>
</property>
 
2.修改conf/hdfs-site.xml
<property>
<name>dfs.http.address</name>
 <value>0.0.0.0:50070</value>
<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>
0.0.0.0改为namenode的IP地址(Master的IP)
 
3.修改conf/masters
  将secondarynamenode的机器IP写入,可以多写,一行一个IP
 
4.重启HADOOP,检查secondarynamenode是否已启动 
在Master节点上输入 jps 可以看到    NameNode,Jobtracker
在DataNode上输入jps可以看到        DataNode,Tasktracker
在secondarynamenode上输入jps可以看到   Secondarynamenode 

进入secondarynamenode的目录/data/work/hdfs/namesecondary
正确的结果:
如果没有,请耐心等待,只有到了设置的checkpoint的时间或者大小,才会生成。

转载于:https://www.cnblogs.com/bobsoft/archive/2012/10/07/2714476.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值