/cm/commands/hostsOfflineOrDecommission

Mount Point: /api/v17/cm/commands/hostsOfflineOrDecommission

POST

Decommission the given hosts. All slave roles on the hosts will be offlined or decommissioned with preference being offlined if supported by the service.

Currently the offline operation is only supported by HDFS, where the offline operation will put DataNodes into HDFS IN MAINTENANCE state which prevents unnecessary re-replication which could occur if decommissioned.

All other roles on the hosts will be stopped.

The offlineTimeout parameter is used to specify a timeout for offline. For HDFS, when the timeout expires, the DataNode will automatically transition out of HDFS IN MAINTENANCE state, back to HDFS IN SERVICE state.

Parameters

name description type default
offlineTimeout offline timeout in seconds. Specify as null to get the default timeout (4 hours). Ignored if service does not support he offline operation. query

Request Body

element: hostNames

list of host names to decommission.

Response Body

element: command

Information about the submitted command.