Ambari **常用的 REST API 介绍**

Ambari 借鉴了很多成熟分布式软件的 API 设计。Rest API 就是一个很好地体现。通过 Ambari 的 Rest API,可以在脚本中通过 curl 维护整个集群。并且,我们可以用 Rest API 实现一些无法在 Ambari GUI 上面做的操作。下面是一些实例。

**实例 1,通过 API 卸载已安装的 Service**

目前 Ambari 不支持在 GUI 上面卸载已安装的 Service。所以当一个 Service 不再需要的时候,用户没法删除掉该 Service。幸运的是 Ambari 提供了 DELETE 的 Rest API,我们可以通过该 API 来删除 Ambari 中 Service。不过这里需要注意,这个方法只是从 Ambari Service 中删除了 Service。这样一来,Ambari 的 GUI 界面中不再显示这个 Service。但是 Service 本身还安装在 Agent 所在的机器。如果用户需要彻底的清除掉这个 Service,仍需要手工的到每个机器卸载(例如,在每个机器执行 yum erase)。

这里我以删除 Storm 为例。卸载之前,需要确认是否停掉了该 Service。我们通过 GET 方法来得到这个结果(这里当然也可以直接从 GUI 上面看到 Service 状态)。具体的命令如下:

curl -u admin:admin -H "X-Requested-By: ambari" -X GET [http://172.172.240.19:8080/api/v1/clusters/HZW_BIGDATA/services/STORM](http://172.172.240.19:8080/api/v1/clusters/HZW_BIGDATA/services/STORM)

curl -u zhangyu:zhangyu321@ -H "X-Requested-By: ambari" -X GET http://172.172.240.19:8080/api/v1/clusters/HZW_BIGDATA/services/SPARK

命令中的 172.172.240.19 Ambari Server 的ip(端口默认为 8080),HZW_BIGDATA为 cluster 名字,STORM 为 Service 的名字。

![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArAAAAB3CAIAAAB0VOTEAAAAAXNSR0IArs4c6QAAIb9JREFUeF7tnbty2762xpkz+1GkFBk/wN7KE1hpXLl1J0+qqHHnMl0apcmMVcVtKjeRnmDrP+k1Lmy/yTkzOWvhQgIkLoR4lfSxSUyBCws/gOQibl/28+fPz58//60em0U2W72Wzr+uZtliY52kdOVT+ndOrQ/zKt/5v3/ZmDqKzN3JS/kanhVGZquNcEFlnv+w2FgFSfJT5LvQflYROYj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30lB8pCI1fawcjt+TOJidBBwk9dY9IGMHUqzE+oID6hiXgAAIgMCxE+guIKC3YNF3z537kYO/1Gdifrs+GnypqqUMm8XaHHnwexBL36AjPZVDluWdBDRc4NztKYayye8eTYomJnEtCIAACIDAERDoLiDgd6ieFM/7GscOMUqwvInNNDDNcAxRngH3tt3acxUic+a96Qvj9Eqv0cPhK18qB7IjOwluPrawyWPypEKoVsYaKn4HARAAgdMk0F1AcPlA0+3UEMBNds9z8MId+PSV/rrK8kGDGtsWyRenGmXQHd0vX/WwA41U7FevsfFzX/rCOE0dbLBpQjIHbmjcSbDb9d49QHtLuSUpTrPxo1QgAAIgAAIFgTPZupjW+Dk/8mmNQixgGKa1sMPZEM5Rxl8/vDYYrRmGF3IFARAAARBoSOD/AaRqKSRMEtU4AAAAAElFTkSuQmCC)

在返回的报文中,可以看到 State 字段。如果是 INSTALLED,代表这个 Service 已经是停掉的状态。我们可以继续删除步骤。如果不是 INSTALLED,则需要先停掉这个 Service,可以从 WEB 上操作,也可以用 Rest API。

用 Rest API 停掉 Service 的命令格式如下,有兴趣的朋友可以尝试一下。
curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":
        {"context":"Stop Service"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' 
        http://AMBARI_SERVER_HOST:8080/api/v1/clusters/c1/services/SERVICE_NAME
执行如下命令删除 STORM:

curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE  [http://172.172.240.19:8080/api/v1/clusters/HZW_BIGDATA/services/STORM](http://172.172.240.19:8080/api/v1/clusters/HZW_BIGDATA/services/STORM)

curl -u zhangyu:zhangyu321@ -H "X-Requested-By: ambari" -X DELETE  http://172.172.240.19:8080/api/v1/clusters/HZW_BIGDATA/services/SPARK

 

执行完成后,Storm 就从 Ambari 的 Service 里面删掉了,但是 Storm 的 package 还存在于机器。

**Storm ****的 RPM 包**

![图 18\. Storm 的 RPM 包](data:image/png;base64,/9j/4AAQSkZJRgABAQEAYABgA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FFFABRRRQAUUUUAFFFFAG14RsLbVPFmm2V5F5ttNMFkTcVyMHuMGo/FFlb6d4p1OztI/Lt4bh0jTcTtAPAyeaKKJfZ+f6Auvy/UyaKKKACug8MxxC21q8aGGWa0svMh86JZFVjIi52sCp4J6g0UUdH6B1XqVfE0EVt4kvooI1jjEmQiDAGQDwOw56Vk0UUl/X4h/X5BXRWemWcvgHUtTeHN5DeRRRybjwpByMZx+lFFN/C/66oFuv66M52iiigDrvhvoun6/wCKvsWp2/n2/wBnd9m9l5GMHKkHvXReBPCWh6z4k8R2l/Y+dBZzbIF8112De46hgTwB1oop9V6P8yej9V+RxfjHT7XSvF2pWNlF5VtDLtjTcWwMA9SSaw6KKiHwo0luzrfh9oun65q1/BqNv50cVhJMi72XDgrg/KR6ms7wlbQXWurFcRJLGYZSVdcjOw4oorVfGvT9WZy+B/10M3UlVdUu1VVVRM4CqMADceAO1eqfCv8A5Fi5/wCv1v8A0BKKK8LOf9x+cTxeJv8Acpf4l+bOZ+Kn/Iz23/Xkv/ob1w9FFdmWf7nT9P8AM6sn/wBwpen6sKKKK7j0gooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2Q==)

如果需要彻底清除掉 Storm 的 package,则需要到各个 Agent 机器执行如下命令。

rpm -qa |grep oozie |xargs rpm -e –nodeps 

或者yum erase storm_2_3_2* -y

执行完后,这个 Service 就被彻底的清除掉了。

rpm -qa |grep hbase |xargs rpm -e --nodeps

rpm -qa |grep hdfs |xargs rpm -e --nodeps

rpm -qa |grep -i Metrics |xargs rpm -e --nodeps

rpm -qa |grep -i Tez |xargs rpm -e --nodeps

rpm -qa |grep -i Phoenix |xargs rpm -e --nodeps

rpm -qa |grep -i Hive |xargs rpm -e --nodeps

rpm -qa |grep -i zookeeper |xargs rpm -e --nodeps

rpm -qa |grep -i datanode |xargs rpm -e --nodeps

rpm -qa |grep -i Region |xargs rpm -e --nodeps

rpm -qa |grep -i NodeManager |xargs rpm -e --nodeps