Chinaunix首页 | 论坛 | 博客
  • 博客访问: 628025
  • 博文数量: 149
  • 博客积分: 3901
  • 博客等级: 中校
  • 技术积分: 1558
  • 用 户 组: 普通用户
  • 注册时间: 2009-02-16 14:33
文章分类

全部博文(149)

文章存档

2014年(2)

2013年(10)

2012年(32)

2011年(21)

2010年(84)

分类:

2011-03-03 14:45:46




向一个正在运行的Hadoop集群中增加几个新的Nodes

1. 新节点上部署java/hadoop程序,配置相应的环境变量

2. 新节点上增加用户,从master上拷贝id_rsa.pub并配置authorized_keys

3. 新节点上设置host,需要有集群中各节点的host对应

4. 新节点上建立相关的目录,并修改属主

5. masterslaves文件中增加上相的节点,master上增加相应的host

6. 在新节点上启动datanodetasktracker

/opt/sohuhadoop/hadoop/bin/hadoop-daemon.sh start datanode
/opt/sohuhadoop/hadoop/bin/hadoop-daemon.sh start tasktracker

7. 进行block块的均衡

hdfs-site.xml中增加设置balance的带宽,默认只有1M


    dfs.balance.bandwidthPerSec
    10485760
   
        Specifies the maximum bandwidth that each datanode can utilize for the balancing purpose in term of the number of bytes per second.
   

运行以下命令:

/opt/sohuhadoop/hadoop/bin/start-balancer.sh -threshold 3

均衡10个节点,移动400G数据,大概花费了3个小时

The cluster is balanced. Exiting…
Balancing took 2.9950980555555557 hours





阅读(1242) | 评论(0) | 转发(0) |
0

上一篇:hadoop 配置说明

下一篇:infobright 使用

给主人留下些什么吧!~~