- Home
- Resources
- ServicesResource
GET /clusters/{clusterName}/services
Lists all services registered in the cluster.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
view |
query |
|
summary |
Response Body
media type |
data type |
description |
application/json |
ApiServiceList
(JSON) |
List of services. |
POST /clusters/{clusterName}/services
Creates a list of services.
There are typically two service creation strategies:
-
The caller may choose to set up a new service piecemeal, by first
creating the service itself (without any roles or configuration),
and then create the roles, and then specify configuration.
-
Alternatively, the caller can pack
all the information in one call, by fully specifying the fields in
the ApiService object, with
- service config and role type config, and
- role to host assignment.
Cluster Version |
Available Service Types |
CDH4 |
HDFS, MAPREDUCE, HBASE, OOZIE, ZOOKEEPER, HUE, YARN, IMPALA, FLUME, HIVE, SOLR, SQOOP, KS_INDEXER |
CDH5 |
HDFS, MAPREDUCE, HBASE, OOZIE, ZOOKEEPER, HUE, YARN, IMPALA,
FLUME, HIVE, SOLR, SQOOP, KS_INDEXER, SQOOP_CLIENT, SENTRY,
ACCUMULO16, KMS, SPARK_ON_YARN, KAFKA
|
As of V6, GET /{clusterName}/serviceTypes should be used to get
the service types available to the cluster.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiServiceList
(JSON) |
Details of the services to create. |
Response Body
media type |
data type |
description |
application/json |
ApiServiceList
(JSON) |
List of created services. |
DELETE /clusters/{clusterName}/services/{serviceName}
Deletes a service from the system.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The name of the service to delete. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiService
(JSON) |
The details of the deleted service. |
GET /clusters/{clusterName}/services/{serviceName}
Retrieves details information about a service.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiService
(JSON) |
The details of the service. |
GET /clusters/{clusterName}/services/{serviceName}
Retrieves details information about a service.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service name. |
n/a |
view |
query |
DataView to materialize. Defaults to 'full'. |
full |
Response Body
media type |
data type |
description |
application/json |
ApiService
(JSON) |
The details of the service. |
PUT /clusters/{clusterName}/services/{serviceName}
Updates service information.
This method will update only writable fields of the service information.
Currently this only includes the service display name.
Available since API v3.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiService
(JSON) |
Updated service information. |
Response Body
media type |
data type |
description |
application/json |
ApiService
(JSON) |
The updated service information. |
GET /clusters/{clusterName}/services/{serviceName}/clientConfig
Download a zip-compressed archive of the client configuration,
of a specific service. This resource does not require any authentication.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service name. |
n/a |
Response Body
media type |
data type |
description |
application/octet-stream |
object
|
The archive data. |
GET /clusters/{clusterName}/services/{serviceName}/commands
List active service commands.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service to which the role belongs. |
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 service commands. |
GET /clusters/{clusterName}/services/{serviceName}/commands
List active service commands.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service to which the role belongs. |
n/a |
commandName |
query |
the command name, unique for the command class HdfsCreateSnapshotCommand#COMMAND_NAME |
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 service commands. |
GET /clusters/{clusterName}/services/{serviceName}/commandsByName
Lists all the commands (for CSD based services only) that can be executed by name
on the provided service.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommandMetadataList
(JSON) |
a list of command metadata objects. |
GET /clusters/{clusterName}/services/{serviceName}/config
Retrieves the configuration of a specific service.
The "summary" view contains only the configured parameters, and
configuration for role types that contain configured parameters.
The "full" view contains all available configuration parameters for
the service and its role types.
This mode performs validation on the configuration, which could take
a few seconds on a large cluster (around 500 nodes or more).
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service to query. |
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 |
ApiServiceConfig
(JSON) |
List of service and role types configuration parameters. |
PUT /clusters/{clusterName}/services/{serviceName}/config
Updates the service configuration with the given values.
If a value is set in the given configuration, it will be added
to the service's configuration, replacing any existing entries.
If a value is unset (its value is null), the existing
configuration for the attribute will be erased, if any.
Attributes that are not listed in the input will maintain their
current values in the configuration.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service to modify. |
n/a |
message |
query |
Optional message describing the changes. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiServiceConfig
(JSON) |
Configuration changes. |
Response Body
media type |
data type |
description |
application/json |
ApiServiceConfig
(JSON) |
The new service configuration. |
GET /clusters/{clusterName}/services/{serviceName}/impalaUtilization
Provides the resource utilization of the Impala service as well as the
resource utilization per tenant. Only available with Cloudera Manager Enterprise Edition.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
service 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 Mon. and 7 corresponds to Sun.
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 |
ApiImpalaUtilization
(JSON) |
utilization report of Impala service. |
GET /clusters/{clusterName}/services/{serviceName}/metrics
This method has been deprecated. This endpoint is not supported as of v6. Use the timeseries API
instead. To get all metrics for a service with the timeseries API use
the query:
'select * where serviceName = $SERVICE_NAME'.
To get specific metrics for a service use a comma-separated list of
the metric names as follows:
'select $METRIC_NAME1, $METRIC_NAME2 where serviceName = $SERVICE_NAME'.
For more information see the
tsquery language documentation.
Fetch metric readings for a particular service.
By default, this call will look up all metrics available for the service.
If only specific metrics are desired, use the metrics parameter.
By default, the returned results correspond to a 5 minute window based on
the provided end time (which defaults to the current server time). The
from and to parameters can be used to control the window
being queried. A maximum window of 3 hours is enforced.
When requesting a "full" view, aside from the extended properties of the
returned metric data, the collection will also contain information about
all metrics available for the service, even if no readings are available
in the requested window.
HDFS services that have more than one nameservice will not expose
any metrics. Instead, the nameservices should be queried separately.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The name of the service. |
n/a |
from |
query |
Start of the period to query. |
n/a |
metrics |
query |
Filter for which metrics to query. |
n/a |
to |
query |
End of the period to query. |
now |
view |
query |
The view of the data to materialize,
either "summary" or "full". |
summary |
Response Body
media type |
data type |
description |
application/json |
ApiMetricList
(JSON) |
List of readings from the monitors. |
GET /clusters/{clusterName}/services/{serviceName}/roleTypes
List the supported role types for a service.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service to modify. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiRoleTypeList
(JSON) |
List of role types the service supports. |
GET /clusters/{clusterName}/services/{serviceName}/yarnUtilization
Provides the resource utilization of the yarn service as well as the
resource utilization per tenant. Only available with Cloudera Manager Enterprise Edition.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
service 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 Mon. and 7 corresponds to Sun.
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 |
ApiYarnUtilization
(JSON) |
utilization report of yarn service. |
POST /clusters/{clusterName}/services/{serviceName}/commands/copyHdfsFile
Copies source HDFS file to destination cluster HDFS
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The source HDFS service |
n/a |
destinationPath |
query |
HDFS full path at destination |
n/a |
sourcePath |
query |
HDFS full path at source |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiServiceRef
(JSON) |
ApiServiceRef for the destination |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
|
POST /clusters/{clusterName}/services/{serviceName}/commands/createHdfsFile
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name |
n/a |
overwrite |
query |
If true overwrite the file |
false |
path |
query |
full path to the HDFS file to be created |
n/a |
Request Body
media type |
data type |
description |
application/json |
string
(JSON) |
Content to be put in the file to be created |
Response Body
media type |
data type |
description |
application/json |
string
(JSON) |
"CREATED" or "FILE_EXISTS" will be returned |
POST /clusters/{clusterName}/services/{serviceName}/commands/createOozieDb
Creates the Oozie Database Schema in the configured database.
This command does not create database. This command creates only tables
required by Oozie. To create database, please refer to oozieCreateEmbeddedDatabase()
Available since API v2.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Oozie service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/createSolrHdfsHomeDir
Creates the home directory of a Solr service in HDFS.
Available since API v4.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Solr service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/createSqoopUserDir
Creates the user directory of a Sqoop service in HDFS.
Available since API v4.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Sqoop service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/decommission
Decommission roles of a service.
For HBase services, the list should contain names of RegionServers to
decommission.
For HDFS services, the list should contain names of DataNodes to
decommission.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HBase service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiRoleNameList
(JSON) |
List of role names to decommision. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
DELETE /clusters/{clusterName}/services/{serviceName}/commands/deleteHdfsPath
Deletes the file or directory, specified by the given path, on the given HDFS service.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name |
n/a |
path |
query |
path of the file or directory to be deleted |
n/a |
recursive |
query |
If the path is a directory and this is set to true,
then deletes the directory and its contents,
otherwise the call will fail if the directory is not empty |
n/a |
Response Body
media type |
data type |
description |
application/json |
DeleteHdfsPathResult
(JSON) |
DeleteHdfsPathResult |
POST /clusters/{clusterName}/services/{serviceName}/commands/deployClientConfig
Deploy a service's client configuration.
The client configuration is deployed to the hosts where the given roles
are running.
Added in v3: passing null for the role name list will deploy client configs
to all known service roles.
Added in v6: passing an empty role name list will deploy client configs
to all known service roles.
In Cloudera Manager 5.3 and newer, client configurations are fully managed,
meaning that the server maintains state about which client configurations
should exist and be managed by alternatives, and the agents actively
rectify their hosts with this state. Consequently, if this API call is made
with a specific set of roles, Cloudera Manager will deactivate, from
alternatives, any deployed client configs from any non-gateway roles that
are
not specified as arguments. Gateway roles are always preserved,
and calling this API with an empty or null argument continues to deploy to
all roles.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiRoleNameList
(JSON) |
List of role names. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/disableJtHa
Disable high availability (HA) for JobTracker.
As part of disabling HA, any services that depend on the MapReduce service
being modified will be stopped. The command arguments provide options to
specify name of JobTracker that will be preserved. The Command will
redeploy the client configurations for services of the cluster after HA
has been disabled.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The MapReduce service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiDisableJtHaArguments
(JSON) |
Arguments for the command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/disableRmHa
Disable high availability (HA) for ResourceManager.
As part of disabling HA, any services that depend on the YARN service
being modified will be stopped. The command arguments provide options to
specify name of ResourceManager that will be preserved. The command will
redeploy the client configurations for services of the cluster after HA
has been disabled.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The YARN service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiDisableRmHaArguments
(JSON) |
Arguments for the command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/disableSentryHa
Disable high availability (HA) for Sentry service.
This command only applies to CDH 5.13+ Sentry services.
The command will keep exactly one Sentry server, on the specified host,
and update the ZooKeeper configs needed for Sentry.
All services that depend on HDFS will be restarted after enabling Sentry HA.
Note: Sentry doesn't support Rolling Restart.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
A String representing the Sentry service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiDisableSentryHaArgs
(JSON) |
An instance of ApiDisableSentryHaArgs
representing the arguments to the command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
the created command instance |
POST /clusters/{clusterName}/services/{serviceName}/commands/enableJtHa
Enable high availability (HA) for a JobTracker.
This command only applies to CDH4 MapReduce services.
The command will create a new JobTracker on the specified host and then
create an active/standby pair with the existing JobTracker. Autofailover
will be enabled using ZooKeeper. A ZNode will be created for this purpose.
Command arguments provide option to forcefully create this ZNode if one
already exists. A node may already exists if JobTracker was previously
enabled in HA mode but HA mode was disabled later on. The ZNode is not
deleted when HA is disabled.
As part of enabling HA, any services that depends on the MapReduce service
being modified will be stopped. Command will redeploy the client
configurations for services of the cluster after HA has been enabled.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The MapReduce service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiEnableJtHaArguments
(JSON) |
Arguments for the command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/enableRmHa
Enable high availability (HA) for a YARN ResourceManager.
This command only applies to CDH5+ YARN services.
The command will create a new ResourceManager on the specified host and then
create an active/standby pair with the existing ResourceManager. Autofailover
will be enabled using ZooKeeper.
As part of enabling HA, any services that depends on the YARN service
being modified will be stopped. Command will redeploy the client
configurations for services of the cluster after HA has been enabled.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The YARN service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiEnableRmHaArguments
(JSON) |
Arguments for the command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/enableSentryHa
Enable high availability (HA) for Sentry service.
This command only applies to CDH 5.13+ Sentry services.
The command will create a new Sentry server on the specified host
and set the ZooKeeper configs needed for Sentry HA.
As part of enabling HA, all services that depend on HDFS will be
restarted after enabling Sentry HA.
Note: Sentry doesn't support Rolling Restart.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
A String representing the Sentry service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiEnableSentryHaArgs
(JSON) |
An instance of ApiEnableSentryHaArgs
representing the arguments to the command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
the created command instance |
POST /clusters/{clusterName}/services/{serviceName}/commands/enterMaintenanceMode
Put the service 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 |
|
n/a |
serviceName |
path |
The service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Synchronous command result. |
POST /clusters/{clusterName}/services/{serviceName}/commands/exitMaintenanceMode
Take the service 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 |
|
n/a |
serviceName |
path |
The service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Synchronous command result. |
POST /clusters/{clusterName}/services/{serviceName}/commands/exportSentryPermissions
Export Sentry Permissions.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/firstRun
Prepare and start a service.
Perform all the steps needed to prepare the service and start it.
Available since API v7.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The name of the cluster. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
GET /clusters/{clusterName}/services/{serviceName}/commands/getPoliciesFromRanger
Collects information about the policies defined in the local Ranger service.
Optionally if sourcePeer, sourceCluster, sourceUser are provided, then it will call
the same API endpoint on that given source CM peer, and merges the result of
the local (ApiRangerPolicyList#getPolicies()) and
remote (ApiRangerPolicyList#getPolicies()) Ranger policies.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
the name of the local Ranger service. |
n/a |
sourceCluster |
query |
optional: the source CM cluster name. |
n/a |
sourcePeer |
query |
optional: the source CM peer name. |
n/a |
sourceService |
query |
optional: the Ranger service name on the source CM. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiRangerPolicyList
(JSON) |
A list of the local Ranger policies
(ApiRangerPolicyList#getPolicies()),
and optionally the same kind of list from the source CM
(ApiRangerPolicyList#getPolicies()). |
GET /clusters/{clusterName}/services/{serviceName}/commands/getServicesFromRanger
Collects information about the services defined in the local Ranger service.
Optionally if sourcePeer, sourceCluster, sourceService are provided, then it will call
the same API endpoint on that given source CM peer, and merges the result of
the local (ApiRangerServiceList#getServices()) and
remote (ApiRangerServiceList#getRemoteServices()) Ranger services.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
the name of the local Ranger service. |
n/a |
sourceCluster |
query |
optional: the source CM cluster name. |
n/a |
sourcePeer |
query |
optional: the source CM peer name. |
n/a |
sourceService |
query |
optional: the Ranger service name on the source CM. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiRangerServiceList
(JSON) |
A list of the local Ranger services
(ApiRangerServiceList#getServices()),
and optionally the same kind of list from the source CM
(ApiRangerServiceList#getRemoteServices()). |
GET /clusters/{clusterName}/services/{serviceName}/commands/getUsersFromRanger
Collects information about the users defined in the local Ranger service.
Optionally if sourcePeer, sourceCluster, sourceUser are provided, then it will call
the same API endpoint on that given source CM peer, and merges the result of
the local (ApiRangerUserList#getUsers()) and
remote (ApiRangerUserList#getRemoteUsers()) Ranger users.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
the name of the local Ranger service. |
n/a |
sourceCluster |
query |
optional: the source CM cluster name. |
n/a |
sourcePeer |
query |
optional: the source CM peer name. |
n/a |
sourceService |
query |
optional: the Ranger service name on the source CM. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiRangerUserList
(JSON) |
A list of the local Ranger users
(ApiRangerUserList#getUsers()),
and optionally the same kind of list from the source CM
(ApiRangerUserList#getRemoteUsers()). |
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseCreateRoot
Creates the root directory of an HBase service.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HBase service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseCreateUserDirectory
Create the HBase user directory (usually /user/hbase).
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The local HBase service name |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
|
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupAutomatic
Starts an automatic HBase replication first time setup. After doing some configuration
(see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)),
it restarts both the source and target clusters.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The local HBase service name |
n/a |
force |
query |
If true, perform setup even if already setup. (Default false) |
false |
Request Body
media type |
data type |
description |
application/json |
ApiHBaseReplicationSetupCommandArgs
(JSON) |
Replication setup parameters such as
the source peer, source service, passphrase for the keystore, and
optionally the RestartType
for both source and target (default is rolling restart) |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Contains the command ID that executes the request |
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupCleanAndReset
Cleans and resets the HBase replication first time setup on the given source and target:
-
clears the HBase replication auxiliary info and deletes the JCEKS files
-
Optionally restarts HBase services
-
Resets the HBase replication first time setup status
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The local HBase service name |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiHBaseReplicationSetupCleanAndResetArgs
(JSON) |
contains the source peer, source cluster, source service, and
the restart type of source and target HBase services.
Also, if user wants to reset the HBase replication first time setup
status on the source, then the cmPeerNameOnRemote field should be provided:
The peer name of the local CM in the given source CM peer |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
|
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupForceReady
Force sets the HBase replication first time setup status to be READY for the given
source and target. Note that after this operation, the pending HBase replication
policies, which have the waitForHBaseReplicationSetup flag set to true,
will NOT be completed.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The local HBase service name |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiServiceRef
(JSON) |
contains the source peer, source cluster, source sourceService |
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupManual
Starts a manual HBase replication first time setup. After doing some configuration
(see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)),
it restarts the target cluster only. Source cluster has to be restarted manually,
after which the #hbaseReplicationFirstTimeSetupManualContinue(String, ApiServiceRef)
API endpoint should be called to finish the HBase replication first time setup.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The local HBase service name |
n/a |
force |
query |
If true, perform setup even if already setup. (Default false) |
false |
Request Body
media type |
data type |
description |
application/json |
ApiHBaseReplicationSetupCommandArgs
(JSON) |
Replication setup parameters such as
the source peer, source service, passphrase for the keystore, and
optionally the RestartType
for the target (default is rolling restart) |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Contains the command ID that executes the request |
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupManualContinue
Should be called after
#hbaseReplicationFirstTimeSetupManual(String, ApiHBaseReplicationSetupCommandArgs)
to finish the manual HBase replication first time setup.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The local HBase service name |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiServiceRef
(JSON) |
contains the source peer, source cluster, source service |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Contains the command ID that executes the request |
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupReset
Resets/removes the HBase replication first time setup status for the given
source and target.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The local HBase service name |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiServiceRef
(JSON) |
contains the source peer, source cluster, source sourceService |
GET /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupStatus
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The local HBase service name |
n/a |
sourceCluster |
query |
The source cluster's name |
n/a |
sourcePeer |
query |
The source peer's name |
n/a |
sourceService |
query |
The source service's name |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiHBaseReplicationSetupStatus
(JSON) |
Info about the HBase replication first time setup status |
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationSetup
Perform one time setup for HBase replication.
Generate the a keystore to HDFS for use by replication and transfer the
keystore to HDFS on the the peer.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service name. |
n/a |
force |
query |
If true, perform setup even if already setup. (Default false) |
false |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
|
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationSetupAdmin
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
|
n/a |
cmPeerDefinition |
query |
|
n/a |
op |
query |
|
n/a |
path |
query |
|
n/a |
user |
query |
|
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
|
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseShellCommand
Execute a hbase shell command
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HBase service name |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiHBaseShellCommand
(JSON) |
hbase shell command to be executed |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command's execution |
POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseUpgrade
Upgrade HBase data in HDFS and ZooKeeper as part of upgrade from CDH4 to CDH5.
This is required in order to run HBase after upgrade.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HBase service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsAddSBNNToNS
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
|
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
|
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsCreateTmpDir
Creates a tmp directory on the HDFS filesystem.
Available since API v2.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the HDFS service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsDisableAutoFailover
This method has been deprecated. This endpoint is not supported v6 onwards. Use hdfsDisableNnHa on the HDFS service instead.
Disable auto-failover for a highly available HDFS nameservice.
The command will modify the nameservice's NameNodes configuration to
disable automatic failover, and delete the existing failover controllers.
The ZooKeeper dependency of the service will not be removed.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
string
(JSON) |
The nameservice name. |
text/plain |
string
|
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsDisableHa
This method has been deprecated. This endpoint is not supported v6 onwards. Use hdfsDisableNnHa on the HDFS service instead.
Disable high availability (HA) for an HDFS NameNode.
The NameNode to be kept must be running before HA can be disabled.
As part of disabling HA, any services that depend on the HDFS service being
modified will be stopped. The command arguments provide options to
re-start these services and to re-deploy the client configurations for
services of the cluster after HA has been disabled.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsDisableNnHa
Disable High Availability (HA) with Automatic Failover for an HDFS NameNode.
As part of disabling HA, any services that depend on the HDFS service being
modified will be stopped. The command will delete the Standby NameNode
associated with the specified NameNode. Any FailoverControllers associated
with the NameNode's nameservice are also deleted. A SecondaryNameNode
is created on the host specified by the arugments.
If no nameservices uses Quorum Journal after HA is disabled for the specified
nameservice, then all JournalNodes are also deleted.
Then, HDFS service is restarted and all services that were stopped
are started again afterwards.
Finally, client configs for HDFS and its depedents will be re-deployed.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiDisableNnHaArguments
(JSON) |
Arguments for the command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsEnableAutoFailover
This method has been deprecated. This endpoint is not supported v6 onwards. Use hdfsEnableNnHa on the HDFS service instead.
Enable auto-failover for an HDFS nameservice.
This command requires that the nameservice exists, and HA has been
configured for that nameservice.
The command will create the needed failover controllers, perform the
needed initialization and configuration, and will start the new roles.
The existing NameNodes which are part of the nameservice will be
re-started in the process.
This process may require changing the service's configuration, to add a
dependency on the provided ZooKeeper service. This will be done if such a
dependency has not been configured yet, and will cause roles that are
not affected by this command to show an "outdated configuration" status.
If a ZooKeeper dependency has already been set up by some other means,
it does not need to be provided in the command arguments.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiHdfsFailoverArguments
(JSON) |
Arguments for the command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsEnableHa
This method has been deprecated. This endpoint is not supported v6 onwards. Use hdfsEnableNnHa on the HDFS service instead.
Enable high availability (HA) for an HDFS NameNode.
The command will set up the given "active" and "stand-by" NameNodes as
an HA pair. Both nodes need to already exist.
If there is a SecondaryNameNode associated with either given NameNode
instance, it will be deleted.
Note that while the shared edits path may be different for both nodes,
they need to point to the same underlying storage (e.g., an NFS share).
As part of enabling HA, any services that depend on the HDFS service being
modified will be stopped. The command arguments provide options to
re-start these services and to re-deploy the client configurations for
services of the cluster after HA has been enabled.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiHdfsHaArguments
(JSON) |
Arguments for the command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsEnableNnHa
Enable High Availability (HA) with Automatic Failover for an HDFS NameNode.
The command will create a Standby NameNode for the given nameservice
and create FailoverControllers for both Active and Standby NameNodes.
The SecondaryNameNode associated with the Active NameNode will be deleted.
The command will also create JournalNodes needed for HDFS HA if they
do not already exist.
As part of enabling HA, any services that depend on the HDFS service being
modified will be stopped. They will be restarted after HA has been enabled.
Finally, client configs for HDFS and its depedents will be re-deployed.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiEnableNnHaArguments
(JSON) |
Arguments for the command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsFailover
Initiate a failover in an HDFS HA NameNode pair.
The arguments should contain the names of the two NameNodes in
the HA pair. The first one should be the currently active NameNode,
the second one the NameNode to be made active.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name. |
n/a |
force |
query |
Whether to force failover. |
false |
Request Body
media type |
data type |
description |
application/json |
ApiRoleNameList
(JSON) |
Names of the NameNodes in the HA pair. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsFinalizeRollingUpgrade
Finalizes the rolling upgrade for HDFS by updating the NameNode
metadata permanently to the next version. Should be done after
doing a rolling upgrade to a CDH version >= 5.2.0.
Available since API v8.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsRollEdits
Roll the edits of an HDFS NameNode or Nameservice.
Available since API v3.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiRollEditsArgs
(JSON) |
Arguments to the Roll Edits command. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsUpgradeMetadata
Upgrade HDFS Metadata as part of a major version upgrade.
When doing a major version upgrade for HDFS, it is necessary to start HDFS
in a special mode where it will do any necessary upgrades of stored
metadata. Trying to start HDFS normally will result in an error message and
the NameNode(s) failing to start.
The metadata upgrade must eventually be finalized, using the
hdfsFinalizeMetadataUpgrade command on the NameNode.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hiveCreateHiveUserDir
Create the Hive user directory
Available since API v4.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Hive service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hiveCreateHiveWarehouse
Create the Hive warehouse directory, on Hive services.
Available since API v3.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Hive service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hiveCreateHiveWarehouseExternal
Create the Hive warehouse external directory for Private Cloud.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Hive service name. |
n/a |
directory |
query |
Name of the warehouse external directory. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hiveCreateMetastoreDatabase
Create the Hive Metastore Database. Only works with embedded postgresql
database.
This command is to be run whenever a new user and database needs to be
created in the embedded postgresql database for a Hive service. This
command should usually be followed by a call to
hiveCreateMetastoreDatabaseTables.
Available since API v4.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Hive service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/hiveCreateMetastoreDatabaseTables
Create the Hive Metastore Database tables.
This command is to be run whenever a new database has been specified. Will
do nothing if tables already exist. Will not perform an upgrade. Only
Available when all Hive Metastore Servers are stopped.
Available since API v3.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Hive service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/hiveUpdateMetastoreNamenodes
Update Hive Metastore to point to a NameNode's Nameservice name instead of
hostname.
Back up the Hive Metastore Database before running this command.
This command is to be run after enabling HDFS High Availability. Only
available when all Hive Metastore Servers are stopped.
Available since API v4.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Hive service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/hiveUpgradeMetastore
Upgrade Hive Metastore as part of a major version upgrade.
When doing a major version upgrade for Hive, it is necessary to upgrade
data in the metastore database.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Hive service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hiveValidateMetastoreSchema
Validate the Hive Metastore Schema.
This command checks the Hive metastore schema for any errors and corruptions.
This command is to be run on two instances:
After the Hive Metastore database tables are created.
Both before and after upgrading the Hive metastore database schema./li>
*
Available since API v17.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Hive service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hueCreateHiveWarehouse
This method has been deprecated. Use hiveCreateHiveWarehouse on the Hive service instead.
Deprecated since V4.
Create the Beeswax role's Hive warehouse directory, on Hue services.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Hue service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hueDumpDb
Runs Hue's dumpdata command.
Available since API v10.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The name of the service |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hueLoadDb
Runs Hue's loaddata command.
Available since API v10.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The name of the service |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/hueSyncDb
Runs Hue's syncdb command.
Available since API v10.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The name of the service |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/impalaCreateCatalogDatabase
Not needed in CM 5.0.0 Release, since Impala Catalog Database
is not yet available in CDH as of this release.
Create the Impala Catalog Database. Only works with embedded postgresql
database.
This command is to be run whenever a new user and database needs to be
created in the embedded postgresql database for the Impala Catalog Server.
This command should usually be followed by a call to
impalaCreateCatalogDatabaseTables.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Impala service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/impalaCreateCatalogDatabaseTables
Not needed in CM 5.0.0 Release, since Impala Catalog Database
is not yet available in CDH as of this release.
Create the Impala Catalog Database tables.
This command is to be run whenever a new database has been specified. Will
do nothing if tables already exist. Will not perform an upgrade. Only
available when all Impala Catalog Servers are stopped.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Impala service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/impalaCreateUserDir
Create the Impala user directory
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Impala service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/impalaDisableLlamaHa
This method has been deprecated.
Not Supported. Llama was removed.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
|
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
|
POST /clusters/{clusterName}/services/{serviceName}/commands/impalaDisableLlamaRm
This method has been deprecated.
Not Supported. Llama was removed.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
|
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
|
POST /clusters/{clusterName}/services/{serviceName}/commands/impalaEnableLlamaHa
This method has been deprecated.
Not Supported. Llama was removed.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
|
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
|
POST /clusters/{clusterName}/services/{serviceName}/commands/impalaEnableLlamaRm
This method has been deprecated.
Not Supported. Llama was removed.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
|
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
|
POST /clusters/{clusterName}/services/{serviceName}/commands/importMrConfigsIntoYarn
Import MapReduce configuration into Yarn, overwriting Yarn configuration.
You will lose existing Yarn configuration. Read all MapReduce
configuration, role assignments, and role configuration groups and update
Yarn with corresponding values. MR1 configuration will be converted into
the equivalent MR2 configuration.
Before running this command, Yarn must be stopped and MapReduce must exist
with valid configuration.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Yarn service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/initSolr
Initializes the Solr service in Zookeeper.
Available since API v4.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Solr service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/installMrFrameworkJars
Creates an HDFS directory to hold the MapReduce2 framework JARs
(if necessary), and uploads the framework JARs to it.
This command is run automatically when starting a YARN service for
the first time, or when upgrading an existing YARN service. It can
also be run manually to ensure that the latest version of the framework
JARS is installed.
Available since API v30.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the YARN service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/installOozieShareLib
Creates directory for Oozie user in HDFS and installs the ShareLib in it.
This command should be re-run after a major version upgrade to refresh the
ShareLib to the latest version.
Available since API v3.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Oozie service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/migrateToSentry
Migrates the HBase Indexer policy-based permissions to Sentry,
by invoking the SentryConfigToolIndexer.
Note:
KeyStore Indexer service should be in Stopped state.
This is only needed for upgrading to CDH6.0.
Available since API v30.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
A String representing the KeyStore Indexer service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
the created command instance |
POST /clusters/{clusterName}/services/{serviceName}/commands/offline
Offline roles of a service.
Currently the offline operation is only supported by HDFS.
For HDFS, the offline operation will put DataNodes into HDFS IN MAINTENANCE state which
prevents unnecessary re-replication which could occur if decommissioned.
The timeout 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.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service name. |
n/a |
timeout |
query |
Offline timeout in seconds. Offlined roles will automatically transition from offline
state to normal state after timeout.
Specify as null to get the default timeout (4 hours). |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiRoleNameList
(JSON) |
List of role names to offline. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/oozieCreateEmbeddedDatabase
Create the Oozie Server Database. Only works with embedded postgresql
database.
This command is to be run whenever a new user and database need to be
created in the embedded postgresql database for an Oozie service. This
command should usually be followed by a call to createOozieDb.
Available since API v10.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Oozie service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/oozieDisableHa
Disable high availability (HA) for Oozie.
As part of disabling HA, any services that depend on the Oozie service
being modified will be stopped. The command arguments provide options to
specify name of Oozie Server that will be preserved. After deleting,
other Oozie servers, all the services that were stopped are restarted.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Oozie service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/oozieDumpDatabase
Dump the Oozie Server Database.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The name of the service |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/oozieEnableHa
Enable high availability (HA) for Oozie service.
This command only applies to CDH5+ Oozie services.
The command will create new Oozie Servers on the specified hosts and
set the ZooKeeper and Load Balancer configs needed for Oozie HA.
As part of enabling HA, any services that depends on the Oozie service
being modified will be stopped and restarted after enabling Oozie HA.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Oozie service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/oozieLoadDatabase
Load the Oozie Server Database from dump.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The name of the service |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/oozieUpgradeDb
Upgrade Oozie Database schema as part of a major version upgrade.
When doing a major version upgrade for Oozie, it is necessary to upgrade
the schema of its database before Oozie can run successfully.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Oozie service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/recommission
Recommission roles of a service.
The list should contain names of slave roles to recommission.
Available since API v2.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the service on which to run the command. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiRoleNameList
(JSON) |
List of role names to recommision. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/recommissionWithStart
Start and recommission roles of a service.
The list should contain names of slave roles to start and recommission.
Warning: Evolving. This method may change in the future and does not offer standard compatibility guarantees.
Only support by HDFS.
Do not use without guidance from Cloudera.
Available since API v15.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the service on which to run the command. |
n/a |
Request Body
media type |
data type |
description |
application/json |
ApiRoleNameList
(JSON) |
List of role names to recommision. |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/restart
Restart the service.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service to start. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/rollingRestart
Command to run rolling restart of roles in a service. The sequence is:
- Restart all the non-slave roles
- If slaves are present restart them in batches of size specified in RollingRestartCmdArgs
- Perform any post-command needed after rolling restart
Available since API v3. Only available with Cloudera Manager Enterprise
Edition.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
|
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
|
POST /clusters/{clusterName}/services/{serviceName}/commands/sentryCreateDatabase
Create the Sentry Server Database. Only works with embedded postgresql
database.
This command is to be run whenever a new user and database need to be
created in the embedded postgresql database for a Sentry service. This
command should usually be followed by a call to sentryCreateDatabaseTables.
Available since API v7.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Sentry service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/sentryCreateDatabaseTables
Create the Sentry Server Database tables.
This command is to be run whenever a new database has been specified. Will
do nothing if tables already exist. Will not perform an upgrade. Only
Available when Sentry Server is stopped.
Available since API v7.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Sentry service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/sentryUpgradeDatabaseTables
Upgrade the Sentry Server Database tables.
This command is to be run whenever Sentry requires an upgrade to its
database tables.
Available since API v8.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Sentry service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/solrBootstrapCollections
Bootstraps Solr Collections after the CDH upgrade.
Note: This is only needed for upgrading to CDH6.0.
Available since API v30.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
A String representing the Solr service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
the created command instance |
POST /clusters/{clusterName}/services/{serviceName}/commands/solrBootstrapConfig
Bootstraps Solr config during the CDH upgrade.
Note: This is only needed for upgrading to CDH6.0.
Available since API v30.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
A String representing the Solr service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
the created command instance |
POST /clusters/{clusterName}/services/{serviceName}/commands/solrConfigBackup
Backs up Solr configuration metadata before CDH upgrade.
Note:
Solr service should be in Stopped state.
HDFS and Zookeeper services should in Running state.
This is only needed for upgrading to CDH6.0.
Available since API v30.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
A String representing the Solr service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
the created command instance |
POST /clusters/{clusterName}/services/{serviceName}/commands/solrMigrateSentryPrivilegesCommand
Migrates Sentry privileges to new model compatible to support
more granular permissions if Solr is configured with a
Sentry service.
Note:
Solr service should be in Stopped state.
HDFS, Zookeeper, and Sentry services should in Running state.
This is only needed for upgrading to CDH6.0.
Available since API v30.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
A String representing the Solr service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
the created command instance |
POST /clusters/{clusterName}/services/{serviceName}/commands/solrReinitializeStateForUpgrade
Reinitializes the Solr state by clearing the Solr HDFS
data directory, the Solr data directory, and the Zookeeper
state.
Note:
Solr service should be in Stopped state.
HDFS and Zookeeper services should in Running state.
This is only needed for upgrading to CDH6.0.
Available since API v30.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
A String representing the Solr service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
the created command instance |
POST /clusters/{clusterName}/services/{serviceName}/commands/solrValidateMetadata
Validates Solr metadata and configurations.
Note: This is only needed for upgrading to CDH6.0.
Available since API v30.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
A String representing the Solr service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
the created command instance |
POST /clusters/{clusterName}/services/{serviceName}/commands/sqoopCreateDatabaseTables
Create the Sqoop2 Server Database tables.
This command is to be run whenever a new database has been specified. Will
do nothing if tables already exist. Will not perform an upgrade. Only
available when Sqoop2 Server is stopped.
Available since API v10.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Sentry service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/sqoopUpgradeDb
Upgrade Sqoop Database schema as part of a major version upgrade.
When doing a major version upgrade for Sqoop, it is necessary to upgrade
the schema of its database before Sqoop can run successfully.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The Sqoop service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/start
Start the service.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service to start. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/stop
Stop the service.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service to stop. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/switchToMr2
Change the cluster to use MR2 instead of MR1. Services will be restarted.
Will perform the following steps:
- Update all services that depend on MapReduce to instead depend on Yarn.
- Stop MapReduce
- Start Yarn (MR2 Included)
- Deploy Yarn (MR2) Client Configuration
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the Yarn service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/yarnApplicationDiagnosticsCollection
Collect the Diagnostics data for Yarn applications
Available since API v8.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
Name of the YARN service on which to run the command. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command |
POST /clusters/{clusterName}/services/{serviceName}/commands/yarnCreateCmContainerUsageInputDirCommand
Creates the HDFS directory where YARN container usage metrics are
stored by NodeManagers for CM to read and aggregate into app usage metrics.
Available since API v13.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The YARN service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/yarnCreateJobHistoryDirCommand
Create the Yarn job history directory
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The YARN service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/yarnFormatStateStore
Formats the state store in ZooKeeper used for Resource Manager
High Availability. Typically used while moving from non-secure
to secure cluster or vice-versa.
Available since API v8.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The YARN service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/yarnNodeManagerRemoteAppLogDirCommand
Create the Yarn NodeManager remote application log directory
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The YARN service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/zooKeeperCleanup
Clean up all running server instances of a ZooKeeper service.
This command removes snapshots and transaction log files kept by
ZooKeeper for backup purposes. Refer to the ZooKeeper documentation
for more details.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service to start. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/zooKeeperInit
Initializes all the server instances of a ZooKeeper service.
ZooKeeper server roles need to be initialized before they
can be used.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The service to start. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
POST /clusters/{clusterName}/services/{serviceName}/commands/{commandName}
Executes a command on the service specified
by name.
Available since API v6.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
commandName |
path |
The command name. |
n/a |
serviceName |
path |
The service name. |
n/a |
Response Body
media type |
data type |
description |
application/json |
ApiCommand
(JSON) |
Information about the submitted command. |
GET /clusters/{clusterName}/services/{serviceName}/reports/hdfsUsageReport
Fetch the HDFS usage report. For the requested time range, at the
specified aggregation intervals, the report shows HDFS disk usages
per user.
This call supports returning JSON or CSV, as determined by the
"Accept" header of application/json or text/csv.
Available since API v4. Only available with Cloudera Manager Enterprise
Edition.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The HDFS service name. |
n/a |
aggregation |
query |
The (optional) aggregation period for the data.
Supports "hourly", "daily" (default) and "weekly". |
daily |
from |
query |
The (optional) start time of the report in ISO 8601 format (
defaults to 24 hours before "to" time). |
n/a |
nameservice |
query |
The (optional) HDFS nameservice. Required for HA setup. |
n/a |
to |
query |
The (optional) end time of the report in ISO 8601 format (
defaults to now). |
now |
Response Body
media type |
data type |
description |
application/json |
ApiHdfsUsageReport
(JSON) |
Report data. |
text/csv |
object
|
GET /clusters/{clusterName}/services/{serviceName}/reports/mrUsageReport
Fetch the MR usage report. For the requested time range, at the
specified aggregation intervals, the report shows job CPU usages (and other
metrics) per user.
This call supports returning JSON or CSV, as determined by the
"Accept" header of application/json or text/csv.
Available since API v4. Only available with Cloudera Manager Enterprise
Edition.
Request Parameters
name |
type |
description |
default |
clusterName |
path |
|
n/a |
serviceName |
path |
The MR service name. |
n/a |
aggregation |
query |
The (optional) aggregation period for the data.
Supports "hourly", "daily" (default) and "weekly". |
daily |
from |
query |
The (optional) start time of the report in ISO 8601 format
(defaults to 24 hours before "to" time). |
n/a |
to |
query |
The (optional) end time of the report in ISO 8601 format (defaults
to now). |
now |
Response Body
media type |
data type |
description |
application/json |
ApiMrUsageReport
(JSON) |
Report data. |
text/csv |
object
|