- 概念
大資料之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