linux怎么查看本机内存大小
283
2022-11-17
HDFS角色NameNode之Fsimage文件分析
1 查看oiv和oev命令
[root@node1 ~]# hdfs|grep o.voev apply the offline edits viewer to an edits fileoiv apply the offline fsimage viewer to an fsimage
2 查看oiv命令
[root@node1 ~]# hdfs oiv --helpUsage: bin/hdfs oiv [OPTIONS] -i INPUTFILE -o OUTPUTFILEOffline Image ViewerView a Hadoop fsimage INPUTFILE using the specified PROCESSOR,saving the results in OUTPUTFILE.-i,--inputFile
3 基本语法
hdfs oiv -p 文件类型 -i 镜像文件 -o 转换后文件输出的全路径名
4 案例实操
[root@node1 current]# pwd/var/itbaizhan/hadoop/full/dfs/name/current[root@node1 current]# ll|grep fsimage-rw-r--r-- 1 root root 722 10月 9 13:49 fsimage_0000000000000000047-rw-r--r-- 1 root root 62 10月 9 13:49 fsimage_0000000000000000047.md5-rw-r--r-- 1 root root 722 10月 9 14:49 fsimage_0000000000000000049-rw-r--r-- 1 root root 62 10月 9 14:49 fsimage_0000000000000000049.md5[root@node1 current]# hdfs oiv -p XML -i fsimage_0000000000000000049 -o /opt/hadoop-3.1.3/fsimage49.xml2021-10-09 15:20:24,428 INFO offlineImageViewer.FSImageHandler: Loading 3 strings[root@node1 current]# vim /opt/hadoop-3.1.3/fsimage49.xml#格式化该xml文件:Ctrl+v-> !xmllint -format - -> 删除生成的
部分显示结果如下:
思考:观察发现Fsimage中没有记录块所对应DataNode,为什么?
在集群启动后,要求DataNode上报数据块信息,并间隔一段时间后再次上报。
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~