手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Hadoop添加datanode或者tasktracker节点

[日期:2013-09-14] 来源:Linux社区  作者:wangxiaoyu [字体:大 中 小]
5.3 任意节点为上执行
$ bin/Hadoop dfsadmin -report
Configured Capacity: 32977600512 (30.71 GB)
Present Capacity: 20209930240 (18.82 GB)
DFS Remaining: 20003794944 (18.63 GB)
DFS Used: 206135296 (196.59 MB)
DFS Used%: 1.02%
Under replicated blocks: 1
Blocks with corrupt replicas: 0
Missing blocks: 0
-------------------------------------------------
Datanodes available: 2 (2 total, 0 dead)
Name: 192.168.88.172:50010
Decommission Status : Normal
Configured Capacity: 16488800256 (15.36 GB)
DFS Used: 205955072 (196.41 MB)
Non DFS Used: 6369054720 (5.93 GB)
DFS Remaining: 9913790464(9.23 GB)
DFS Used%: 1.25%
DFS Remaining%: 60.12%
Last contact: Fri Sep 13 03:35:51 CST 2013
 
Name: 192.168.88.173:50010
Decommission Status : Normal
Configured Capacity: 16488800256 (15.36 GB)
DFS Used: 180224 (176 KB)
Non DFS Used: 6398615552 (5.96 GB)
DFS Remaining: 10090004480(9.4 GB)
DFS Used%: 0%
DFS Remaining%: 61.19%

Last contact: Fri Sep 13 03:35:50 CST 2013

 

6. 使正在运行的计算分布到新的数据节点上

 

[xiaoyu@hadoop01 hadoop-1.1.2]$ ./bin/start-balancer.sh

starting balancer, logging to /home/xiaoyu/hadoop-1.1.2/libexec/../logs/hadoop-xiaoyu-balancer-hadoop01.out

[xiaoyu@hadoop01 hadoop-1.1.2]$

这个脚本很有用,大家也可以根据实际需要修改这个脚本。

 

7. 参考资料

 

Is there a way to add nodes to a running Hadoop cluster?

 

http://stackoverflow.com/questions/13159184/is-there-a-way-to-add-nodes-to-a-running-hadoop-cluster
 
1> Update the /etc/hadoop/conf/slaves list with the new node-name
2> Sync the full configuration /etc/hadoop/conf to the new datanode from the Namenode. If the file system isn't shared.
2> Restart all the hadoop services on Namenode/Tasktracker and all the services on the new Datanode.
3> Verify the new datanode from the browser http://namenode:50070
4> Run the balancer script to readjust the data between the nodes.

更多Hadoop相关信息见Hadoop 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=13

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款