code: public BlockLocation[] getBlockLocations(String src, long start,
      long length) throws IOException {
      LocatedBlocks blocks = callGetBlockLocations(namenode, src, start, length,
          isMetaInfoSuppoted(namenodeProtocolProxy));
      return DFSUtil.locatedBlocks2Locations(blocks);
    }
docs: Get block location info about file
  
  getBlockLocations() returns a list of hostnames that store
  data for a specific file region.  It returns a set of hostnames
  for every block within the indicated region.
  
  This function is very useful when writing code that considers
  data-placement when performing operations.  For example, the
  MapReduce system tries to schedule tasks on the same machines
  as the data-block the task processes.