Managing and Monitoring a Cluster
Also available as:
loading table of contents...

Set the rack id for Ambari

By setting the Rack ID, you can enable Ambari to manage rack information for hosts, including displaying the hosts in heatmaps by Rack ID, enabling users to filter and find hosts on the Hosts page, using that Rack ID. If HDFS is installed in your cluster, Ambari passes this Rack ID information to HDFS using a topology script. Ambari generates a topology script at /etc/hadoop/conf/ and sets the property in core-site automatically. This topology script reads a mappings file /etc/hadoop/conf/ that Ambari automatically generates. When you make changes to Rack ID assignment using Ambari, this mappings file will be updated when you push out the HDFS configuration. HDFS uses this topology script to obtain Rack information about the DataNode hosts.

You can set the Rack ID using Ambari Web in two ways.

  • Make multiple hosts aware of a rack simultaneously, using Actions.
  • Make each host aware of a rack individually, using Host Actions.

  1. To set the Rack ID for multiple hosts, from the Hosts page, click Actions, then click Selected Hosts, Filtered Hosts, or All Hosts.
  2. Expand the menu, and click Hosts.
  3. Then, expand the menu and click Set Rack.

  4. Alteratively, for a specific host, from the Hosts page, click Host Actions > Set Rack.
  5. In Set Rack, type the rack name, then click OK.
Browse to Ambari Web > Dashboard, and restart any services that display the Restart Required icon.