Hadoop in Action 翻译 第二章续2(介绍分布式部署)

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

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

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

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

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

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

ExpandedBlockStart.gif hdfs-site.xml
<? xml version=”1.0” ?>
<? xml-stylesheet type=”text/xsl” href=”configuration.xsl” ?>
<!--  Put site-specific property overrides in this file.  -->
< con figuration >
< 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 >

 

 

ExpandedBlockStart.gif 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.  -->
< con fi 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 >

 

 ExpandedBlockStart.gifmapred-site.xml

<? xml version=”1.0” ?>
<? xml-stylesheet type=”text/xsl” href=”configuration.xsl” ?>
<!--  Put site-specific property overrides in this file.  -->
< con figuration >
< 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服务器的名称一定要确保正确。

转载于:https://www.cnblogs.com/wxblogweb/archive/2011/01/27/hadoop_in_action_2-2.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值