NetworkToplogy uses nodes with a list of children. The access to these children is slow as it's a linear search.
NetworkTopology#getLoc should exit loop earlier rather than traverse all children
NetworkTopology#add calls NetworkTopology#toString always
Backport HADOOP-12185 to branch-2.7: NetworkTopology is not efficient adding/getting/removing nodes