Prerequisites
- At least 2 hosts in the cluster where YARN is not present on 1 host
- HDP 2.0+
- YARN Installed
Assumptions
Placeholder | Description | Example |
---|---|---|
ambari_server | The server running the Ambari web client | c6401.ambari.apache.org:8080 |
cluster_name | The name of the cluster | cluster1 |
target_host | The host that will have the additional ResourceManager | c6402.ambari.apache.org |
Installing ResourceManager
- Stop all services except for HDFS.
- Using the Ambari web client to manually stop each service.
- Using the Ambari REST APIs directly. For this method, you can consult the documentation on starting and stopping services.
Add a ResourceManager component to YARN on a host that does not already have ResourceManager installed. This will not actually install ResourceManager, but will setup the host component associations.
curl -u admin:$PASSWORD -H "X-Requested-By: Ambari" -i -X POST -d '{"host_components" : [{"HostRoles":{"component_name":"RESOURCEMANAGER"}}] }' http://<ambari_server>/api/v1/clusters/<cluster_name>/hosts?Hosts/host_name=<target_host>
Install ResourceManager on the same
target_host
used in the previous step.curl -u admin:$PASSWORD -H "X-Requested-By: Ambari" -i -X PUT -d '{"RequestInfo":{"context":"Install ResourceManager","operation_level":{"level":"HOST_COMPONENT","cluster_name":"<cluster_name>","host_name":"<target_host>","service_name":"YARN"}},"Body":{"HostRoles":{"state":"INSTALLED"}}}' http://<ambari_server>/api/v1/clusters/<cluster_name>/hosts/<target_host>/host_components/RESOURCEMANAGER