Hadoop shim: change getFileBlockLocations to use getBlocksLocation. Ensure that getFileBlockLocations method returns at least one block location, possibly with no hosts/IPs if file exists, as it appears that hadoop always expects at least one block location in the returned array. Remove port numbers from "locations", as it appears that hadoop expects no port numbers, and raises an exception if port numbers are  present. Sort unique host / ips preserving the order. Ensure that the location hints cover entire requested range, or up to the end of file.