private Map < Integer , Integer > getLostStripes ( Configuration conf , FileStatus stat , FileSystem fs ) throws IOException { Map < Integer , Integer > lostStripes = new HashMap < Integer , Integer > ( ) ; RaidInfo raidInfo = RaidUtils . getFileRaidInfo ( stat , conf ) ; if ( raidInfo . codec == null ) { // Can not find the parity file, the file is not raided. return lostStripes ; } Codec codec = raidInfo . codec ; if ( codec . isDirRaid ) { RaidUtils . collectDirectoryCorruptBlocksInStripe ( conf , ( DistributedFileSystem ) fs , raidInfo , stat , lostStripes ) ; } else { RaidUtils . collectFileCorruptBlocksInStripe ( ( DistributedFileSystem ) fs , raidInfo , stat , lostStripes ) ; } return lostStripes ; }
Get the lost blocks numbers per stripe in the source file .