Merge -c 1392075 from trunk to branch-2 to fix MAPREDUCE-4681. Fix unit tests broken by HDFS-3910. Contributed by Arun C. Murthy.