zoukankan      html  css  js  c++  java
  • Hadoop in Action 第二章续2(分布式部署)

    之前持续关注分布式存储和分布式计算,现在是建立完整集群的时候了.在这一节,我们将使用下面的服务器名:

    1.       master--- 主节点,主要用来运行NameNodeJobTracker服务.

    2.       backup --- 用来运行Secondary NameNode服务.

    3.       hadoop1,hadoop2,hadoop3…---运行DataNodeTaskTracker的从节点.

    修改之前伪分布式的骨架来配置这个分布式模式.

    复制所有这几个配置文件到所有的从服务器上,并且保证所有的从服务器的hdfs都格式化了. 

    hdfs-site.xml
    <?xml version=”1.0”?>
    <?xml-stylesheet type=”text/xsl” href=”configuration.xsl”?>
    <!-- Put site-specific property overrides in this file. -->
    <configuration>
    <property>
     
    <name>dfs.replication</name>       
     
    <value>3</value>       
     
    <description>The actual number of replications can be specifi ed when the
     file is created.
    </description>
    </property>
    </configuration>
    core-site.xml
    <?xml version=”1.0”?>
    <?xml-stylesheet type=”text/xsl” href=”confi guration.xsl”?>
    <!-- Put site-specifi c property overrides in this fi le. -->
    <confi guration>
    <property>
     
    <name>fs.default.name</name>      
     
    <value>hdfs://master:9000</value>     
     
    <description>The name of the default fi le system. A URI whose
     scheme and authority determine the FileSystem implementation. 
     
    </description>
    </property>
    </confi guration>

     mapred-site.xml

    <?xml version=”1.0”?>
    <?xml-stylesheet type=”text/xsl” href=”configuration.xsl”?>
    <!-- Put site-specific property overrides in this file. -->
    <configuration>
    <property>
     
    <name>mapred.job.tracker</name>      
     
    <value>master:9001</value>      
     
    <description>The host and port that the MapReduce job tracker runs
     at.
    </description>
    </property>
    </configuration> 

    此配置的重点是master服务器的名称一定要确保正确。

  • 相关阅读:
    料理phpMyAdmin2.6以上版本数据乱码结果
    mysql 中字符集的选择
    关于MySQL中的mysqldump饬令的运用
    一些Mysql的优化经验
    MYSQL数据库初学者操作指南1
    MySQL 5.0 新特性教程 存储历程:第三讲
    Windows下MySQL PHP5的设置配备部署与phpBB2论坛的架设
    MySQL 5.0新特征教程 存储历程:第一讲
    MySQL 5.0 新特征教程 存储过程:第二讲
    Linux Apache Mysql PHP典范设置装备摆设1
  • 原文地址:https://www.cnblogs.com/JohnLiang/p/2243391.html
Copyright © 2011-2022 走看看