code: LocatedBlocks getBlockLocations(String clientMachine, String src,
                                    long offset, long length,
                                    BlockMetaInfoType type) throws IOException {
      INode[] inodes = dir.getExistingPathINodes(src);
      if (isPermissionEnabled && 
          isPermissionCheckingEnabled(inodes)) {
        checkPathAccess(src, inodes, FsAction.READ);
      }
  
      LocatedBlocks blocks = getBlockLocations(src, inodes[inodes.length-1],
          offset, length, false, type);
      if (blocks != null) {
        //sort the blocks
        DatanodeDescriptor client = host2DataNodeMap.getDatanodeByHost(
          clientMachine);
        for (LocatedBlock b : blocks.getLocatedBlocks()) {
          clusterMap.pseudoSortByDistance(client, b.getLocations());
          // Move decommissioned datanodes to the bottom
          Arrays.sort(b.getLocations(), DFSUtil.DECOM_COMPARATOR);
        }
      }
      return blocks;
    }
docs: Get block locations within the specified range.
  
  @see #getBlockLocations(String, long, long)