Environmental factors require us to restart impala daemons in batches of ~20 and not all at once. It's not a huge issue, but it's an annoyance for our operations folks to do during upgrades. I was exploring the CM REST API and see that some services offer the rolling restart option. I tried using this with Impala, but the curl command gave a "Unsupported Media Type" in the logs.
Cloudera API Explorer:
curl -u -X POST <username>:<password> <ip_address>/api/v15/clusters/cluster/services/impala/commands/rollingRestart
* Trying x.x.x.x...
* Connected to x.x.x.x (x.x.x.x) port 7180 (#0)
* Server auth using Basic with user '<user>'
> GET /api/v15/clusters/cluster/services/impala/commands/enterMaintenanceMode HTTP/1.1
> Host: x.x.x.x:7180
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.49.0
> Accept: */*
< HTTP/1.1 415 Unsupported Media Type
< Expires: Thu, 01-Jan-1970 00:00:00 GMT
< Set-Cookie: CLOUDERA_MANAGER_SESSIONID=3xyl1ut71idxca14zdverda7;Path=/;HttpOnly
< Allow: POST,GET,DELETE,PUT,OPTIONS,HEAD
< Content-Length: 0
< Date: Thu, 02 Feb 2017 17:11:31 GMT
< Server: Jetty(6.1.26.cloudera.4)
* Connection #0 to host x.x.x.x left intact
"message" : "Double-check the URL. Consider adding '\"Content-Type: application/json\"' to your HTTP headers if the URL expects JSON input."