Apache Ambari command-line interface
Running Apache Ambari from the command line :
To execute commands from the command line, you can use Apache Ambari:
Run the following command to read Apache Ambari settings, including hosts in
the cluster :
curl -i –u user:password
To create services across a cluster by using a script, run the following command:
curl --user admin:admin -H "X-Requested-By: ambari" -i -X POST
http://localhost:8080/api/v1/clusters/<your_cluster_name>/services/YARN/compo
nents/APP_TIMELINE_SERVER
Run the following commands to remove services that are not in use. (Services
should be manually halted before being removed. Occasionally, halting Apache
Ambari services might not also stop some of the subcomponents, so be sure to stop
those as well.)
curl -u user:password -H "X-Requested-By: ambari" -X DELETE
http://localhost:8080/api/v1/clusters/BI4_QSVservices/FLUME
curl -u user:password -H "X-Requested-By: ambari" -X DELETE
http://localhost:8080/api/v1/clusters/BI4_QSVservices/SLIDER
curl -u user:password -H "X-Requested-By: ambari" -X DELETE
http://localhost:8080/api/v1/clusters/BI4_QSVservices/SOLR
You can start or restart the Ambari Server by running the following command:
[root@rvm ~]# ambari-server restart
Using python /usr/bin/python2.6
Restarting ambari-server
Using python /usr/bin/python2.6
Stopping ambari-server
Ambari Server stopped
Running Apache Ambari from the command line :
To execute commands from the command line, you can use Apache Ambari:
Run the following command to read Apache Ambari settings, including hosts in
the cluster :
curl -i –u user:password
To create services across a cluster by using a script, run the following command:
curl --user admin:admin -H "X-Requested-By: ambari" -i -X POST
http://localhost:8080/api/v1/clusters/<your_cluster_name>/services/YARN/compo
nents/APP_TIMELINE_SERVER
Run the following commands to remove services that are not in use. (Services
should be manually halted before being removed. Occasionally, halting Apache
Ambari services might not also stop some of the subcomponents, so be sure to stop
those as well.)
curl -u user:password -H "X-Requested-By: ambari" -X DELETE
http://localhost:8080/api/v1/clusters/BI4_QSVservices/FLUME
curl -u user:password -H "X-Requested-By: ambari" -X DELETE
http://localhost:8080/api/v1/clusters/BI4_QSVservices/SLIDER
curl -u user:password -H "X-Requested-By: ambari" -X DELETE
http://localhost:8080/api/v1/clusters/BI4_QSVservices/SOLR
You can start or restart the Ambari Server by running the following command:
[root@rvm ~]# ambari-server restart
Using python /usr/bin/python2.6
Restarting ambari-server
Using python /usr/bin/python2.6
Stopping ambari-server
Ambari Server stopped