com.cloudera.api.v6
Interface ClustersResourceV6

All Superinterfaces:
ClustersResource, ClustersResourceV2, ClustersResourceV3, ClustersResourceV4, ClustersResourceV5
All Known Subinterfaces:
ClustersResourceV10, ClustersResourceV11, ClustersResourceV12, ClustersResourceV13, ClustersResourceV14, ClustersResourceV15, ClustersResourceV16, ClustersResourceV17, ClustersResourceV18, ClustersResourceV7, ClustersResourceV8, ClustersResourceV9

public interface ClustersResourceV6
extends ClustersResourceV5


Method Summary
 void autoAssignRoles(String clusterName)
          Automatically assign roles to hosts and create the roles for all the services in a cluster.
 void autoConfigure(String clusterName)
          Automatically configures roles and services in a cluster.
 ServicesResourceV6 getServicesResource(String clusterName)
           
 ApiServiceTypeList listServiceTypes(String clusterName)
          List the supported service types for a cluster.
 ApiCommand poolsRefresh(String clusterName)
          Updates all refreshable configuration files for services with Dynamic Resource Pools.
 ApiCommand refresh(String clusterName)
          Updates all refreshable configuration files in the cluster.
 ApiCommand restartCommand(String clusterName, ApiRestartClusterArgs args)
          Restart all services in the cluster.
 ApiCluster updateCluster(String clusterName, ApiCluster cluster)
          Update an existing cluster.
 ApiCommand upgradeCdhCommand(String clusterName, ApiCdhUpgradeArgs args)
          Perform CDH upgrade to the next major version.
 
Methods inherited from interface com.cloudera.api.v5.ClustersResourceV5
getParcelsResource
 
Methods inherited from interface com.cloudera.api.v4.ClustersResourceV4
rollingRestart
 
Methods inherited from interface com.cloudera.api.v3.ClustersResourceV3
addHosts, getHostTemplatesResource, listHosts, removeAllHosts, removeHost
 
Methods inherited from interface com.cloudera.api.v2.ClustersResourceV2
deployClientConfig, enterMaintenanceMode, exitMaintenanceMode
 
Methods inherited from interface com.cloudera.api.v1.ClustersResource
createClusters, deleteCluster, listActiveCommands, readCluster, readClusters, restartCommand, startCommand, stopCommand, upgradeServicesCommand
 

Method Detail

getServicesResource

@Path(value="/{clusterName}/services")
ServicesResourceV6 getServicesResource(String clusterName)
Specified by:
getServicesResource in interface ClustersResource
Specified by:
getServicesResource in interface ClustersResourceV2
Specified by:
getServicesResource in interface ClustersResourceV3
Specified by:
getServicesResource in interface ClustersResourceV4
Returns:
The services resource handler.

refresh

@Path(value="/{clusterName}/commands/refresh")
ApiCommand refresh(String clusterName)
Updates all refreshable configuration files in the cluster. Will not restart any roles.

Available since API v6.

Parameters:
clusterName - The name of the cluster
Returns:
Information about the submitted command.

poolsRefresh

@Path(value="/{clusterName}/commands/poolsRefresh")
ApiCommand poolsRefresh(String clusterName)
Updates all refreshable configuration files for services with Dynamic Resource Pools.

Available since API v6.

Parameters:
clusterName - The name of the cluster
Returns:
Information about the submitted command.

restartCommand

@Path(value="/{clusterName}/commands/restart")
ApiCommand restartCommand(String clusterName,
                               ApiRestartClusterArgs args)
Restart all services in the cluster.

Services are stopped then started in the appropriate order given their dependencies. The command can optionally restart only stale services and their dependencies as well as redeploy client configuration on all services in the cluster.

Parameters:
clusterName - The name of the cluster.
args - arguments for the restart command.
Returns:
Information about the submitted command.

listServiceTypes

@Path(value="/{clusterName}/serviceTypes")
ApiServiceTypeList listServiceTypes(String clusterName)
List the supported service types for a cluster.

Parameters:
clusterName - The cluster.
Returns:
List of service types the cluster supports.

updateCluster

@Path(value="/{clusterName}")
ApiCluster updateCluster(String clusterName,
                              ApiCluster cluster)
Update an existing cluster.

To update the CDH version, provide the new value in the "fullVersion" property. Setting a correct version that matches the actual installed software will ensure the correct version-specific features, such as services, roles, commands, and configurations. This need not be manually set for clusters using parcels. In general this action is only necessary after the CDH packages have been manually updated. Note that a downgrade may be rejected if it would render existing services or roles unusable. For major upgrade, the "upgradeService" cluster command should be used instead.

To rename the cluster, provide the new name in the "displayName" property for API >= 6, or in the "name" property for API <=5.

Available since API v2.

Specified by:
updateCluster in interface ClustersResourceV2
Parameters:
clusterName - The name of the cluster.
Returns:
Details of the affected cluster.

autoAssignRoles

@Path(value="/{clusterName}/autoAssignRoles")
void autoAssignRoles(String clusterName)
Automatically assign roles to hosts and create the roles for all the services in a cluster.

Assignments are done based on services and hosts in the cluster, and hardware specifications. If no hosts are added to the cluster, an exception will be thrown preventing any role assignments. Existing roles will be taken into account and their assignments will be not be modified.

Available since API v6.

Parameters:
clusterName - The name of the cluster.

autoConfigure

@Path(value="/{clusterName}/autoConfigure")
void autoConfigure(String clusterName)
Automatically configures roles and services in a cluster.

Overwrites some existing configurations. Might create new role config groups. Only default role config groups must exist before calling this endpoint. Other role config groups must not exist. If they do, an exception will be thrown preventing any configuration. Ignores the Cloudera Management Service even if colocated with roles of this cluster. To avoid over-committing the heap on hosts, assign hosts to this cluster that are not being used by the Cloudera Management Service.

Available since API v6.

Parameters:
clusterName - The name of the cluster.

upgradeCdhCommand

@Path(value="/{clusterName}/commands/upgradeCdh")
ApiCommand upgradeCdhCommand(String clusterName,
                                  ApiCdhUpgradeArgs args)
Perform CDH upgrade to the next major version.

If using packages, CDH packages on all hosts of the cluster must be manually upgraded before this command is issued.

The command will upgrade the services and their configuration to the version available in the CDH5 distribution. All running services will be stopped before proceeding.

Available since v6.

Parameters:
clusterName - The name of the cluster.
args - Arguments for the command. See ApiCdhUpgradeArgs.
Returns:
Information about the submitted command.


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.