【发布时间】:2023-03-15 21:39:01
【问题描述】:
我使用的是 Hadoop 2.2.0 版本。我想查看“FSIMAGE”和“EDITS”文件的内容。我使用了以下命令:
bin/hdfs oiv -i fsimage -o fsimage.txt
bin/hdfs oev -i 编辑 -o edits.xml
我是从Aapche hadoop site documentation 得知这些命令的。我运行了示例字数统计程序,然后尝试了上面的命令并得到了这个:-
rushi@ubuntu:/usr/local/hadoop$ bin/hdfs oiv -i fsimage -o fsimage.xml -p XML
Exception in thread "main" java.lang.NullPointerException
at org.apache.hadoop.hdfs.tools.offlineImageViewer.OfflineImageViewer.go(OfflineImageViewer.java:140)
at org.apache.hadoop.hdfs.tools.offlineImageViewer.OfflineImageViewer.main(OfflineImageViewer.java:260)
“fsimage.xml”文件已创建,但它是空的。
可能是什么问题或我如何查看这些文件的内容?
【问题讨论】: