温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Hadoop 查看某个文件分成几个块,分别在那台机架的哪个机器上

发布时间:2020-07-06 00:39:42 来源:网络 阅读:882 作者:Stitch_x 栏目:大数据

命令是

hadoop fsck /g6/input/baidu.log -files -blocks -locations -racks
[hadoop@hadoop002 ~]$ hadoop fsck /g6/input/baidu.log -files -blocks -locations -racks
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

Connecting to namenode via http://hadoop001:50070
FSCK started by hadoop (auth:SIMPLE) from /192.168.1.202 for path /g6/input/baidu.log at Fri May 17 07:17:29 EDT 2019
/g6/input/baidu.log 709286098 bytes, 3 block(s):  OK
0. BP-1964109503-192.168.1.201-1557058616667:blk_1073741939_1115 len=268435456 Live_repl=3 [/default-rack/192.168.1.203:50010, /default-rack/192.168.1.202:50010, /default-rack/192.168.1.201:50010]
1. BP-1964109503-192.168.1.201-1557058616667:blk_1073741940_1116 len=268435456 Live_repl=3 [/default-rack/192.168.1.202:50010, /default-rack/192.168.1.203:50010, /default-rack/192.168.1.201:50010]
2. BP-1964109503-192.168.1.201-1557058616667:blk_1073741941_1117 len=172415186 Live_repl=3 [/default-rack/192.168.1.202:50010, /default-rack/192.168.1.203:50010, /default-rack/192.168.1.201:50010]

Status: HEALTHY
 Total size:    709286098 B
 Total dirs:    0
 Total files:   1
 Total symlinks:        0
 Total blocks (validated):  3 (avg. block size 236428699 B)
 Minimally replicated blocks:   3 (100.0 %)
 Over-replicated blocks:    3 (100.0 %)
 Under-replicated blocks:   0 (0.0 %)
 Mis-replicated blocks:     0 (0.0 %)
 Default replication factor:    2
 Average block replication: 3.0
 Corrupt blocks:        0
 Missing replicas:      0 (0.0 %)
 Number of data-nodes:      3
 Number of racks:       1
FSCK ended at Fri May 17 07:17:29 EDT 2019 in 3 milliseconds

The filesystem under path '/g6/input/baidu.log' is HEALTHY

下方这部分信息就是块的位置信息和副本信息

0. BP-1964109503-192.168.1.201-1557058616667:blk_1073741939_1115 len=268435456 Live_repl=3 [/default-rack/192.168.1.203:50010, /default-rack/192.168.1.202:50010, /default-rack/192.168.1.201:50010]
1. BP-1964109503-192.168.1.201-1557058616667:blk_1073741940_1116 len=268435456 Live_repl=3 [/default-rack/192.168.1.202:50010, /default-rack/192.168.1.203:50010, /default-rack/192.168.1.201:50010]
2. BP-1964109503-192.168.1.201-1557058616667:blk_1073741941_1117 len=172415186 Live_repl=3 [/default-rack/192.168.1.202:50010, /default-rack/192.168.1.203:50010, /default-rack/192.168.1.201:50010]
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI