参考:http://hadoop.apache.org/docs/r2.6.3/hadoop-project-dist/hadoop-hdfs/HdfsImageViewer.html
  离线镜像查看器用于查看HDFS镜像。hadoop2.4之前的镜像查看器与之后的不同,要查看2.4之前的,请用2.3的查看器,或者用oiv_legacy Command 命令。

输出格式:
1)web http(默认方式)
2)XML

使用方式:
1)web方式
首先启动HTTP REST:
列出有哪些目录:
查看指定目录:
2)XML方式
将fsimage里的内容dump到xml中


命令选项:
Flag Description
-i|--inputFile input file Specify the input fsimage file to process. Required.
-o|--outputFile output file Specify the output filename, if the specified output processor generates one. If the specified file already exists, it is silently overwritten. (output to stdout by default)
-p|--processor processor Specify the image processor to apply against the image file. Currently valid options are Web (default), XML and FileDistribution.
-addr address Specify the address(host:port) to listen. (localhost:5978 by default). This option is used with Web processor.
-maxSize size Specify the range [0, maxSize] of file sizes to be analyzed in bytes (128GB by default). This option is used with FileDistribution processor.
-step size Specify the granularity of the distribution in bytes (2MB by default). This option is used with FileDistribution processor.
-h|--help Display the tool usage and help information and exit.







相关文章: