YARN-711. Copied BuilderUtil methods in individual API records as BuilderUtils is going to be dismantled. Contributed by Jian He.
svn merge --ignore-ancestry -c 1485888 ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1485890 13f79535-47bb-0310-9956-ffa450edef68
HADOOP-8562. Merge changes r1454616 for HDFS-4573, r1454889 for HADOOP-8973, r1455360 for HDFS-4572, r1455605 for HDFS-4287 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1485892 13f79535-47bb-0310-9956-ffa450edef68