com.cloudera.api.v6
Interface ServicesResourceV6

All Superinterfaces:
ServicesResource, ServicesResourceV2, ServicesResourceV3, ServicesResourceV4
All Known Subinterfaces:
ServicesResourceV10, ServicesResourceV11, ServicesResourceV13, ServicesResourceV14, ServicesResourceV15, ServicesResourceV16, ServicesResourceV17, ServicesResourceV18, ServicesResourceV7, ServicesResourceV8

public interface ServicesResourceV6
extends ServicesResourceV4


Method Summary
 ApiCommand createImpalaUserDirCommand(String serviceName)
          Create the Impala user directory
 ApiCommand createYarnJobHistoryDirCommand(String serviceName)
          Create the Yarn job history directory
 ApiCommand createYarnNodeManagerRemoteAppLogDirCommand(String serviceName)
          Create the Yarn NodeManager remote application log directory
 ApiCommand disableOozieHaCommand(String serviceName, ApiDisableOozieHaArguments args)
          Disable high availability (HA) for Oozie.
 ApiCommand disableRmHaCommand(String serviceName, ApiDisableRmHaArguments args)
          Disable high availability (HA) for ResourceManager.
 ApiCommand enableOozieHaCommand(String serviceName, ApiEnableOozieHaArguments args)
          Enable high availability (HA) for Oozie service.
 ApiCommand enableRmHaCommand(String serviceName, ApiEnableRmHaArguments args)
          Enable high availability (HA) for a YARN ResourceManager.
 ImpalaQueriesResourceV6 getImpalaQueriesResource(String serviceName)
          Return the Impala queries resource handler.
 RoleCommandsResourceV6 getRoleCommandsResource(String serviceName)
           
 RolesResourceV6 getRolesResource(String serviceName)
           
 SnapshotsResource getSnapshotsResource(String serviceName)
          Available since API v6.
 YarnApplicationsResource getYarnApplicationsResource(String serviceName)
           
 ApiCommand hbaseUpgradeCommand(String serviceName)
          Upgrade HBase data in HDFS and ZooKeeper as part of upgrade from CDH4 to CDH5.
 ApiCommand hdfsDisableNnHaCommand(String serviceName, ApiDisableNnHaArguments args)
          Disable High Availability (HA) with Automatic Failover for an HDFS NameNode.
 ApiCommand hdfsEnableNnHaCommand(String serviceName, ApiEnableNnHaArguments args)
          Enable High Availability (HA) with Automatic Failover for an HDFS NameNode.
 ApiCommand hdfsUpgradeMetadataCommand(String serviceName)
          Upgrade HDFS Metadata as part of a major version upgrade.
 ApiCommand hiveUpgradeMetastoreCommand(String serviceName)
          Upgrade Hive Metastore as part of a major version upgrade.
 ApiCommand impalaCreateCatalogDatabaseCommand(String serviceName)
          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.
 ApiCommand impalaCreateCatalogDatabaseTablesCommand(String serviceName)
          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.
 ApiCommand importMrConfigsIntoYarn(String serviceName)
          Import MapReduce configuration into Yarn, overwriting Yarn configuration.
 ApiCommandMetadataList listServiceCommands(String serviceName)
          Lists all the commands that can be executed by name on the provided service.
 ApiCommand oozieUpgradeDbCommand(String serviceName)
          Upgrade Oozie Database schema as part of a major version upgrade.
 ApiCommand serviceCommandByName(String serviceName, String commandName)
          Executes a command on the service specified by name.
 ApiCommand sqoopUpgradeDbCommand(String serviceName)
          Upgrade Sqoop Database schema as part of a major version upgrade.
 ApiCommand switchToMr2(String serviceName)
          Change the cluster to use MR2 instead of MR1.
 
Methods inherited from interface com.cloudera.api.v4.ServicesResourceV4
createHiveUserDirCommand, createSolrHdfsHomeDirCommand, createSqoopUserDirCommand, disableJtHaCommand, enableJtHaCommand, getHdfsUsageReport, getMrUsageReport, getReplicationsResource, hiveCreateMetastoreDatabaseCommand, hiveUpdateMetastoreNamenodesCommand, initSolrCommand
 
Methods inherited from interface com.cloudera.api.v3.ServicesResourceV3
createHiveWarehouseCommand, getRoleConfigGroupsResource, hdfsRollEditsCommand, hiveCreateMetastoreDatabaseTablesCommand, installOozieShareLib, rollingRestart, updateService
 
Methods inherited from interface com.cloudera.api.v2.ServicesResourceV2
createOozieDb, enterMaintenanceMode, exitMaintenanceMode, getClientConfig, hdfsCreateTmpDir, recommissionCommand
 
Methods inherited from interface com.cloudera.api.v1.ServicesResource
createBeeswaxWarehouseCommand, createHBaseRootCommand, createServices, decommissionCommand, deleteService, deployClientConfigCommand, getActivitiesResource, getMetrics, getNameservicesResource, hdfsDisableAutoFailoverCommand, hdfsDisableHaCommand, hdfsEnableAutoFailoverCommand, hdfsEnableHaCommand, hdfsFailoverCommand, listActiveCommands, listRoleTypes, readService, readServiceConfig, readServices, restartCommand, startCommand, stopCommand, updateServiceConfig, zooKeeperCleanupCommand, zooKeeperInitCommand
 

Method Detail

getRolesResource

RolesResourceV6 getRolesResource(String serviceName)
Specified by:
getRolesResource in interface ServicesResource
Specified by:
getRolesResource in interface ServicesResourceV2
Specified by:
getRolesResource in interface ServicesResourceV4
Returns:
The roles resource handler.

getSnapshotsResource

@Path(value="/{serviceName}/snapshots")
SnapshotsResource getSnapshotsResource(String serviceName)
Available since API v6. Only available with Cloudera Manager Enterprise Edition.

Returns:
The snapshots resource handler.

getYarnApplicationsResource

@Path(value="/{serviceName}/yarnApplications")
YarnApplicationsResource getYarnApplicationsResource(String serviceName)
Returns:
The YARN applications resource handler.

importMrConfigsIntoYarn

@Path(value="/{serviceName}/commands/importMrConfigsIntoYarn")
ApiCommand importMrConfigsIntoYarn(String serviceName)
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.

Parameters:
serviceName - Name of the Yarn service on which to run the command.
Returns:
Information about the submitted command

switchToMr2

@Path(value="/{serviceName}/commands/switchToMr2")
ApiCommand switchToMr2(String serviceName)
Change the cluster to use MR2 instead of MR1. Services will be restarted.

Will perform the following steps:

Available since API v6.

Parameters:
serviceName - Name of the Yarn service on which to run the command.
Returns:
Information about the submitted command

enableRmHaCommand

@Path(value="/{serviceName}/commands/enableRmHa")
ApiCommand enableRmHaCommand(String serviceName,
                                  ApiEnableRmHaArguments args)
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.

Parameters:
serviceName - The YARN service name.
args - Arguments for the command.
Returns:
Information about the submitted command.

disableRmHaCommand

@Path(value="/{serviceName}/commands/disableRmHa")
ApiCommand disableRmHaCommand(String serviceName,
                                   ApiDisableRmHaArguments args)
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.

Parameters:
serviceName - The YARN service name.
args - Arguments for the command.
Returns:
Information about the submitted command.

enableOozieHaCommand

@Path(value="/{serviceName}/commands/oozieEnableHa")
ApiCommand enableOozieHaCommand(String serviceName,
                                     ApiEnableOozieHaArguments args)
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.

Parameters:
serviceName - The Oozie service name.
args - Arguments for the command.
Returns:
Information about the submitted command.

disableOozieHaCommand

@Path(value="/{serviceName}/commands/oozieDisableHa")
ApiCommand disableOozieHaCommand(String serviceName,
                                      ApiDisableOozieHaArguments args)
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.

Parameters:
serviceName - The Oozie service name.
args - Arguments for the command.
Returns:
Information about the submitted command.

hdfsEnableNnHaCommand

@Path(value="/{serviceName}/commands/hdfsEnableNnHa")
ApiCommand hdfsEnableNnHaCommand(String serviceName,
                                      ApiEnableNnHaArguments args)
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.

Parameters:
serviceName - The HDFS service name.
args - Arguments for the command.
Returns:
Information about the submitted command.

hdfsDisableNnHaCommand

@Path(value="/{serviceName}/commands/hdfsDisableNnHa")
ApiCommand hdfsDisableNnHaCommand(String serviceName,
                                       ApiDisableNnHaArguments args)
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.

Parameters:
serviceName - The HDFS service name.
args - Arguments for the command.
Returns:
Information about the submitted command.

hdfsUpgradeMetadataCommand

@Path(value="/{serviceName}/commands/hdfsUpgradeMetadata")
ApiCommand hdfsUpgradeMetadataCommand(String serviceName)
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.

Parameters:
serviceName - The HDFS service name.
Returns:
Information about the submitted command.

hiveUpgradeMetastoreCommand

@Path(value="/{serviceName}/commands/hiveUpgradeMetastore")
ApiCommand hiveUpgradeMetastoreCommand(String serviceName)
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.

Parameters:
serviceName - The Hive service name.
Returns:
Information about the submitted command.

oozieUpgradeDbCommand

@Path(value="/{serviceName}/commands/oozieUpgradeDb")
ApiCommand oozieUpgradeDbCommand(String serviceName)
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.

Parameters:
serviceName - The Oozie service name.
Returns:
Information about the submitted command.

hbaseUpgradeCommand

@Path(value="/{serviceName}/commands/hbaseUpgrade")
ApiCommand hbaseUpgradeCommand(String serviceName)
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.

Parameters:
serviceName - The HBase service name.
Returns:
Information about the submitted command.

sqoopUpgradeDbCommand

@Path(value="/{serviceName}/commands/sqoopUpgradeDb")
ApiCommand sqoopUpgradeDbCommand(String serviceName)
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.

Parameters:
serviceName - The Sqoop service name.
Returns:
Information about the submitted command.

createYarnJobHistoryDirCommand

@Path(value="/{serviceName}/commands/yarnCreateJobHistoryDirCommand")
ApiCommand createYarnJobHistoryDirCommand(String serviceName)
Create the Yarn job history directory

Available since API v6.

Parameters:
serviceName - The YARN service name.
Returns:
Information about the submitted command.

createYarnNodeManagerRemoteAppLogDirCommand

@Path(value="/{serviceName}/commands/yarnNodeManagerRemoteAppLogDirCommand")
ApiCommand createYarnNodeManagerRemoteAppLogDirCommand(String serviceName)
Create the Yarn NodeManager remote application log directory

Available since API v6.

Parameters:
serviceName - The YARN service name.
Returns:
Information about the submitted command.

createImpalaUserDirCommand

@Path(value="/{serviceName}/commands/impalaCreateUserDir")
ApiCommand createImpalaUserDirCommand(String serviceName)
Create the Impala user directory

Available since API v6.

Parameters:
serviceName - The Impala service name.
Returns:
Information about the submitted command.

impalaCreateCatalogDatabaseCommand

@Path(value="/{serviceName}/commands/impalaCreateCatalogDatabase")
ApiCommand impalaCreateCatalogDatabaseCommand(String serviceName)
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.

Parameters:
serviceName - Name of the Impala service on which to run the command.
Returns:
Information about the submitted command

impalaCreateCatalogDatabaseTablesCommand

@Path(value="/{serviceName}/commands/impalaCreateCatalogDatabaseTables")
ApiCommand impalaCreateCatalogDatabaseTablesCommand(String serviceName)
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.

Parameters:
serviceName - Name of the Impala service on which to run the command.
Returns:
Information about the submitted command

getRoleCommandsResource

@Path(value="/{serviceName}/roleCommands")
RoleCommandsResourceV6 getRoleCommandsResource(String serviceName)
Specified by:
getRoleCommandsResource in interface ServicesResource
Specified by:
getRoleCommandsResource in interface ServicesResourceV3
Specified by:
getRoleCommandsResource in interface ServicesResourceV4
Returns:
The role command resource handler.

serviceCommandByName

@Path(value="/{serviceName}/commands/{commandName}")
ApiCommand serviceCommandByName(String serviceName,
                                     String commandName)
Executes a command on the service specified by name.

Available since API v6.

Parameters:
serviceName - The service name.
commandName - The command name.
Returns:
Information about the submitted command.

listServiceCommands

@Path(value="/{serviceName}/commandsByName")
ApiCommandMetadataList listServiceCommands(String serviceName)
Lists all the commands that can be executed by name on the provided service.

Available since API v6.

Parameters:
serviceName - The service name.
Returns:
a list of command metadata objects.

getImpalaQueriesResource

@Path(value="/{serviceName}/impalaQueries")
ImpalaQueriesResourceV6 getImpalaQueriesResource(String serviceName)
Description copied from interface: ServicesResourceV4
Return the Impala queries resource handler.

Specified by:
getImpalaQueriesResource in interface ServicesResourceV4
Returns:
The Impala queries resource handler


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