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的时间或者大小,才会生成。
  • 相关阅读:
    四叉树空间索引原理及其实现
    深入理解空间搜索算法 ——数百万数据中的瞬时搜索
    空间索引
    Microsoft.Office.Core 引用以及 Microsoft.Office.Core.MsoTriState 的问题
    Visual studio 2017 中的Javascript智能提示与调试
    EasyUI Tooltip 提示框
    java编程中的断言工具类(org.springframework.util.Assert)
    Guava学习笔记:Google Guava 类库简介
    Jquery autocomplete插件
    easyui-textbox
  • 原文地址:https://www.cnblogs.com/bobsoft/p/2714476.html
Copyright © 2011-2022 走看看