static long parseGenerationStampInMetaFile ( File blockFile , File metaFile ) throws IOException { String metaname = metaFile . getName ( ) ; String gs = metaname . substring ( blockFile . getName ( ) . length ( ) + 1 , metaname . length ( ) - FSDataset . METADATA_EXTENSION . length ( ) ) ; try { return Long . parseLong ( gs ) ; } catch ( NumberFormatException nfe ) { throw ( IOException ) new IOException ( "blockFile=" + blockFile + ", metaFile=" + metaFile ) . initCause ( nfe ) ; } }
Find generation stamp from block file and meta file .