Ambari Managed HDF Upgrade
Also available as:
PDF

Pre-Upgrade Tasks for HDF

If you have deleted any service pools from your SAM installation, your upgrade may fail as a result of SAM database dangling entries. To remove any remaining entries from your SAM database, run a manual command.

For your MySQL database, run:

DELETE FROM `service` WHERE `clusterId` not in (SELECT `id` FROM `cluster`);
DELETE FROM `service_configuration` WHERE `serviceId` not in (SELECT `id` FROM `service`);
DELETE FROM `component` WHERE `serviceId` not in (SELECT `id` FROM `service`);

For Oracle and Postgres, run:

DELETE FROM "service" WHERE "clusterId" not in (SELECT "id" FROM "cluster");
DELETE FROM "service_configuration" WHERE "serviceId" not in (SELECT "id" FROM "service");
DELETE FROM "component" WHERE "serviceId" not in (SELECT "id" FROM "service");