zoukankan      html  css  js  c++  java
  • 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的时间或者大小,才会生成。
  • 相关阅读:
    如何更好地谋生,从事嵌入式软件开发五年的感悟和职业焦虑
    在url中使用friendly_id
    关于盒模型的一个CSS3样式
    配置discourse的相关资料
    关于手机端触摸样式
    这样阻止事件冒泡
    paypal中使用循环付款的问题
    封装事件的添加和移除状态
    input 标签在做动画时的bug
    模拟了个iphone上面的select框 需要下载iscroll
  • 原文地址:https://www.cnblogs.com/bobsoft/p/2714476.html
Copyright © 2011-2022 走看看