Skip to content

Instantly share code, notes, and snippets.

@pcheliniy
Last active May 2, 2025 13:19
Show Gist options
  • Save pcheliniy/cd68fbda6f885ff154d23f03ff8f4d90 to your computer and use it in GitHub Desktop.
Save pcheliniy/cd68fbda6f885ff154d23f03ff8f4d90 to your computer and use it in GitHub Desktop.
Manual move services in ambari
remove components
curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE \
http://ambari:8080/api/v1/clusters/analytics/services/STORM/components/NIMBUS
Add new componentns not attached to host

curl -u admin:admin -H "X-Requested-By: ambari" -X POST http://ambari:8080/api/v1/clusters/analytics/services/STORM/components/NIMBUS

attach components to new host

curl -u admin:admin -H "X-Requested-By: ambari" -X POST -d '{"host_components" : [{"HostRoles":{"component_name":"NIMBUS"}}] }' http://ambari:8080/api/v1/clusters/analytics/hosts?Hosts/host_name=hdp.new.host

change status to installed

curl -u admin:admin -H "X-Requested-By: ambari" -i -X PUT -d '{"ServiceInfo": {"state" : "INSTALLED"}}' http://ambari:8080/api/v1/clusters/analytics/services/STORM

States

State Description
INIT Initial/Clean state.
INSTALLING In the process of installing.
INSTALL_FAILED Install failed.
INSTALLED State when install completed successfully.
STARTING In the process of starting.
STARTED State when start completed successfully.
STOPPING In the process of stopping.
UNINSTALLING In the process of uninstalling.
UNINSTALLED State when uninstall completed successfully.
WIPING_OUT In the process of wiping out the install.
UPGRADING In the process of upgrading the deployed bits.
DISABLED Disabled master’s backup state.
UNKNOWN State could not be determined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment