添加 SecondaryNameNode

网络上的很多人写的过程都是错的,关键配置反而不写。 

SecondaryNameNode的启动有两种方式

一:在整个hdfs系统启动时,在namenode上执行start-dfs.sh则namenode会依据conf/master文件下的主机,逐个ssh上去,启动相应的程序,目的SecondaryNameNode上需要配置

  <property>
  <name>dfs.http.address</name>
  <value>cq02-map-lbsop-broker03.cq02:8010</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 w
ill start on a free port.</description>
  </property>

<property>
  <name>dfs.secondary.http.address</name>
  <value>yf-map-lbsop-broker04.yf01:50090</value>
  </property>
  <property>

第一个是配置namenode的hdfs文件位置,通过该配置去拿取namenode元数据信息,第二个配置是本机的SecondaryNameNode启动端口

二:系统已经运行,想新增一个SecondaryNameNode,此时只需要在新增机器上配好配置,执行./hadoop-daemon.sh start secondarynamenode即可

原文地址:https://www.cnblogs.com/zlingh/p/4249315.html