HDFS-6840. Clients are always sent to the same datanode when read is off rack. (wang)

(cherry picked from commit 8e73084491c9f317bc8cc3590f93ca67a63687a8)