DP-217 HDFS-4505 and HADOOP-3733 forward merge

Forward merging missing patches to Hadoop 2.2.0
See DP-205