set JobTracker/ResourceManager vm's hostname to mgt_fqdn and others to mapred_fqdn
to support VHM; For each ip, query the fqdn only once