- Home
- Resources
- ClustersResource
GET /clusters
Lists all known clusters.
Request Parameters
name |
type |
description |
default |
view |
query |
|
summary |
Response Body
media type |
data type |
description |
application/json |
ApiClusterList
(JSON) |
List of known clusters. |
GET /clusters
List all known clusters.
Request Parameters
name |
type |
description |
default |
clusterType |
query |
Type of cluster, either "any", "base" or "compute". Default is "base". |
base |
view |
query |
The view of the data to materialize, either "summary" or "full". |
summary |
Response Body
media type |
data type |
description |
application/json |
ApiClusterList
(JSON) |
List of clusters. |
POST /clusters
Creates a collection of clusters.
Request Body
media type |
data type |
description |
application/json |
ApiClusterList
(JSON) |
List of clusters to created. |
Response Body
media type |
data type |
description |
application/json |
ApiClusterList
(JSON) |
List of created clusters. |
DELETE /clusters/{clusterName}
Deletes a cluster.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
Name of cluster to delete. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCluster
(JSON) |
Details of deleted cluster. |
GET /clusters/{clusterName}
Reads information about a cluster.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
Name of cluster to look up. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCluster
(JSON) |
Details of requested cluster. |
PUT /clusters/{clusterName}
Update an existing cluster.
To update the CDH version, provide the new value in the "fullVersion"
property. Setting a correct version that matches the actual installed software
will ensure the correct version-specific features, such as services, roles,
commands, and configurations. This need not be manually set for clusters
using parcels. In general this action is only necessary after the CDH
packages have been manually updated. Note that a downgrade may be rejected
if it would render existing services or roles unusable. For major upgrade,
the "upgradeService" cluster command should be used instead.
To rename the cluster, provide the new name in the "displayName"
property for API >= 6, or in the "name" property for API <=5.
Available since API v2.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Request Body
media type |
data type |
application/json |
ApiCluster
(JSON) |
Response Body
media type |
data type |
description |
application/json |
ApiCluster
(JSON) |
Details of the affected cluster. |
PUT /clusters/{clusterName}/autoAssignRoles
Automatically assign roles to hosts and create the roles for all the services in a cluster.
Assignments are done based on services and hosts in the cluster, and hardware specifications.
If no hosts are added to the cluster, an exception will be thrown preventing any
role assignments.
Existing roles will be taken into account and their assignments will be
not be modified.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
GET /clusters/{clusterName}/clientConfig
Download a zip-compressed archive of the client configuration, of a
specific cluster. Currently, this only includes Kerberos Client
Configuration (krb5.conf). For client configuration of services, use the
clientConfig endpoint of the services resource. This resource does not
require any authentication.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The cluster name. |
n/a |
Response Body
media type |
data type |
description |
application/octet-stream |
(custom)
|
The archive data. |
GET /clusters/{clusterName}/commands
List active cluster commands.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
view |
query |
The view of the data to materialize,
either "summary" or "full". |
summary |
Response Body
media type |
data type |
description |
application/json |
ApiCommandList
(JSON) |
A list of active cluster commands. |
GET /clusters/{clusterName}/dfsServices
List the services that can provide distributed file system (DFS) capabilities in this cluster.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
cluster name |
n/a |
view |
query |
data view required for matching services |
summary |
Response Body
media type |
data type |
description |
application/json |
ApiServiceList
(JSON) |
Services that provide DFS capabilities in this cluster |
GET /clusters/{clusterName}/export
Export the cluster template for the given cluster. If cluster does not have
host templates defined it will export host templates based on roles
assignment.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
cluster name |
n/a |
exportAutoConfig |
query |
export configs set by the auto configuration |
false |
Response Body
media type |
data type |
description |
application/json |
ApiClusterTemplate
(JSON) |
Cluster template |
DELETE /clusters/{clusterName}/hosts
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiHostRefList
(JSON) |
all the hosts that were unassociated with the cluster |
GET /clusters/{clusterName}/hosts
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiHostRefList
(JSON) |
the hosts associated with the cluster |
POST /clusters/{clusterName}/hosts
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
Request Body
media type |
data type |
application/json |
ApiHostRefList
(JSON) |
Response Body
media type |
data type |
description |
application/json |
ApiHostRefList
(JSON) |
the newly added hosts to the cluster.
if a host is already a member,
it will be excluded from the list |
GET /clusters/{clusterName}/kerberosInfo
Provides Cluster Kerberos information
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The cluster name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiKerberosInfo
(JSON) |
Cluster Kerberos information |
GET /clusters/{clusterName}/serviceTypes
List the supported service types for a cluster.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The cluster. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiServiceTypeList
(JSON) |
List of service types the cluster supports. |
GET /clusters/{clusterName}/utilization
Provides the resource utilization of the entire cluster as well as the
resource utilization per tenant. Only available with Cloudera Manager Enterprise Edition.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
cluster name |
n/a |
daysOfWeek |
query |
The days of the week for which the user wants to report utilization.
Days is a list of number between 1 to 7, where 1 corresponds to Monday,
and 7 corrensponds to Sunday. All 7 days are included if this is not specified. |
n/a |
endHourOfDay |
query |
The end hour of a day for which the user wants to report utilization.
The hour is a number between [0-23]. Default value is 23 if this is not specified. |
23 |
from |
query |
Start of the time range to report utilization in ISO 8601 format. |
n/a |
startHourOfDay |
query |
The start hour of a day for which the user wants to report utilization.
The hour is a number between [0-23]. Default value is 0 if this is not specified. |
0 |
tenantType |
query |
The type of the tenant (POOL or USER). |
POOL |
to |
query |
End of the the time range to report utilization in ISO 8601 format (defaults to now). |
now |
Response Body
media type |
data type |
description |
application/json |
ApiClusterUtilization
(JSON) |
Cluster utilization report resource handler. |
POST /clusters/{clusterName}/commands/configureAutoTlsServices
Configures all services in a cluster to use Auto-TLS
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/configureForKerberos
Command to configure the cluster to use Kerberos for authentication.
This command will configure all relevant services on a cluster for
Kerberos usage. This command will trigger a GenerateCredentials command
to create Kerberos keytabs for all roles in the cluster.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/deleteCredentials
Delete existing Kerberos credentials for the cluster.
This command will affect all services that have been configured to use
Kerberos, and have existing credentials.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
cluster name |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/deployClientConfig
Deploy the cluster-wide client configuration.
For each service in the cluster, deploy the service's client configuration
to all the hosts that the service runs on.
Available since API v2.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/deployClusterClientConfig
Deploy the Cluster's Kerberos client configuration.
Deploy krb5.conf to hosts in a cluster. Does not deploy to decommissioned
hosts or hosts with active processes.
Available since API v7.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiHostRefList
(JSON) |
Hosts in cluster to deploy to. If empty, will target all eligible
hosts in the cluster. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/enterMaintenanceMode
Put the cluster into maintenance mode. This is a synchronous command.
The result is known immediately upon return.
Available since API v2.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Synchronous command result. |
POST /clusters/{clusterName}/commands/exitMaintenanceMode
Take the cluster out of maintenance mode. This is a synchronous command.
The result is known immediately upon return.
Available since API v2.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Synchronous command result. |
POST /clusters/{clusterName}/commands/expireLogs
Remove backup and disaster related log files in hdfs.
Available since API v31.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster |
n/a |
days |
query |
logs more than these many days old are purged. -2 to use the existing setting |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/firstRun
Prepare and start services in a cluster.
Perform all the steps needed to prepare each service in a cluster and start the services
in order.
Available since API v7.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/inspectHosts
Runs the host inspector on the configured hosts in the specified cluster.
Available since V8.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/perfInspector
Run cluster performance diagnostics test.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiClusterPerfInspectorArgs
(JSON) |
Optional arguments for the command. See ApiClusterPerfInspectorArgs. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/poolsRefresh
Updates all refreshable configuration files for services with
Dynamic Resource Pools.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/preUpgradeCheck
Run cluster pre-upgrade check(s) when upgrading from
specified version of CDH to the other.
Allows the following upgrade checks:
- Minor upgrades from any CDH 5 to any CDH 5
- Major upgrades from any CDH 5 to any CDH 6
- Minor upgrades from any CDH 6 to any CDH 6
- Maintenance upgrades or downgrades (a.b.x to a.b.y)
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiCdhUpgradeArgs
(JSON) |
Arguments for the command. See ApiCdhUpgradeArgs. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/refresh
Updates all refreshable configuration files in the cluster. Will not
restart any roles.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/restart
Restart all services in the cluster.
Services are restarted in the appropriate order given their dependencies.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/restart
Restart all services in the cluster.
Services are stopped then started in the appropriate order given their
dependencies. The command can optionally restart only stale services and
their dependencies as well as redeploy client configuration on all services
in the cluster.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiRestartClusterArgs
(JSON) |
arguments for the restart command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/rollingRestart
Command to do a "best-effort" rolling restart of the given cluster,
i.e. it does plain restart of services that cannot be rolling restarted,
followed by first rolling restarting non-slaves and then rolling restarting
the slave roles of services that can be rolling restarted. The slave restarts
are done host-by-host.
Available since API v4. Only available with Cloudera Manager Enterprise
Edition.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiRollingRestartClusterArgs
(JSON) |
Arguments for the rolling restart command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/rollingUpgrade
Command to do a rolling upgrade of specific services in the given cluster
This command does not handle any services that don't support rolling
upgrades. The command will throw an error and not start if upgrade of any
such service is requested.
This command does not upgrade the full CDH Cluster. You should normally
use the upgradeCDH Command for upgrading the cluster. This is primarily
helpful if you need to need to recover from an upgrade failure or for
advanced users to script an alternative to the upgradeCdhCommand.
This command expects the binaries to be available on hosts and activated.
It does not change any binaries on the hosts.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/start
Start all services in the cluster.
Services are started in the appropriate order given their dependencies.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/stop
Stop all services in the cluster.
Services are stopped in the appropriate order given their dependencies.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/upgradeCdh
Perform CDH upgrade to the specified version.
Allows the following upgrades:
- Major upgrades from any CDH 4 to any CDH 5
- Minor upgrades from any CDH 5 to any CDH 5
- Maintenance upgrades or downgrades (a.b.x to a.b.y)
If using packages, CDH packages on all hosts of the cluster must be
manually upgraded before this command is issued.
The command will upgrade the services and their configuration to the
version available in the CDH5 distribution.
Unless rolling upgrade options are provided, the entire cluster will
experience downtime. If rolling upgrade options are provided, command will
do a "best-effort" rolling upgrade of the given cluster, i.e. it does
plain upgrade of services that cannot be rolling upgraded, followed by
first rolling upgrading non-slaves and then rolling restarting the slave
roles of services that can be rolling restarted. The slave restarts are
done host-by-host.
Available since v9. Rolling upgrade is only available with Cloudera
Manager Enterprise Edition. A more limited upgrade variant available since
v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiCdhUpgradeArgs
(JSON) |
Arguments for the command. See ApiCdhUpgradeArgs. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/commands/upgradeServices
This method has been deprecated. This endpoint should not used in Cloudera Manager 5 or later.
Use the upgradeCdh endpoint on the cluster instead.
Upgrades the services in the cluster to the CDH5 version.
This command requires that the CDH packages in the hosts used by the
cluster be upgraded to CDH5 before this command is issued. Once issued,
this command will stop all running services before proceeding.
If parcels are used instead of CDH system packages then the following
steps need to happen in order:
- Stop all services manually
- Activate parcel
- Run this upgrade command
The command will upgrade the services and their configuration to the
version available in the CDH5 distribution.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
The name of the cluster. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
DELETE /clusters/{clusterName}/hosts/{hostId}
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
hostId |
path |
|
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiHostRef
(JSON) |
the host that was unassociated with the cluster.
if the host is not part of the cluster, return null |