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/