- 概念
大数据之Hadoop:Fsimage和Edits解析 -
oiv查看Fsimage文件
2.1 查看oiv和oev命令
[[email protected] current]$ hdfs
oiv apply the offline fsimage viewer to an fsimage
oev apply the offline edits viewer to an edits file
2.2 基本语法
hdfs oiv -p 文件类型 -i镜像文件 -o 转换后文件输出路径
2.3 案例实操
[[email protected] current]$ pwd
/opt/module/hadoop-2.7.2/data/tmp/dfs/name/current
[[email protected] current]$ hdfs oiv -p XML -i fsimage_0000000000000000025 -o /opt/module/hadoop-2.7.2/fsimage.xml
[[email protected] current]$ cat /opt/module/hadoop-2.7.2/fsimage.xml
-
oev查看Edits文件
3.1 基本语法
hdfs oev -p 文件类型 -i编辑日志 -o 转换后文件输出路径
3.2 案例实操
[[email protected] current]$ hdfs oev -p XML -i edits_0000000000000000012-0000000000000000013 -o /opt/module/hadoop-2.7.2/edits.xml
[[email protected] current]$ cat /opt/module/hadoop-2.7.2/edits.xml