boolean checkFileProgress ( INodeFile v , boolean checkall ) throws IOException { INode . enforceRegularStorageINode ( v , "checkFileProgress is not supported for non-regular files" ) ; if ( checkall ) { // // check all blocks of the file. // int closeFileReplicationMin = Math . min ( v . getReplication ( ) , this . minCloseReplication ) ; for ( Block block : v . getBlocks ( ) ) { if ( ! checkBlockProgress ( v , block , closeFileReplicationMin ) ) { return false ; } } return true ; } else { // // check the penultimate block of this file // Block b = v . getStorage ( ) . getPenultimateBlock ( ) ; return checkBlockProgress ( v , b , minReplication ) ; } }
Check that the indicated file s blocks are present and replicated . If not return false . If checkall is true then check all blocks otherwise check only penultimate block .