首页 > 代码库 > 配置SecondaryNameNode和NameNode分离
配置SecondaryNameNode和NameNode分离
环境:Hadoop1.2.1
配置SecondaryNameNode节点
配置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="http://www.mamicode.com/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="http://www.mamicode.com/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分离
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。