欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

hdfs oiv分析调试篇

程序员文章站 2022-04-11 08:04:51
...
public class FsimageOIV {
	@Test
	public void oiv() throws Exception{
		String[] args = {"-p","Delimited", "-i", "/Users/didi/Work/test/fsimage_0000000000000029436",
				"-o","/Users/didi/Work/test/fsimage_0000000000000029436.csv"};
		
		OfflineImageViewerPB.main(args);
	}
}
[aaa@qq.com current]$
[aaa@qq.com current]$ hdfs oiv -p Delimited -delimiter "," -i fsimage_0000000000000029436 -o fsimage_0000000000000029436.csv
2020-03-09 12:15:28,169 DEBUG util.Shell: setsid exited with exit code 0
2020-03-09 12:15:28,228 INFO offlineImageViewer.PBImageTextWriter: Loading string table
2020-03-09 12:15:28,237 INFO offlineImageViewer.FSImageHandler: Loading 7 strings
2020-03-09 12:15:28,239 INFO offlineImageViewer.PBImageTextWriter: Loading inode references
2020-03-09 12:15:28,239 INFO offlineImageViewer.FSImageHandler: Loading inode references
2020-03-09 12:15:28,247 INFO offlineImageViewer.FSImageHandler: Loaded 0 inode references
2020-03-09 12:15:28,248 INFO offlineImageViewer.PBImageTextWriter: Loading directories
2020-03-09 12:15:28,251 INFO offlineImageViewer.PBImageTextWriter: Loading directories in INode section.
2020-03-09 12:15:28,278 DEBUG offlineImageViewer.PBImageTextWriter: Scanned 0 inodes.
2020-03-09 12:15:28,309 INFO offlineImageViewer.PBImageTextWriter: Found 440 directories in INode section.
2020-03-09 12:15:28,310 INFO offlineImageViewer.PBImageTextWriter: Finished loading directories in 61ms
2020-03-09 12:15:28,310 INFO offlineImageViewer.PBImageTextWriter: Loading INode directory section.
2020-03-09 12:15:28,318 INFO offlineImageViewer.PBImageTextWriter: Scanned 398 INode directories to build namespace.
2020-03-09 12:15:28,318 INFO offlineImageViewer.PBImageTextWriter: Finished loading INode directory section in 8ms
2020-03-09 12:15:28,337 INFO offlineImageViewer.PBImageTextWriter: Found 2104 INodes in the INode section
2020-03-09 12:15:28,359 DEBUG offlineImageViewer.PBImageTextWriter: Outputted 0 INodes.
2020-03-09 12:15:28,678 INFO offlineImageViewer.PBImageTextWriter: Outputted 2104 INodes.
2020-03-09 12:15:28,678 DEBUG offlineImageViewer.PBImageTextWriter: Time to output inodes: 360ms

hdfs oiv分析调试篇
有对应的visit方法。

hdfs oiv分析调试篇
遍历sessions,一共10个session

NS_INFO
STRING_TABLE
ERASURE_CODING
INODE
INODE_REFERENCE
SNAPSHOT
INODE_DIR
FILES_UNDERCONSTRUCTION
SECRET_MANAGER
CACHE_MANAGER

相关标签: HDFS