private static long getBlockSize ( LocatedBlocks lbs ) throws IOException { List < LocatedBlock > locatedBlocks = lbs . getLocatedBlocks ( ) ; long bs = - 1 ; for ( LocatedBlock lb : locatedBlocks ) { if ( lb . getBlockSize ( ) > bs ) { bs = lb . getBlockSize ( ) ; } } return bs ; }
Obtain block size given 3 or more blocks