com.cloudera.api.v4
Interface ServicesResourceV4

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

public interface ServicesResourceV4
extends ServicesResourceV3


Method Summary
 ApiCommand createHiveUserDirCommand(String serviceName)
          Create the Hive user directory
 ApiCommand createSolrHdfsHomeDirCommand(String serviceName)
          Creates the home directory of a Solr service in HDFS.
 ApiCommand createSqoopUserDirCommand(String serviceName)
          Creates the user directory of a Sqoop service in HDFS.
 ApiCommand disableJtHaCommand(String serviceName, ApiDisableJtHaArguments args)
          Disable high availability (HA) for JobTracker.
 ApiCommand enableJtHaCommand(String serviceName, ApiEnableJtHaArguments args)
          Enable high availability (HA) for a JobTracker.
 ApiHdfsUsageReport getHdfsUsageReport(String hdfsServiceName, String nameService, String from, String to, ApiTimeAggregation aggregation)
          Fetch the HDFS usage report.
 ImpalaQueriesResource getImpalaQueriesResource(String serviceName)
          Return the Impala queries resource handler.
 ApiMrUsageReport getMrUsageReport(String mrServiceName, String from, String to, ApiTimeAggregation aggregation)
          Fetch the MR usage report.
 ReplicationsResourceV4 getReplicationsResource(String serviceName)
          Only available with Cloudera Manager Enterprise Edition.
 RoleCommandsResourceV4 getRoleCommandsResource(String serviceName)
           
 RolesResourceV4 getRolesResource(String serviceName)
           
 ApiCommand hiveCreateMetastoreDatabaseCommand(String serviceName)
          Create the Hive Metastore Database.
 ApiCommand hiveUpdateMetastoreNamenodesCommand(String serviceName)
          Update Hive Metastore to point to a NameNode's Nameservice name instead of hostname.
 ApiCommand initSolrCommand(String serviceName)
          Initializes the Solr service in Zookeeper.
 
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

hiveCreateMetastoreDatabaseCommand

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

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

hiveUpdateMetastoreNamenodesCommand

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

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

createSqoopUserDirCommand

@Path(value="/{serviceName}/commands/createSqoopUserDir")
ApiCommand createSqoopUserDirCommand(String serviceName)
Creates the user directory of a Sqoop service in HDFS.

Available since API v4.

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

initSolrCommand

@Path(value="/{serviceName}/commands/initSolr")
ApiCommand initSolrCommand(String serviceName)
Initializes the Solr service in Zookeeper.

Available since API v4.

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

createSolrHdfsHomeDirCommand

@Path(value="/{serviceName}/commands/createSolrHdfsHomeDir")
ApiCommand createSolrHdfsHomeDirCommand(String serviceName)
Creates the home directory of a Solr service in HDFS.

Available since API v4.

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

createHiveUserDirCommand

@Path(value="/{serviceName}/commands/hiveCreateHiveUserDir")
ApiCommand createHiveUserDirCommand(String serviceName)
Create the Hive user directory

Available since API v4.

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

getRolesResource

@Path(value="/{serviceName}/roles")
RolesResourceV4 getRolesResource(String serviceName)
Specified by:
getRolesResource in interface ServicesResource
Specified by:
getRolesResource in interface ServicesResourceV2
Returns:
The roles resource handler.

enableJtHaCommand

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

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

disableJtHaCommand

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

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

getImpalaQueriesResource

@Path(value="/{serviceName}/impalaQueries")
ImpalaQueriesResource getImpalaQueriesResource(String serviceName)
Return the Impala queries resource handler.

Returns:
The Impala queries resource handler

getReplicationsResource

@Path(value="/{serviceName}/replications")
ReplicationsResourceV4 getReplicationsResource(String serviceName)
Only available with Cloudera Manager Enterprise Edition.

Specified by:
getReplicationsResource in interface ServicesResourceV3
Returns:
The replications resource handler.

getRoleCommandsResource

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

getHdfsUsageReport

@Path(value="/{serviceName}/reports/hdfsUsageReport")
ApiHdfsUsageReport getHdfsUsageReport(String hdfsServiceName,
                                           String nameService,
                                           String from,
                                           String to,
                                           ApiTimeAggregation aggregation)
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.

Parameters:
hdfsServiceName - The HDFS service name.
nameService - The (optional) HDFS nameservice. Required for HA setup.
from - The (optional) start time of the report in ISO 8601 format ( defaults to 24 hours before "to" time).
to - The (optional) end time of the report in ISO 8601 format ( defaults to now).
aggregation - The (optional) aggregation period for the data. Supports "hourly", "daily" (default) and "weekly".
Returns:
Report data.

getMrUsageReport

@Path(value="/{serviceName}/reports/mrUsageReport")
ApiMrUsageReport getMrUsageReport(String mrServiceName,
                                       String from,
                                       String to,
                                       ApiTimeAggregation aggregation)
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.

Parameters:
mrServiceName - The MR service name.
from - The (optional) start time of the report in ISO 8601 format (defaults to 24 hours before "to" time).
to - The (optional) end time of the report in ISO 8601 format (defaults to now).
aggregation - The (optional) aggregation period for the data. Supports "hourly", "daily" (default) and "weekly".
Returns:
Report data.


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