Disable ResourceManager high availability
Using the Ambari API, delete the ResourceManager. Then, use the ZooKeeper client to update the znode permissions.
Because these steps involve using the Ambari REST API, you should test and verify them in a test environment prior to executing against a production environment.
- In Ambari Web, stop YARN and ZooKeeper services.
On the Ambari server host, use the Ambari API to retrieve the YARN configurations
into a JSON file.
/var/lib/ambari-server/resources/scripts/configs.py get [AMBARI_SERVER] [CLUSTER_NAME] yarn-site yarn-site.jsonIn this example, [AMBARI_SERVER] is the hostname of your Ambari Server and [CLUSTER_NAME] is the name of your cluster.
For Ambari 2.6.0 and higher, config.sh is not supported and will fail. Use config.py instead.
- In the yarn-site.json file, change
yarn.resourcemanager.ha.enabled to false and
delete the following properties:
Verify that the following properties in the yarn-site.json
file are set to the ResourceManager hostname you are keeping:
- Search the yarn-site.json file and remove any references to the ResourceManager hostname that you are removing.
Search the yarn-site.json file and remove any properties that
might still be set for ResourceManager IDs.
For example, rm1 and rm2.
Save the yarn-site.json file and set that configuration
against the Ambari Server.
/var/lib/ambari-server/resources/scripts/configs.py set [AMBARI_SERVER] [CLUSTER_NAME] yarn-site yarn-site.json
Using the Ambari API, delete the ResourceManager host component for the host that
you are deleting.
curl --user admin:admin -i -H "X-Requested-By: ambari" -X DELETE http://ambari.server:8080/api/v1/clusters/cluster.name/hosts/hostname/host_components/RESOURCEMANAGER
- In Ambari Web, start the ZooKeeper service.
On a host that has the ZooKeeper client installed, use the ZooKeeper client to
change znode permissions.
/usr/hdp/current/zookeeper-client/bin/zkCli.sh getAcl /rmstore/ZKRMStateRoot setAcl /rmstore/ZKRMStateRoot world:anyone:rwcda
- In Ambari Web, restart ZooKeeper service and start YARN service.