public interface ServicesResource
Modifier and Type | Method and Description |
---|---|
ApiCommand |
createBeeswaxWarehouseCommand(String serviceName)
Deprecated.
Use hiveCreateHiveWarehouse on the Hive service instead.
Deprecated since V4.
|
ApiCommand |
createHBaseRootCommand(String serviceName)
Creates the root directory of an HBase service.
|
ApiServiceList |
createServices(ApiServiceList services)
Creates a list of services.
|
ApiCommand |
decommissionCommand(String serviceName,
ApiRoleNameList roleNames)
Decommission roles of a service.
|
ApiService |
deleteService(String serviceName)
Deletes a service from the system.
|
ApiCommand |
deployClientConfigCommand(String serviceName,
ApiRoleNameList roleNames)
Deploy a service's client configuration.
|
ActivitiesResource |
getActivitiesResource(String serviceName)
Return the activities resource handler.
|
ApiMetricList |
getMetrics(String serviceName,
String from,
String to,
List<String> metrics,
DataView dataView)
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. |
NameservicesResource |
getNameservicesResource(String serviceName) |
RoleCommandsResource |
getRoleCommandsResource(String serviceName) |
RolesResource |
getRolesResource(String serviceName) |
ApiCommand |
hdfsDisableAutoFailoverCommand(String serviceName,
String nameservice)
Deprecated.
This endpoint is not supported v6 onwards. Use hdfsDisableNnHa on the HDFS service instead.
|
ApiCommand |
hdfsDisableHaCommand(String serviceName,
ApiHdfsDisableHaArguments args)
Deprecated.
This endpoint is not supported v6 onwards. Use hdfsDisableNnHa on the HDFS service instead.
|
ApiCommand |
hdfsEnableAutoFailoverCommand(String serviceName,
ApiHdfsFailoverArguments args)
Deprecated.
This endpoint is not supported v6 onwards. Use hdfsEnableNnHa on the HDFS service instead.
|
ApiCommand |
hdfsEnableHaCommand(String serviceName,
ApiHdfsHaArguments args)
Deprecated.
This endpoint is not supported v6 onwards. Use hdfsEnableNnHa on the HDFS service instead.
|
ApiCommand |
hdfsFailoverCommand(String serviceName,
boolean force,
ApiRoleNameList roleNames)
Initiate a failover in an HDFS HA NameNode pair.
|
ApiCommandList |
listActiveCommands(String serviceName,
DataView dataView)
List active service commands.
|
ApiRoleTypeList |
listRoleTypes(String serviceName)
List the supported role types for a service.
|
ApiService |
readService(String serviceName)
Retrieves details information about a service.
|
ApiServiceConfig |
readServiceConfig(String serviceName,
DataView dataView)
Retrieves the configuration of a specific service.
|
ApiServiceList |
readServices(DataView dataView)
Lists all services registered in the cluster.
|
ApiCommand |
restartCommand(String serviceName)
Restart the service.
|
ApiCommand |
startCommand(String serviceName)
Start the service.
|
ApiCommand |
stopCommand(String serviceName)
Stop the service.
|
ApiServiceConfig |
updateServiceConfig(String serviceName,
String message,
ApiServiceConfig config)
Updates the service configuration with the given values.
|
ApiCommand |
zooKeeperCleanupCommand(String serviceName)
Clean up all running server instances of a ZooKeeper service.
|
ApiCommand |
zooKeeperInitCommand(String serviceName)
Initializes all the server instances of a ZooKeeper service.
|
@Path(value="/") ApiServiceList createServices(ApiServiceList services)
There are typically two service creation strategies:
ApiService
object, with
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 |
services
- Details of the services to create.@Path(value="/{serviceName}") ApiService deleteService(String serviceName)
serviceName
- The name of the service to delete.@Path(value="/") ApiServiceList readServices(DataView dataView)
@Path(value="/{serviceName}") ApiService readService(String serviceName)
serviceName
- The service name.@Path(value="/{serviceName}/config") ApiServiceConfig readServiceConfig(String serviceName, DataView dataView)
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).
serviceName
- The service to query.dataView
- The view of the data to materialize,
either "summary" or "full".@Path(value="/{serviceName}/config") ApiServiceConfig updateServiceConfig(String serviceName, String message, ApiServiceConfig config)
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.
serviceName
- The service to modify.message
- Optional message describing the changes.config
- Configuration changes.@Path(value="/{serviceName}/roleTypes") ApiRoleTypeList listRoleTypes(String serviceName)
serviceName
- The service to modify.@Deprecated @Path(value="/{serviceName}/metrics") ApiMetricList getMetrics(String serviceName, String from, String to, List<String> metrics, DataView dataView)
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.
serviceName
- The name of the service.from
- Start of the period to query.to
- End of the period to query.metrics
- Filter for which metrics to query.dataView
- The view of the data to materialize,
either "summary" or "full".@Path(value="/{serviceName}/commands") ApiCommandList listActiveCommands(String serviceName, DataView dataView)
serviceName
- The service to which the role belongs.dataView
- The view of the data to materialize,
either "summary" or "full".@Deprecated @Path(value="/{serviceName}/commands/hdfsDisableAutoFailover") ApiCommand hdfsDisableAutoFailoverCommand(String serviceName, String 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.
serviceName
- The HDFS service name.nameservice
- The nameservice name.@Deprecated @Path(value="/{serviceName}/commands/hdfsDisableHa") ApiCommand hdfsDisableHaCommand(String serviceName, ApiHdfsDisableHaArguments args)
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.
serviceName
- The HDFS service name.args
- Arguments for the command.@Deprecated @Path(value="/{serviceName}/commands/hdfsEnableAutoFailover") ApiCommand hdfsEnableAutoFailoverCommand(String serviceName, ApiHdfsFailoverArguments args)
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.
serviceName
- The HDFS service name.args
- Arguments for the command.@Deprecated @Path(value="/{serviceName}/commands/hdfsEnableHa") ApiCommand hdfsEnableHaCommand(String serviceName, ApiHdfsHaArguments args)
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.
serviceName
- The HDFS service name.args
- Arguments for the command.@Path(value="/{serviceName}/commands/hdfsFailover") ApiCommand hdfsFailoverCommand(String serviceName, boolean force, ApiRoleNameList roleNames)
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.
serviceName
- The HDFS service name.force
- Whether to force failover.roleNames
- Names of the NameNodes in the HA pair.@Deprecated @Path(value="/{serviceName}/commands/hueCreateHiveWarehouse") ApiCommand createBeeswaxWarehouseCommand(String serviceName)
serviceName
- The Hue service name.@Path(value="/{serviceName}/commands/hbaseCreateRoot") ApiCommand createHBaseRootCommand(String serviceName)
serviceName
- The HBase service name.@Path(value="/{serviceName}/commands/decommission") ApiCommand decommissionCommand(String serviceName, ApiRoleNameList roleNames)
For HBase services, the list should contain names of RegionServers to decommission.
For HDFS services, the list should contain names of DataNodes to decommission.
serviceName
- The HBase service name.roleNames
- List of role names to decommision.@Path(value="/{serviceName}/commands/deployClientConfig") ApiCommand deployClientConfigCommand(String serviceName, ApiRoleNameList roleNames)
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.serviceName
- The service name.roleNames
- List of role names.@Path(value="/{serviceName}/commands/zooKeeperCleanup") ApiCommand zooKeeperCleanupCommand(String serviceName)
This command removes snapshots and transaction log files kept by ZooKeeper for backup purposes. Refer to the ZooKeeper documentation for more details.
serviceName
- The service to start.@Path(value="/{serviceName}/commands/zooKeeperInit") ApiCommand zooKeeperInitCommand(String serviceName)
ZooKeeper server roles need to be initialized before they can be used.
serviceName
- The service to start.@Path(value="/{serviceName}/commands/start") ApiCommand startCommand(String serviceName)
serviceName
- The service to start.@Path(value="/{serviceName}/commands/stop") ApiCommand stopCommand(String serviceName)
serviceName
- The service to stop.@Path(value="/{serviceName}/commands/restart") ApiCommand restartCommand(String serviceName)
serviceName
- The service to start.@Path(value="/{serviceName}/nameservices") NameservicesResource getNameservicesResource(String serviceName)
@Path(value="/{serviceName}/roles") RolesResource getRolesResource(String serviceName)
@Path(value="/{serviceName}/roleCommands") RoleCommandsResource getRoleCommandsResource(String serviceName)
@Path(value="/{serviceName}/activities") ActivitiesResource getActivitiesResource(String serviceName)
Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.