Class PBImageCorruptionDetector

java.lang.Object
org.apache.hadoop.hdfs.tools.offlineImageViewer.PBImageCorruptionDetector
All Implemented Interfaces:
Closeable, AutoCloseable

public class PBImageCorruptionDetector extends Object
The PBImageCorruptionDetector detects corruptions in the image. It produces a file with the found issues similar to the Delimited processor. The default delimiter is tab, as this is an unlikely value to be included in an inode path. The delimiter value can be changed via the constructor. It looks for the following kinds of corruptions: - an INode id is mentioned in the INodeDirectorySection, but not present in the INodeSection (corrupt INode case) - an INode has children, but at least one of them is corrupted (missing children case) If multiple layers of directory structure are damaged then it is possible that an INode is corrupted and also having corrupted children. Note that the OIV DetectCorruption processor check is not exhaustive, and only catches the corruptions like above. This processor may be up to extension in the future when new aspects of corruption are found.