将新参数和值添加到ambari群集后,我们需要重新启动服务才能生效
所以我的问题是
我们需要API命令只重启需要重启的服务吗?
答案 0 :(得分:0)
为了重新启动所有相关服务(需要重新启动),以下语法就是答案
curl -u admin:admin -H "X-Requested-By: ambari" -X POST -d '{"RequestInfo":{"command":"RESTART","context":"Restart all required services","operation_level":"host_component"},"Requests/resource_filters":[{"hosts_predicate":"HostRoles/stale_configs=true"}]}' http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/requests