1. 修改日志文件查看器
hdfs oev -i edits_0000000000000000081-0000000000000000089 -o edits.xml cat edits.xml
修改日志文件转储为xml格式的edits.xml文件,其中每条RECORD就是一个操作事务日志
2. fsimage查看HDFS中的块信息等
[hadoop@hadoop current]$ hdfs oiv -i fsimage_0000000000000016539 -o fsimage.fd -p FileDistribution maxSize 1000 step 5 [hadoop@hadoop current]$ cat fsimage.fd结果:
Processed 0 inodes. Size NumFiles 0 137 2097152 198 4194304 8 6291456 2 8388608 4 10485760 2 totalFiles = 351 totalDirectories = 283 totalBlocks = 214 totalSpace = 196413302 maxFileSize = 8945561
3. 查看HDFS上的文件和目录详细信息
hdfs oiv -i fsimage_0000000000000016539 -p XML -o fsimage.xml cat fsimage.xml