I just tried these command and failed.
curl -X POST -H "Content-Type:application/json" -u admin:serving -d ' { "items" : [ { "name" : "yarn-NODEMANAGER-ecaa167810719b1adf26481d06c14891" }, {"name" : "yarn-NODEMANAGER-4618314a51eefc788471cec21e1c3164"} ] }' 'http://cm-server:7180/api/v10/clusters/cluster/services/yarn/roleCommands/restart'
error message below.
{
"message" : "Can not deserialize instance of java.lang.String out of START_OBJECT token\n at [Source: org.apache.cxf.transport.http.AbstractHTTPDestination$1@5e19f6e5; line: 1, column: 16] (through reference chain: com.cloudera.api.model.ApiRoleNameList[\"items\"])"
}
so what's next?