最近有需要从cli来重新启动service。下面举个例子说明下
参考链接:
-
curl -u admin:PWD -H 'X-Requested-By: ambari' -X POST -d '
-
{
-
"RequestInfo":{
-
"command":"RESTART",
-
"context":"Restart HDFS Client on HOSTFQDN",
-
"operation_level":{
-
"level":"HOST",
-
"cluster_name":"prod"
-
}
-
},
-
"Requests/resource_filters":[
-
{
-
"service_name":"HDFS",
-
"component_name":"HDFS_CLIENT",
-
"hosts":"HOSTFQDN"
-
}
-
]
-
}' http://ANBARI-SERVER:8080/api/v1/clusters/prod/requests
阅读(1859) | 评论(0) | 转发(0) |