1.oiv查看Fsimage文件
hdfs
oiv apply the offline fsimage viewer to an fsimage
oev apply the offline edits viewer to an edits file
基本语法
hdfs oiv -p 文件类型 -i镜像文件 -o 转换后文件输出路径
案例实操
[huizai@hadoop102 current]$ pwd /opt/module/hadoop-3.1.3/data/dfs/name/current
[huizai@hadoop102 current]$ hdfs oiv -p XML -i fsimage_0000000000000000025 -o /opt/module/hadoop-3.1.3/fsimage.xml
[huizai@hadoop102 current]$ cat /opt/module/hadoop-3.1.3/fsimage.xml
2.oev查看Edits文件
基本语法
hdfs oev -p 文件类型 -i编辑日志 -o 转换后文件输出路径
案例实操
[huizai@hadoop102 current]$ hdfs oev -p XML -i edits_0000000000000000012-0000000000000000013 -o /opt/module/hadoop-3.1.3/edits.xml
[huizai@hadoop102 current]$ cat /opt/module/hadoop-3.1.3/edits.xml
|