移除服务
采用Ambari REST API移除相关服务。
1 | #停止服务 |
cURL是一个命令行工具,通过不同的协议传输数据,1997年首次发布。cURL is a computer software project providing a library and command-line tool for transferring data using various protocols. The cURL project produces two products, libcurl and cURL. It was first released in 1997. The name originally stood for “see URL”.curl支持的协议有FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, POP3, IMAP, SMTP and RTSP at the time of this writing. Wget支持HTTP, HTTPS and FTP三种协议.
移除包
移除各个节点啊上安装的包。
1 | #主节点 |
删除文件
删除与Ambari Metrics相关的文件。
1 | rm -rf |
可将以上代码写入Shell脚本,执行即可。
添加服务
以上步骤完成后,重新到Ambari UI界面添加Ambari Metrics服务即可。如果哪个服务实在无法修复,最无奈的方法,重装此服务。
参考文章:
[Services and State with Ambari REST API]
[Services and State with Ambari REST API]:http://henning.kropponline.de/2015/06/07/services-and-state-with-ambari-rest-api/