ServicesResourceApi

All URIs are relative to https://localhost/api/v55

Method HTTP request Description
addTags PUT /clusters/{clusterName}/services/{serviceName}/tags Attach tags to the service.
collectYarnApplicationDiagnostics POST /clusters/{clusterName}/services/{serviceName}/commands/yarnApplicationDiagnosticsCollection Collect the Diagnostics data for Yarn applications.
copyHdfsFile POST /clusters/{clusterName}/services/{serviceName}/commands/copyHdfsFile Copies source HDFS file to destination cluster HDFS.
createBeeswaxWarehouseCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hueCreateHiveWarehouse Create the Beeswax role's Hive warehouse directory, on Hue services.
createHBaseRootCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseCreateRoot Creates the root directory of an HBase service.
createHdfsFile POST /clusters/{clusterName}/services/{serviceName}/commands/createHdfsFile
createHiveUserDirCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hiveCreateHiveUserDir Create the Hive user directory.
createHiveWarehouseCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hiveCreateHiveWarehouse Create the Hive warehouse directory, on Hive services.
createHiveWarehouseExternalCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hiveCreateHiveWarehouseExternal Create the Hive warehouse external directory for Private Cloud.
createImpalaUserDirCommand POST /clusters/{clusterName}/services/{serviceName}/commands/impalaCreateUserDir Create the Impala user directory.
createOozieDb POST /clusters/{clusterName}/services/{serviceName}/commands/createOozieDb Creates the Oozie Database Schema in the configured database.
createServices POST /clusters/{clusterName}/services Creates a list of services.
createSolrHdfsHomeDirCommand POST /clusters/{clusterName}/services/{serviceName}/commands/createSolrHdfsHomeDir Creates the home directory of a Solr service in HDFS.
createSqoopUserDirCommand POST /clusters/{clusterName}/services/{serviceName}/commands/createSqoopUserDir Creates the user directory of a Sqoop service in HDFS.
createYarnCmContainerUsageInputDirCommand 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.
createYarnJobHistoryDirCommand POST /clusters/{clusterName}/services/{serviceName}/commands/yarnCreateJobHistoryDirCommand Create the Yarn job history directory.
createYarnNodeManagerRemoteAppLogDirCommand POST /clusters/{clusterName}/services/{serviceName}/commands/yarnNodeManagerRemoteAppLogDirCommand Create the Yarn NodeManager remote application log directory.
decommissionCommand POST /clusters/{clusterName}/services/{serviceName}/commands/decommission Decommission roles of a service.
deleteHdfsPath DELETE /clusters/{clusterName}/services/{serviceName}/commands/deleteHdfsPath Deletes the file or directory, specified by the given path, on the given HDFS service.
deleteService DELETE /clusters/{clusterName}/services/{serviceName} Deletes a service from the system.
deleteTags DELETE /clusters/{clusterName}/services/{serviceName}/tags Remove the tags associated with the service.
deployClientConfigCommand POST /clusters/{clusterName}/services/{serviceName}/commands/deployClientConfig Deploy a service's client configuration.
disableCatalogStatestoreHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/disableCatalogStatestoreHa Disable high availability (HA) for Catalog service.
disableJtHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/disableJtHa Disable high availability (HA) for JobTracker.
disableLlamaHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/impalaDisableLlamaHa Not Supported.
disableLlamaRmCommand POST /clusters/{clusterName}/services/{serviceName}/commands/impalaDisableLlamaRm Not Supported.
disableOozieHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/oozieDisableHa Disable high availability (HA) for Oozie.
disableRmHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/disableRmHa Disable high availability (HA) for ResourceManager.
disableSentryHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/disableSentryHa Disable high availability (HA) for Sentry service.
enableCatalogStatestoreHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/enableCatalogStatestoreHa Enable high availability (HA) for Catalog service.
enableJtHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/enableJtHa Enable high availability (HA) for a JobTracker.
enableLlamaHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/impalaEnableLlamaHa Not Supported.
enableLlamaRmCommand POST /clusters/{clusterName}/services/{serviceName}/commands/impalaEnableLlamaRm Not Supported.
enableOozieHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/oozieEnableHa Enable high availability (HA) for Oozie service.
enableRmHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/enableRmHa Enable high availability (HA) for a YARN ResourceManager.
enableSentryHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/enableSentryHa Enable high availability (HA) for Sentry service.
enterMaintenanceMode POST /clusters/{clusterName}/services/{serviceName}/commands/enterMaintenanceMode Put the service into maintenance mode.
exitMaintenanceMode POST /clusters/{clusterName}/services/{serviceName}/commands/exitMaintenanceMode Take the service out of maintenance mode.
exportSentryPermissionsCommand POST /clusters/{clusterName}/services/{serviceName}/commands/exportSentryPermissions Export Sentry Permissions.
firstRun POST /clusters/{clusterName}/services/{serviceName}/commands/firstRun Prepare and start a service.
getClientConfig GET /clusters/{clusterName}/services/{serviceName}/clientConfig Download a zip-compressed archive of the client configuration, of a specific service.
getHdfsUsageReport GET /clusters/{clusterName}/services/{serviceName}/reports/hdfsUsageReport Fetch the HDFS usage report.
getImpalaUtilization GET /clusters/{clusterName}/services/{serviceName}/impalaUtilization Provides the resource utilization of the Impala service as well as the resource utilization per tenant.
getMetrics GET /clusters/{clusterName}/services/{serviceName}/metrics Fetch metric readings for a particular service.
getMrUsageReport GET /clusters/{clusterName}/services/{serviceName}/reports/mrUsageReport Fetch the MR usage report.
getPoliciesFromRanger GET /clusters/{clusterName}/services/{serviceName}/commands/getPoliciesFromRanger Collects information about the policies defined in the local Ranger service.
getServicesFromRanger GET /clusters/{clusterName}/services/{serviceName}/commands/getServicesFromRanger Collects information about the services defined in the local Ranger service.
getUsersFromRanger GET /clusters/{clusterName}/services/{serviceName}/commands/getUsersFromRanger Collects information about the users defined in the local Ranger service.
getYarnUtilization GET /clusters/{clusterName}/services/{serviceName}/yarnUtilization Provides the resource utilization of the yarn service as well as the resource utilization per tenant.
hbaseReplicationCreateUserDirectory POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseCreateUserDirectory Create the HBase user directory (usually /user/hbase).
hbaseReplicationFirstTimeSetupAutomatic POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupAutomatic Starts an automatic HBase replication first time setup.
hbaseReplicationFirstTimeSetupCleanAndReset POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupCleanAndReset Cleans and resets the HBase replication first time setup on the given source and target:.
hbaseReplicationFirstTimeSetupForAlreadyPairedClusters POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupForAlreadyPairedClusters Starts an HBase replication first time setup for the source and target.
hbaseReplicationFirstTimeSetupForSourceOnly POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupForSourceOnly Starts an HBase replication first time setup for the source only.
hbaseReplicationFirstTimeSetupForTargetOnly POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupForTargetOnly Starts an HBase replication first time setup for the target only.
hbaseReplicationFirstTimeSetupForceReady 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.
hbaseReplicationFirstTimeSetupManual POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupManual Starts a manual HBase replication first time setup.
hbaseReplicationFirstTimeSetupManualContinue POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupManualContinue Should be called after #hbaseReplicationFirstTimeSetupManual(String, ApiHBaseReplicationSetupCommandArgs) to finish the manual HBase replication first time setup.
hbaseReplicationFirstTimeSetupReset POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupReset Resets/removes the HBase replication first time setup status for the given source and target.
hbaseReplicationFirstTimeSetupStatus GET /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationFirstTimeSetupStatus
hbaseReplicationSetup POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationSetup Perform one time setup for HBase replication.
hbaseReplicationSetupAdmin POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseReplicationSetupAdmin
hbaseShellCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseShellCommand Execute a hbase shell command.
hbaseUpgradeCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseUpgrade Upgrade HBase data in HDFS and ZooKeeper as part of upgrade from CDH4 to CDH5.
hdfsAddSBNNToNSCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsAddSBNNToNS
hdfsCreateTmpDir POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsCreateTmpDir Creates a tmp directory on the HDFS filesystem.
hdfsDisableAutoFailoverCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsDisableAutoFailover Disable auto-failover for a highly available HDFS nameservice.
hdfsDisableHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsDisableHa Disable high availability (HA) for an HDFS NameNode.
hdfsDisableNnHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsDisableNnHa Disable High Availability (HA) with Automatic Failover for an HDFS NameNode.
hdfsEnableAutoFailoverCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsEnableAutoFailover Enable auto-failover for an HDFS nameservice.
hdfsEnableHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsEnableHa Enable high availability (HA) for an HDFS NameNode.
hdfsEnableNnHaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsEnableNnHa Enable High Availability (HA) with Automatic Failover for an HDFS NameNode.
hdfsFailoverCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsFailover Initiate a failover in an HDFS HA NameNode pair.
hdfsFinalizeRollingUpgrade POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsFinalizeRollingUpgrade Finalizes the rolling upgrade for HDFS by updating the NameNode metadata permanently to the next version.
hdfsRollEditsCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsRollEdits Roll the edits of an HDFS NameNode or Nameservice.
hdfsUpgradeMetadataCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hdfsUpgradeMetadata Upgrade HDFS Metadata as part of a major version upgrade.
hiveCreateMetastoreDatabaseCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hiveCreateMetastoreDatabase Create the Hive Metastore Database.
hiveCreateMetastoreDatabaseTablesCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hiveCreateMetastoreDatabaseTables Create the Hive Metastore Database tables.
hiveUpdateMetastoreNamenodesCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hiveUpdateMetastoreNamenodes Update Hive Metastore to point to a NameNode's Nameservice name instead of hostname.
hiveUpgradeMetastoreCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hiveUpgradeMetastore Upgrade Hive Metastore as part of a major version upgrade.
hiveValidateMetastoreSchemaCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hiveValidateMetastoreSchema Validate the Hive Metastore Schema.
hueDumpDbCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hueDumpDb Runs Hue's dumpdata command.
hueLoadDbCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hueLoadDb Runs Hue's loaddata command.
hueSyncDbCommand POST /clusters/{clusterName}/services/{serviceName}/commands/hueSyncDb Runs Hue's syncdb command.
impalaCreateCatalogDatabaseCommand POST /clusters/{clusterName}/services/{serviceName}/commands/impalaCreateCatalogDatabase .
impalaCreateCatalogDatabaseTablesCommand POST /clusters/{clusterName}/services/{serviceName}/commands/impalaCreateCatalogDatabaseTables .
importMrConfigsIntoYarn POST /clusters/{clusterName}/services/{serviceName}/commands/importMrConfigsIntoYarn Import MapReduce configuration into Yarn, overwriting Yarn configuration.
initSolrCommand POST /clusters/{clusterName}/services/{serviceName}/commands/initSolr Initializes the Solr service in Zookeeper.
installMrFrameworkJars 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.
installOozieShareLib POST /clusters/{clusterName}/services/{serviceName}/commands/installOozieShareLib Creates directory for Oozie user in HDFS and installs the ShareLib in it.
ksMigrateToSentry POST /clusters/{clusterName}/services/{serviceName}/commands/migrateToSentry Migrates the HBase Indexer policy-based permissions to Sentry, by invoking the SentryConfigToolIndexer.
listActiveCommands GET /clusters/{clusterName}/services/{serviceName}/commands List active service commands.
listRoleTypes GET /clusters/{clusterName}/services/{serviceName}/roleTypes List the supported role types for a service.
listServiceCommands 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.
offlineCommand POST /clusters/{clusterName}/services/{serviceName}/commands/offline Offline roles of a service.
oozieCreateEmbeddedDatabaseCommand POST /clusters/{clusterName}/services/{serviceName}/commands/oozieCreateEmbeddedDatabase Create the Oozie Server Database.
oozieDumpDatabaseCommand POST /clusters/{clusterName}/services/{serviceName}/commands/oozieDumpDatabase Dump the Oozie Server Database.
oozieLoadDatabaseCommand POST /clusters/{clusterName}/services/{serviceName}/commands/oozieLoadDatabase Load the Oozie Server Database from dump.
oozieUpgradeDbCommand POST /clusters/{clusterName}/services/{serviceName}/commands/oozieUpgradeDb Upgrade Oozie Database schema as part of a major version upgrade.
readService GET /clusters/{clusterName}/services/{serviceName} Retrieves details information about a service.
readServiceConfig GET /clusters/{clusterName}/services/{serviceName}/config Retrieves the configuration of a specific service.
readServices GET /clusters/{clusterName}/services Lists all services registered in the cluster.
readTags GET /clusters/{clusterName}/services/{serviceName}/tags Returns the tags associated with this service.
recommissionCommand POST /clusters/{clusterName}/services/{serviceName}/commands/recommission Recommission roles of a service.
recommissionWithStartCommand POST /clusters/{clusterName}/services/{serviceName}/commands/recommissionWithStart Start and recommission roles of a service.
restartCommand POST /clusters/{clusterName}/services/{serviceName}/commands/restart Restart the service.
rollingRestart POST /clusters/{clusterName}/services/{serviceName}/commands/rollingRestart Command to run rolling restart of roles in a service.
sentryCreateDatabaseCommand POST /clusters/{clusterName}/services/{serviceName}/commands/sentryCreateDatabase Create the Sentry Server Database.
sentryCreateDatabaseTablesCommand POST /clusters/{clusterName}/services/{serviceName}/commands/sentryCreateDatabaseTables Create the Sentry Server Database tables.
sentryUpgradeDatabaseTablesCommand POST /clusters/{clusterName}/services/{serviceName}/commands/sentryUpgradeDatabaseTables Upgrade the Sentry Server Database tables.
serviceCommandByName POST /clusters/{clusterName}/services/{serviceName}/commands/{commandName} Executes a command on the service specified by name.
solrBootstrapCollectionsCommand POST /clusters/{clusterName}/services/{serviceName}/commands/solrBootstrapCollections Bootstraps Solr Collections after the CDH upgrade.
solrBootstrapConfigCommand POST /clusters/{clusterName}/services/{serviceName}/commands/solrBootstrapConfig Bootstraps Solr config during the CDH upgrade.
solrConfigBackupCommand POST /clusters/{clusterName}/services/{serviceName}/commands/solrConfigBackup Backs up Solr configuration metadata before CDH upgrade.
solrMigrateSentryPrivilegesCommand 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.
solrReinitializeStateForUpgradeCommand 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.
solrValidateMetadataCommand POST /clusters/{clusterName}/services/{serviceName}/commands/solrValidateMetadata Validates Solr metadata and configurations.
sqoopCreateDatabaseTablesCommand POST /clusters/{clusterName}/services/{serviceName}/commands/sqoopCreateDatabaseTables Create the Sqoop2 Server Database tables.
sqoopUpgradeDbCommand POST /clusters/{clusterName}/services/{serviceName}/commands/sqoopUpgradeDb Upgrade Sqoop Database schema as part of a major version upgrade.
startCommand POST /clusters/{clusterName}/services/{serviceName}/commands/start Start the service.
stopCommand POST /clusters/{clusterName}/services/{serviceName}/commands/stop Stop the service.
switchToMr2 POST /clusters/{clusterName}/services/{serviceName}/commands/switchToMr2 Change the cluster to use MR2 instead of MR1.
updateService PUT /clusters/{clusterName}/services/{serviceName} Updates service information.
updateServiceConfig PUT /clusters/{clusterName}/services/{serviceName}/config Updates the service configuration with the given values.
yarnFormatStateStore POST /clusters/{clusterName}/services/{serviceName}/commands/yarnFormatStateStore Formats the state store in ZooKeeper used for Resource Manager High Availability.
zooKeeperCleanupCommand POST /clusters/{clusterName}/services/{serviceName}/commands/zooKeeperCleanup Clean up all running server instances of a ZooKeeper service.
zooKeeperInitCommand POST /clusters/{clusterName}/services/{serviceName}/commands/zooKeeperInit Initializes all the server instances of a ZooKeeper service.

addTags

List<ApiEntityTag> addTags(clusterName, serviceName, body)

Attach tags to the service.

Attach tags to the service. Tag names beginning with the prefix cldr (case insensitive) are reserved for internal use by Cloudera.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | Name of the service
List<ApiEntityTag> body = Arrays.asList(new ApiEntityTag()); // List<ApiEntityTag> | List of tags to add to the service
try {
    List<ApiEntityTag> result = apiInstance.addTags(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#addTags");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String Name of the service
body List<ApiEntityTag> List of tags to add to the service [optional]

Return type

List<ApiEntityTag>

Authorization

basic

HTTP request headers

collectYarnApplicationDiagnostics

ApiCommand collectYarnApplicationDiagnostics(clusterName, serviceName, body)

Collect the Diagnostics data for Yarn applications.

Collect the Diagnostics data for Yarn applications

Available since API v8.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | Name of the YARN service on which to run the command.
ApiYarnApplicationDiagnosticsCollectionArgs body = new ApiYarnApplicationDiagnosticsCollectionArgs(); // ApiYarnApplicationDiagnosticsCollectionArgs | Arguments used for collecting diagnostics data for Yarn applications
try {
    ApiCommand result = apiInstance.collectYarnApplicationDiagnostics(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#collectYarnApplicationDiagnostics");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String Name of the YARN service on which to run the command.
body ApiYarnApplicationDiagnosticsCollectionArgs Arguments used for collecting diagnostics data for Yarn applications [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

copyHdfsFile

ApiCommand copyHdfsFile(clusterName, serviceName, destinationPath, sourcePath, body)

Copies source HDFS file to destination cluster HDFS.

Copies source HDFS file to destination cluster HDFS

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The source HDFS service
String destinationPath = "destinationPath_example"; // String | HDFS full path at destination
String sourcePath = "sourcePath_example"; // String | HDFS full path at source
ApiServiceRef body = new ApiServiceRef(); // ApiServiceRef | ApiServiceRef for the destination
try {
    ApiCommand result = apiInstance.copyHdfsFile(clusterName, serviceName, destinationPath, sourcePath, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#copyHdfsFile");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The source HDFS service
destinationPath String HDFS full path at destination [optional]
sourcePath String HDFS full path at source [optional]
body ApiServiceRef ApiServiceRef for the destination [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

createBeeswaxWarehouseCommand

ApiCommand createBeeswaxWarehouseCommand(clusterName, serviceName)

Create the Beeswax role's Hive warehouse directory, on Hue services.

Create the Beeswax role's Hive warehouse directory, on Hue services.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The Hue service name.
try {
    ApiCommand result = apiInstance.createBeeswaxWarehouseCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createBeeswaxWarehouseCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The Hue service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

createHBaseRootCommand

ApiCommand createHBaseRootCommand(clusterName, serviceName)

Creates the root directory of an HBase service.

Creates the root directory of an HBase service.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HBase service name.
try {
    ApiCommand result = apiInstance.createHBaseRootCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createHBaseRootCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HBase service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

createHdfsFile

String createHdfsFile(clusterName, serviceName, overwrite, path, body)

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name
Boolean overwrite = false; // Boolean | If true overwrite the file
String path = "path_example"; // String | full path to the HDFS file to be created
String body = "body_example"; // String | Content to be put in the file to be created
try {
    String result = apiInstance.createHdfsFile(clusterName, serviceName, overwrite, path, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createHdfsFile");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name
overwrite Boolean If true overwrite the file [optional] [default to false]
path String full path to the HDFS file to be created [optional]
body String Content to be put in the file to be created [optional]

Return type

String

Authorization

basic

HTTP request headers

createHiveUserDirCommand

ApiCommand createHiveUserDirCommand(clusterName, serviceName)

Create the Hive user directory.

Create the Hive user directory

Available since API v4.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The Hive service name.
try {
    ApiCommand result = apiInstance.createHiveUserDirCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createHiveUserDirCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The Hive service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

createHiveWarehouseCommand

ApiCommand createHiveWarehouseCommand(clusterName, serviceName)

Create the Hive warehouse directory, on Hive services.

Create the Hive warehouse directory, on Hive services.

Available since API v3.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The Hive service name.
try {
    ApiCommand result = apiInstance.createHiveWarehouseCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createHiveWarehouseCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The Hive service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

createHiveWarehouseExternalCommand

ApiCommand createHiveWarehouseExternalCommand(clusterName, serviceName, directory)

Create the Hive warehouse external directory for Private Cloud.

Create the Hive warehouse external directory for Private Cloud.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The Hive service name.
String directory = "directory_example"; // String | Name of the warehouse external directory.
try {
    ApiCommand result = apiInstance.createHiveWarehouseExternalCommand(clusterName, serviceName, directory);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createHiveWarehouseExternalCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The Hive service name.
directory String Name of the warehouse external directory. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

createImpalaUserDirCommand

ApiCommand createImpalaUserDirCommand(clusterName, serviceName)

Create the Impala user directory.

Create the Impala user directory

Available since API v6.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The Impala service name.
try {
    ApiCommand result = apiInstance.createImpalaUserDirCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createImpalaUserDirCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The Impala service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

createOozieDb

ApiCommand createOozieDb(clusterName, serviceName)

Creates the Oozie Database Schema in the configured database.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | Name of the Oozie service on which to run the command.
try {
    ApiCommand result = apiInstance.createOozieDb(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createOozieDb");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String Name of the Oozie service on which to run the command.

Return type

ApiCommand

Authorization

basic

HTTP request headers

createServices

ApiServiceList createServices(clusterName, body)

Creates a list of services.

Creates a list of services.

There are typically two service creation strategies:

  1. 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.
  2. Alternatively, the caller can pack all the information in one call, by fully specifying the fields in the com.cloudera.api.model.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, KAFKA
As of V6, GET /{clusterName}/serviceTypes should be used to get the service types available to the cluster.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
ApiServiceList body = new ApiServiceList(); // ApiServiceList | Details of the services to create.
try {
    ApiServiceList result = apiInstance.createServices(clusterName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createServices");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
body ApiServiceList Details of the services to create. [optional]

Return type

ApiServiceList

Authorization

basic

HTTP request headers

createSolrHdfsHomeDirCommand

ApiCommand createSolrHdfsHomeDirCommand(clusterName, serviceName)

Creates the home directory of a Solr service in HDFS.

Creates the home directory of a Solr service in HDFS.

Available since API v4.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The Solr service name.
try {
    ApiCommand result = apiInstance.createSolrHdfsHomeDirCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createSolrHdfsHomeDirCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The Solr service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

createSqoopUserDirCommand

ApiCommand createSqoopUserDirCommand(clusterName, serviceName)

Creates the user directory of a Sqoop service in HDFS.

Creates the user directory of a Sqoop service in HDFS.

Available since API v4.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The Sqoop service name.
try {
    ApiCommand result = apiInstance.createSqoopUserDirCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createSqoopUserDirCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The Sqoop service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

createYarnCmContainerUsageInputDirCommand

ApiCommand createYarnCmContainerUsageInputDirCommand(clusterName, serviceName)

Creates the HDFS directory where YARN container usage metrics are stored by NodeManagers for CM to read and aggregate into app usage metrics.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The YARN service name.
try {
    ApiCommand result = apiInstance.createYarnCmContainerUsageInputDirCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createYarnCmContainerUsageInputDirCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The YARN service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

createYarnJobHistoryDirCommand

ApiCommand createYarnJobHistoryDirCommand(clusterName, serviceName)

Create the Yarn job history directory.

Create the Yarn job history directory

Available since API v6.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The YARN service name.
try {
    ApiCommand result = apiInstance.createYarnJobHistoryDirCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createYarnJobHistoryDirCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The YARN service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

createYarnNodeManagerRemoteAppLogDirCommand

ApiCommand createYarnNodeManagerRemoteAppLogDirCommand(clusterName, serviceName)

Create the Yarn NodeManager remote application log directory.

Create the Yarn NodeManager remote application log directory

Available since API v6.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The YARN service name.
try {
    ApiCommand result = apiInstance.createYarnNodeManagerRemoteAppLogDirCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#createYarnNodeManagerRemoteAppLogDirCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The YARN service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

decommissionCommand

ApiCommand decommissionCommand(clusterName, serviceName, body)

Decommission roles of a service.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HBase service name.
ApiRoleNameList body = new ApiRoleNameList(); // ApiRoleNameList | List of role names to decommision.
try {
    ApiCommand result = apiInstance.decommissionCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#decommissionCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HBase service name.
body ApiRoleNameList List of role names to decommision. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

deleteHdfsPath

DeleteHdfsPathResult deleteHdfsPath(clusterName, serviceName, path, recursive)

Deletes the file or directory, specified by the given path, on the given HDFS service.

Deletes the file or directory, specified by the given path, on the given HDFS service.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name
String path = "path_example"; // String | path of the file or directory to be deleted
Boolean recursive = true; // Boolean | 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
try {
    DeleteHdfsPathResult result = apiInstance.deleteHdfsPath(clusterName, serviceName, path, recursive);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#deleteHdfsPath");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name
path String path of the file or directory to be deleted [optional]
recursive Boolean 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 [optional]

Return type

DeleteHdfsPathResult

Authorization

basic

HTTP request headers

deleteService

ApiService deleteService(clusterName, serviceName)

Deletes a service from the system.

Deletes a service from the system.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The name of the service to delete.
try {
    ApiService result = apiInstance.deleteService(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#deleteService");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The name of the service to delete.

Return type

ApiService

Authorization

basic

HTTP request headers

deleteTags

List<ApiEntityTag> deleteTags(clusterName, serviceName, body)

Remove the tags associated with the service.

Remove the tags associated with the service. Tag names beginning with the prefix cldr (case insensitive) are reserved for internal use by Cloudera.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | Name of the service to remove tags from
List<ApiEntityTag> body = Arrays.asList(new ApiEntityTag()); // List<ApiEntityTag> | List of tags to remove from the service
try {
    List<ApiEntityTag> result = apiInstance.deleteTags(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#deleteTags");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String Name of the service to remove tags from
body List<ApiEntityTag> List of tags to remove from the service [optional]

Return type

List<ApiEntityTag>

Authorization

basic

HTTP request headers

deployClientConfigCommand

ApiCommand deployClientConfigCommand(clusterName, serviceName, body)

Deploy a service's client configuration.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The service name.
ApiRoleNameList body = new ApiRoleNameList(); // ApiRoleNameList | List of role names.
try {
    ApiCommand result = apiInstance.deployClientConfigCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#deployClientConfigCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The service name.
body ApiRoleNameList List of role names. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

disableCatalogStatestoreHaCommand

ApiCommand disableCatalogStatestoreHaCommand(clusterName, serviceName, body)

Disable high availability (HA) for Catalog service.

Disable high availability (HA) for Catalog service.

This command only applies to CDH 7.1.9+ Impala Catalog services.

The command will keep exactly one Catalog server on the specified host.

All services that depend on Impala will be restarted after disabling Catalog HA.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | A String representing the Catalog service name.
ApiDisableCatalogStatestoreHaArguments body = new ApiDisableCatalogStatestoreHaArguments(); // ApiDisableCatalogStatestoreHaArguments | An instance of ApiDisableCatalogStatestoreHaArguments representing the arguments to the command.
try {
    ApiCommand result = apiInstance.disableCatalogStatestoreHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#disableCatalogStatestoreHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String A String representing the Catalog service name.
body ApiDisableCatalogStatestoreHaArguments An instance of ApiDisableCatalogStatestoreHaArguments representing the arguments to the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

disableJtHaCommand

ApiCommand disableJtHaCommand(clusterName, serviceName, body)

Disable high availability (HA) for JobTracker.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The MapReduce service name.
ApiDisableJtHaArguments body = new ApiDisableJtHaArguments(); // ApiDisableJtHaArguments | Arguments for the command.
try {
    ApiCommand result = apiInstance.disableJtHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#disableJtHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The MapReduce service name.
body ApiDisableJtHaArguments Arguments for the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

disableLlamaHaCommand

ApiCommand disableLlamaHaCommand(clusterName, serviceName, body)

Not Supported.

Not Supported. Llama was removed.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | 
ApiDisableLlamaHaArguments body = new ApiDisableLlamaHaArguments(); // ApiDisableLlamaHaArguments | 
try {
    ApiCommand result = apiInstance.disableLlamaHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#disableLlamaHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String
body ApiDisableLlamaHaArguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

disableLlamaRmCommand

ApiCommand disableLlamaRmCommand(clusterName, serviceName)

Not Supported.

Not Supported. Llama was removed.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | 
try {
    ApiCommand result = apiInstance.disableLlamaRmCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#disableLlamaRmCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String

Return type

ApiCommand

Authorization

basic

HTTP request headers

disableOozieHaCommand

ApiCommand disableOozieHaCommand(clusterName, serviceName, body)

Disable high availability (HA) for Oozie.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The Oozie service name.
ApiDisableOozieHaArguments body = new ApiDisableOozieHaArguments(); // ApiDisableOozieHaArguments | Arguments for the command.
try {
    ApiCommand result = apiInstance.disableOozieHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#disableOozieHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The Oozie service name.
body ApiDisableOozieHaArguments Arguments for the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

disableRmHaCommand

ApiCommand disableRmHaCommand(clusterName, serviceName, body)

Disable high availability (HA) for ResourceManager.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The YARN service name.
ApiDisableRmHaArguments body = new ApiDisableRmHaArguments(); // ApiDisableRmHaArguments | Arguments for the command.
try {
    ApiCommand result = apiInstance.disableRmHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#disableRmHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The YARN service name.
body ApiDisableRmHaArguments Arguments for the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

disableSentryHaCommand

ApiCommand disableSentryHaCommand(clusterName, serviceName, body)

Disable high availability (HA) for Sentry service.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | A String representing the Sentry service name.
ApiDisableSentryHaArgs body = new ApiDisableSentryHaArgs(); // ApiDisableSentryHaArgs | An instance of ApiDisableSentryHaArgs representing the arguments to the command.
try {
    ApiCommand result = apiInstance.disableSentryHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#disableSentryHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String A String representing the Sentry service name.
body ApiDisableSentryHaArgs An instance of ApiDisableSentryHaArgs representing the arguments to the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

enableCatalogStatestoreHaCommand

ApiCommand enableCatalogStatestoreHaCommand(clusterName, serviceName, body)

Enable high availability (HA) for Catalog service.

Enable high availability (HA) for Catalog service.

This command only applies to CDH 7.1.9+ Impala Catalog services.

The command will create a new Catalog server on the specified host for Catalog HA.

All services that depend on Impala will be restarted after enabling Catalog HA.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | A String representing the Catalog service name.
ApiEnableCatalogStatestoreHaArguments body = new ApiEnableCatalogStatestoreHaArguments(); // ApiEnableCatalogStatestoreHaArguments | An instance of ApiEnableCatalogStatestoreHaArguments representing the arguments to the command.
try {
    ApiCommand result = apiInstance.enableCatalogStatestoreHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#enableCatalogStatestoreHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String A String representing the Catalog service name.
body ApiEnableCatalogStatestoreHaArguments An instance of ApiEnableCatalogStatestoreHaArguments representing the arguments to the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

enableJtHaCommand

ApiCommand enableJtHaCommand(clusterName, serviceName, body)

Enable high availability (HA) for a JobTracker.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The MapReduce service name.
ApiEnableJtHaArguments body = new ApiEnableJtHaArguments(); // ApiEnableJtHaArguments | Arguments for the command.
try {
    ApiCommand result = apiInstance.enableJtHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#enableJtHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The MapReduce service name.
body ApiEnableJtHaArguments Arguments for the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

enableLlamaHaCommand

ApiCommand enableLlamaHaCommand(clusterName, serviceName, body)

Not Supported.

Not Supported. Llama was removed.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | 
ApiEnableLlamaHaArguments body = new ApiEnableLlamaHaArguments(); // ApiEnableLlamaHaArguments | 
try {
    ApiCommand result = apiInstance.enableLlamaHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#enableLlamaHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String
body ApiEnableLlamaHaArguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

enableLlamaRmCommand

ApiCommand enableLlamaRmCommand(clusterName, serviceName, body)

Not Supported.

Not Supported. Llama was removed.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | 
ApiEnableLlamaRmArguments body = new ApiEnableLlamaRmArguments(); // ApiEnableLlamaRmArguments | 
try {
    ApiCommand result = apiInstance.enableLlamaRmCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#enableLlamaRmCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String
body ApiEnableLlamaRmArguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

enableOozieHaCommand

ApiCommand enableOozieHaCommand(clusterName, serviceName, body)

Enable high availability (HA) for Oozie service.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The Oozie service name.
ApiEnableOozieHaArguments body = new ApiEnableOozieHaArguments(); // ApiEnableOozieHaArguments | Arguments for the command.
try {
    ApiCommand result = apiInstance.enableOozieHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#enableOozieHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The Oozie service name.
body ApiEnableOozieHaArguments Arguments for the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

enableRmHaCommand

ApiCommand enableRmHaCommand(clusterName, serviceName, body)

Enable high availability (HA) for a YARN ResourceManager.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The YARN service name.
ApiEnableRmHaArguments body = new ApiEnableRmHaArguments(); // ApiEnableRmHaArguments | Arguments for the command.
try {
    ApiCommand result = apiInstance.enableRmHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#enableRmHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The YARN service name.
body ApiEnableRmHaArguments Arguments for the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

enableSentryHaCommand

ApiCommand enableSentryHaCommand(clusterName, serviceName, body)

Enable high availability (HA) for Sentry service.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | A String representing the Sentry service name.
ApiEnableSentryHaArgs body = new ApiEnableSentryHaArgs(); // ApiEnableSentryHaArgs | An instance of ApiEnableSentryHaArgs representing the arguments to the command.
try {
    ApiCommand result = apiInstance.enableSentryHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#enableSentryHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String A String representing the Sentry service name.
body ApiEnableSentryHaArgs An instance of ApiEnableSentryHaArgs representing the arguments to the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

enterMaintenanceMode

ApiCommand enterMaintenanceMode(clusterName, serviceName)

Put the service into maintenance mode.

Put the service into maintenance mode. This is a synchronous command. The result is known immediately upon return.

Available since API v2.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The service name.
try {
    ApiCommand result = apiInstance.enterMaintenanceMode(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#enterMaintenanceMode");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

exitMaintenanceMode

ApiCommand exitMaintenanceMode(clusterName, serviceName)

Take the service out of maintenance mode.

Take the service out of maintenance mode. This is a synchronous command. The result is known immediately upon return.

Available since API v2.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The service name.
try {
    ApiCommand result = apiInstance.exitMaintenanceMode(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#exitMaintenanceMode");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

exportSentryPermissionsCommand

ApiCommand exportSentryPermissionsCommand(clusterName, serviceName)

Export Sentry Permissions.

Export Sentry Permissions.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The service name.
try {
    ApiCommand result = apiInstance.exportSentryPermissionsCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#exportSentryPermissionsCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

firstRun

ApiCommand firstRun(clusterName, serviceName)

Prepare and start a service.

Prepare and start a service.

Perform all the steps needed to prepare the service and start it.

Available since API v7.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The name of the cluster.
try {
    ApiCommand result = apiInstance.firstRun(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#firstRun");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The name of the cluster.

Return type

ApiCommand

Authorization

basic

HTTP request headers

getClientConfig

File getClientConfig(clusterName, serviceName)

Download a zip-compressed archive of the client configuration, of a specific service.

Download a zip-compressed archive of the client configuration, of a specific service. This resource does not require any authentication.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The service name.
try {
    File result = apiInstance.getClientConfig(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#getClientConfig");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The service name.

Return type

File

Authorization

basic

HTTP request headers

getHdfsUsageReport

ApiHdfsUsageReport getHdfsUsageReport(clusterName, serviceName, aggregation, from, nameservice, to)

Fetch the HDFS usage report.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name.
String aggregation = "daily"; // String | The (optional) aggregation period for the data. Supports \"hourly\", \"daily\" (default) and \"weekly\".
String from = "from_example"; // String | The (optional) start time of the report in ISO 8601 format ( defaults to 24 hours before \"to\" time).
String nameservice = "nameservice_example"; // String | The (optional) HDFS nameservice. Required for HA setup.
String to = "now"; // String | The (optional) end time of the report in ISO 8601 format ( defaults to now).
try {
    ApiHdfsUsageReport result = apiInstance.getHdfsUsageReport(clusterName, serviceName, aggregation, from, nameservice, to);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#getHdfsUsageReport");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name.
aggregation String The (optional) aggregation period for the data. Supports "hourly", "daily" (default) and "weekly". [optional] [default to daily] [enum: DAILY, HOURLY, WEEKLY]
from String The (optional) start time of the report in ISO 8601 format ( defaults to 24 hours before "to" time). [optional]
nameservice String The (optional) HDFS nameservice. Required for HA setup. [optional]
to String The (optional) end time of the report in ISO 8601 format ( defaults to now). [optional] [default to now]

Return type

ApiHdfsUsageReport

Authorization

basic

HTTP request headers

getImpalaUtilization

ApiImpalaUtilization getImpalaUtilization(clusterName, serviceName, daysOfWeek, endHourOfDay, from, startHourOfDay, tenantType, to)

Provides the resource utilization of the Impala service as well as the resource utilization per tenant.

Provides the resource utilization of the Impala service as well as the resource utilization per tenant. Only available with Cloudera Manager Enterprise Edition.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | service name
List<String> daysOfWeek = Arrays.asList("daysOfWeek_example"); // List<String> | 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.
java.math.BigDecimal endHourOfDay = new java.math.BigDecimal(); // java.math.BigDecimal | 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.
String from = "from_example"; // String | Start of the time range to report utilization in ISO 8601 format.
java.math.BigDecimal startHourOfDay = new java.math.BigDecimal(); // java.math.BigDecimal | 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.
String tenantType = "POOL"; // String | The type of the tenant (POOL or USER).
String to = "now"; // String | End of the the time range to report utilization in ISO 8601 format (defaults to now).
try {
    ApiImpalaUtilization result = apiInstance.getImpalaUtilization(clusterName, serviceName, daysOfWeek, endHourOfDay, from, startHourOfDay, tenantType, to);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#getImpalaUtilization");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String service name
daysOfWeek List<String> 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. [optional]
endHourOfDay java.math.BigDecimal 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. [optional] [default to 23]
from String Start of the time range to report utilization in ISO 8601 format. [optional]
startHourOfDay java.math.BigDecimal 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. [optional] [default to 0]
tenantType String The type of the tenant (POOL or USER). [optional] [default to POOL]
to String End of the the time range to report utilization in ISO 8601 format (defaults to now). [optional] [default to now]

Return type

ApiImpalaUtilization

Authorization

basic

HTTP request headers

getMetrics

ApiMetricList getMetrics(clusterName, serviceName, from, metrics, to, view)

Fetch metric readings for a particular service.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The name of the service.
String from = "from_example"; // String | Start of the period to query.
List<String> metrics = Arrays.asList("metrics_example"); // List<String> | Filter for which metrics to query.
String to = "now"; // String | End of the period to query.
String view = "summary"; // String | The view of the data to materialize, either \"summary\" or \"full\".
try {
    ApiMetricList result = apiInstance.getMetrics(clusterName, serviceName, from, metrics, to, view);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#getMetrics");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The name of the service.
from String Start of the period to query. [optional]
metrics List<String> Filter for which metrics to query. [optional]
to String End of the period to query. [optional] [default to now]
view String The view of the data to materialize, either "summary" or "full". [optional] [default to summary] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY]

Return type

ApiMetricList

Authorization

basic

HTTP request headers

getMrUsageReport

ApiMrUsageReport getMrUsageReport(clusterName, serviceName, aggregation, from, to)

Fetch the MR usage report.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The MR service name.
String aggregation = "daily"; // String | The (optional) aggregation period for the data. Supports \"hourly\", \"daily\" (default) and \"weekly\".
String from = "from_example"; // String | The (optional) start time of the report in ISO 8601 format (defaults to 24 hours before \"to\" time).
String to = "now"; // String | The (optional) end time of the report in ISO 8601 format (defaults to now).
try {
    ApiMrUsageReport result = apiInstance.getMrUsageReport(clusterName, serviceName, aggregation, from, to);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#getMrUsageReport");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The MR service name.
aggregation String The (optional) aggregation period for the data. Supports "hourly", "daily" (default) and "weekly". [optional] [default to daily] [enum: DAILY, HOURLY, WEEKLY]
from String The (optional) start time of the report in ISO 8601 format (defaults to 24 hours before "to" time). [optional]
to String The (optional) end time of the report in ISO 8601 format (defaults to now). [optional] [default to now]

Return type

ApiMrUsageReport

Authorization

basic

HTTP request headers

getPoliciesFromRanger

ApiRangerPolicyList getPoliciesFromRanger(clusterName, serviceName, sourceCluster, sourcePeer, sourceService)

Collects information about the policies defined in the local Ranger service.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | the name of the local Ranger service.
String sourceCluster = "sourceCluster_example"; // String | optional: the source CM cluster name.
String sourcePeer = "sourcePeer_example"; // String | optional: the source CM peer name.
String sourceService = "sourceService_example"; // String | optional: the Ranger service name on the source CM.
try {
    ApiRangerPolicyList result = apiInstance.getPoliciesFromRanger(clusterName, serviceName, sourceCluster, sourcePeer, sourceService);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#getPoliciesFromRanger");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String the name of the local Ranger service.
sourceCluster String optional: the source CM cluster name. [optional]
sourcePeer String optional: the source CM peer name. [optional]
sourceService String optional: the Ranger service name on the source CM. [optional]

Return type

ApiRangerPolicyList

Authorization

basic

HTTP request headers

getServicesFromRanger

ApiRangerServiceList getServicesFromRanger(clusterName, serviceName, sourceCluster, sourcePeer, sourceService)

Collects information about the services defined in the local Ranger service.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | the name of the local Ranger service.
String sourceCluster = "sourceCluster_example"; // String | optional: the source CM cluster name.
String sourcePeer = "sourcePeer_example"; // String | optional: the source CM peer name.
String sourceService = "sourceService_example"; // String | optional: the Ranger service name on the source CM.
try {
    ApiRangerServiceList result = apiInstance.getServicesFromRanger(clusterName, serviceName, sourceCluster, sourcePeer, sourceService);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#getServicesFromRanger");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String the name of the local Ranger service.
sourceCluster String optional: the source CM cluster name. [optional]
sourcePeer String optional: the source CM peer name. [optional]
sourceService String optional: the Ranger service name on the source CM. [optional]

Return type

ApiRangerServiceList

Authorization

basic

HTTP request headers

getUsersFromRanger

ApiRangerUserList getUsersFromRanger(clusterName, serviceName, sourceCluster, sourcePeer, sourceService)

Collects information about the users defined in the local Ranger service.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | the name of the local Ranger service.
String sourceCluster = "sourceCluster_example"; // String | optional: the source CM cluster name.
String sourcePeer = "sourcePeer_example"; // String | optional: the source CM peer name.
String sourceService = "sourceService_example"; // String | optional: the Ranger service name on the source CM.
try {
    ApiRangerUserList result = apiInstance.getUsersFromRanger(clusterName, serviceName, sourceCluster, sourcePeer, sourceService);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#getUsersFromRanger");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String the name of the local Ranger service.
sourceCluster String optional: the source CM cluster name. [optional]
sourcePeer String optional: the source CM peer name. [optional]
sourceService String optional: the Ranger service name on the source CM. [optional]

Return type

ApiRangerUserList

Authorization

basic

HTTP request headers

getYarnUtilization

ApiYarnUtilization getYarnUtilization(clusterName, serviceName, daysOfWeek, endHourOfDay, from, startHourOfDay, tenantType, to)

Provides the resource utilization of the yarn service as well as the resource utilization per tenant.

Provides the resource utilization of the yarn service as well as the resource utilization per tenant. Only available with Cloudera Manager Enterprise Edition.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | service name
List<String> daysOfWeek = Arrays.asList("daysOfWeek_example"); // List<String> | 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.
java.math.BigDecimal endHourOfDay = new java.math.BigDecimal(); // java.math.BigDecimal | 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.
String from = "from_example"; // String | Start of the time range to report utilization in ISO 8601 format.
java.math.BigDecimal startHourOfDay = new java.math.BigDecimal(); // java.math.BigDecimal | 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.
String tenantType = "POOL"; // String | The type of the tenant (POOL or USER).
String to = "now"; // String | End of the the time range to report utilization in ISO 8601 format (defaults to now).
try {
    ApiYarnUtilization result = apiInstance.getYarnUtilization(clusterName, serviceName, daysOfWeek, endHourOfDay, from, startHourOfDay, tenantType, to);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#getYarnUtilization");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String service name
daysOfWeek List<String> 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. [optional]
endHourOfDay java.math.BigDecimal 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. [optional] [default to 23]
from String Start of the time range to report utilization in ISO 8601 format. [optional]
startHourOfDay java.math.BigDecimal 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. [optional] [default to 0]
tenantType String The type of the tenant (POOL or USER). [optional] [default to POOL]
to String End of the the time range to report utilization in ISO 8601 format (defaults to now). [optional] [default to now]

Return type

ApiYarnUtilization

Authorization

basic

HTTP request headers

hbaseReplicationCreateUserDirectory

ApiCommand hbaseReplicationCreateUserDirectory(clusterName, serviceName)

Create the HBase user directory (usually /user/hbase).

Create the HBase user directory (usually /user/hbase).

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The local HBase service name
try {
    ApiCommand result = apiInstance.hbaseReplicationCreateUserDirectory(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationCreateUserDirectory");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The local HBase service name

Return type

ApiCommand

Authorization

basic

HTTP request headers

hbaseReplicationFirstTimeSetupAutomatic

ApiCommand hbaseReplicationFirstTimeSetupAutomatic(clusterName, serviceName, force, body)

Starts an automatic HBase replication first time setup.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The local HBase service name
Boolean force = false; // Boolean | If true, perform setup even if already setup. (Default false)
ApiHBaseReplicationSetupCommandArgs body = new ApiHBaseReplicationSetupCommandArgs(); // ApiHBaseReplicationSetupCommandArgs | 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)
try {
    ApiCommand result = apiInstance.hbaseReplicationFirstTimeSetupAutomatic(clusterName, serviceName, force, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationFirstTimeSetupAutomatic");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The local HBase service name
force Boolean If true, perform setup even if already setup. (Default false) [optional] [default to false]
body ApiHBaseReplicationSetupCommandArgs 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) [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hbaseReplicationFirstTimeSetupCleanAndReset

ApiCommand hbaseReplicationFirstTimeSetupCleanAndReset(clusterName, serviceName, body)

Cleans and resets the HBase replication first time setup on the given source and target:.

Cleans and resets the HBase replication first time setup on the given source and target:

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The local HBase service name
ApiHBaseReplicationSetupCleanAndResetArgs body = new ApiHBaseReplicationSetupCleanAndResetArgs(); // ApiHBaseReplicationSetupCleanAndResetArgs | 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
try {
    ApiCommand result = apiInstance.hbaseReplicationFirstTimeSetupCleanAndReset(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationFirstTimeSetupCleanAndReset");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The local HBase service name
body ApiHBaseReplicationSetupCleanAndResetArgs 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 [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hbaseReplicationFirstTimeSetupForAlreadyPairedClusters

ApiCommand hbaseReplicationFirstTimeSetupForAlreadyPairedClusters(clusterName, serviceName, force, body)

Starts an HBase replication first time setup for the source and target.

Starts an HBase replication first time setup for the source and target.

Before using this API endpoint, it's assumed that the source and target (local) HBase services already have the HBase replication first time setup executed but with different peers. It starts a command, that checks if the necessary configurations are in place on both source and target (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)). If everything matches, then it sets the setup status to READY.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The local (target) HBase service name
Boolean force = false; // Boolean | If true, perform setup even if already setup. (Default false)
ApiServiceRef body = new ApiServiceRef(); // ApiServiceRef | contains the source peer, source cluster, source HBase service name
try {
    ApiCommand result = apiInstance.hbaseReplicationFirstTimeSetupForAlreadyPairedClusters(clusterName, serviceName, force, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationFirstTimeSetupForAlreadyPairedClusters");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The local (target) HBase service name
force Boolean If true, perform setup even if already setup. (Default false) [optional] [default to false]
body ApiServiceRef contains the source peer, source cluster, source HBase service name [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hbaseReplicationFirstTimeSetupForSourceOnly

ApiCommand hbaseReplicationFirstTimeSetupForSourceOnly(clusterName, serviceName, force, body)

Starts an HBase replication first time setup for the source only.

Starts an HBase replication first time setup for the source only.

Before using this API endpoint, it's assumed that the target (local) HBase service already has HBase replication first time setup executed with another peer's HBase. It starts a command, that does some configuration only on the source (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)), then restarts source HBase service if needed.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The local (target) HBase service name
Boolean force = false; // Boolean | If true, perform setup even if already setup. (Default false)
ApiHBaseReplicationSetupOneClusterOnlyCmdArgs body = new ApiHBaseReplicationSetupOneClusterOnlyCmdArgs(); // ApiHBaseReplicationSetupOneClusterOnlyCmdArgs | Replication setup parameters such as the source peer, source cluster, source service, HBase replication user, and optionally the RestartType for the source HBase service. If RestartType is: <ul> <li> <b>provided</b>, then restarts source HBase service accordingly. This is equivalent to the automatic first time setup: #hbaseReplicationFirstTimeSetupAutomatic(String, boolean, ApiHBaseReplicationSetupCommandArgs) </li> <li> <b>not provided</b>, then the source HBase service must be restarted manually. This is equivalent to the manual first time setup: #hbaseReplicationFirstTimeSetupManual(String, boolean, ApiHBaseReplicationSetupCommandArgs). Similarly, after the source HBase service has been restarted, the first time setup can be finished by calling: #hbaseReplicationFirstTimeSetupManualContinue(String, ApiServiceRef) </li> </ul>
try {
    ApiCommand result = apiInstance.hbaseReplicationFirstTimeSetupForSourceOnly(clusterName, serviceName, force, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationFirstTimeSetupForSourceOnly");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The local (target) HBase service name
force Boolean If true, perform setup even if already setup. (Default false) [optional] [default to false]
body ApiHBaseReplicationSetupOneClusterOnlyCmdArgs Replication setup parameters such as the source peer, source cluster, source service, HBase replication user, and optionally the RestartType for the source HBase service. If RestartType is:
  • provided, then restarts source HBase service accordingly. This is equivalent to the automatic first time setup: #hbaseReplicationFirstTimeSetupAutomatic(String, boolean, ApiHBaseReplicationSetupCommandArgs)
  • not provided, then the source HBase service must be restarted manually. This is equivalent to the manual first time setup: #hbaseReplicationFirstTimeSetupManual(String, boolean, ApiHBaseReplicationSetupCommandArgs). Similarly, after the source HBase service has been restarted, the first time setup can be finished by calling: #hbaseReplicationFirstTimeSetupManualContinue(String, ApiServiceRef)
[optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hbaseReplicationFirstTimeSetupForTargetOnly

ApiCommand hbaseReplicationFirstTimeSetupForTargetOnly(clusterName, serviceName, force, body)

Starts an HBase replication first time setup for the target only.

Starts an HBase replication first time setup for the target only.

Before using this API endpoint, it's assumed that the given source HBase service, given by ApiHBaseReplicationSetupOneClusterOnlyCmdArgs, already has HBase replication first time setup executed with another peer's HBase. It starts a command, that does some configuration only on the target (see #hbaseReplicationSetup(String, boolean, ApiHBaseReplicationSetupCommandArgs)), then restarts target HBase service.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The local HBase service name
Boolean force = false; // Boolean | If true, perform setup even if already setup. (Default false)
ApiHBaseReplicationSetupOneClusterOnlyCmdArgs body = new ApiHBaseReplicationSetupOneClusterOnlyCmdArgs(); // ApiHBaseReplicationSetupOneClusterOnlyCmdArgs | Replication setup parameters such as the source peer, source cluster, source service, HBase replication user, and optionally the RestartType for the local HBase service (default is rolling restart)
try {
    ApiCommand result = apiInstance.hbaseReplicationFirstTimeSetupForTargetOnly(clusterName, serviceName, force, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationFirstTimeSetupForTargetOnly");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The local HBase service name
force Boolean If true, perform setup even if already setup. (Default false) [optional] [default to false]
body ApiHBaseReplicationSetupOneClusterOnlyCmdArgs Replication setup parameters such as the source peer, source cluster, source service, HBase replication user, and optionally the RestartType for the local HBase service (default is rolling restart) [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hbaseReplicationFirstTimeSetupForceReady

hbaseReplicationFirstTimeSetupForceReady(clusterName, serviceName, body)

Force sets the HBase replication first time setup status to be READY for the given source and target.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The local HBase service name
ApiServiceRef body = new ApiServiceRef(); // ApiServiceRef | contains the source peer, source cluster, source sourceService
try {
    apiInstance.hbaseReplicationFirstTimeSetupForceReady(clusterName, serviceName, body);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationFirstTimeSetupForceReady");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The local HBase service name
body ApiServiceRef contains the source peer, source cluster, source sourceService [optional]

Return type

null (empty response body)

Authorization

basic

HTTP request headers

hbaseReplicationFirstTimeSetupManual

ApiCommand hbaseReplicationFirstTimeSetupManual(clusterName, serviceName, force, body)

Starts a manual HBase replication first time setup.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The local HBase service name
Boolean force = false; // Boolean | If true, perform setup even if already setup. (Default false)
ApiHBaseReplicationSetupCommandArgs body = new ApiHBaseReplicationSetupCommandArgs(); // ApiHBaseReplicationSetupCommandArgs | 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)
try {
    ApiCommand result = apiInstance.hbaseReplicationFirstTimeSetupManual(clusterName, serviceName, force, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationFirstTimeSetupManual");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The local HBase service name
force Boolean If true, perform setup even if already setup. (Default false) [optional] [default to false]
body ApiHBaseReplicationSetupCommandArgs 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) [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hbaseReplicationFirstTimeSetupManualContinue

ApiCommand hbaseReplicationFirstTimeSetupManualContinue(clusterName, serviceName, body)

Should be called after #hbaseReplicationFirstTimeSetupManual(String, ApiHBaseReplicationSetupCommandArgs) to finish the manual HBase replication first time setup.

Should be called after #hbaseReplicationFirstTimeSetupManual(String, ApiHBaseReplicationSetupCommandArgs) to finish the manual HBase replication first time setup.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The local HBase service name
ApiServiceRef body = new ApiServiceRef(); // ApiServiceRef | contains the source peer, source cluster, source service
try {
    ApiCommand result = apiInstance.hbaseReplicationFirstTimeSetupManualContinue(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationFirstTimeSetupManualContinue");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The local HBase service name
body ApiServiceRef contains the source peer, source cluster, source service [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hbaseReplicationFirstTimeSetupReset

hbaseReplicationFirstTimeSetupReset(clusterName, serviceName, body)

Resets/removes the HBase replication first time setup status for the given source and target.

Resets/removes the HBase replication first time setup status for the given source and target.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The local HBase service name
ApiServiceRef body = new ApiServiceRef(); // ApiServiceRef | contains the source peer, source cluster, source sourceService
try {
    apiInstance.hbaseReplicationFirstTimeSetupReset(clusterName, serviceName, body);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationFirstTimeSetupReset");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The local HBase service name
body ApiServiceRef contains the source peer, source cluster, source sourceService [optional]

Return type

null (empty response body)

Authorization

basic

HTTP request headers

hbaseReplicationFirstTimeSetupStatus

ApiHBaseReplicationSetupStatus hbaseReplicationFirstTimeSetupStatus(clusterName, serviceName, sourceCluster, sourcePeer, sourceService)

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The local HBase service name
String sourceCluster = "sourceCluster_example"; // String | The source cluster's name
String sourcePeer = "sourcePeer_example"; // String | The source peer's name
String sourceService = "sourceService_example"; // String | The source service's name
try {
    ApiHBaseReplicationSetupStatus result = apiInstance.hbaseReplicationFirstTimeSetupStatus(clusterName, serviceName, sourceCluster, sourcePeer, sourceService);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationFirstTimeSetupStatus");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The local HBase service name
sourceCluster String The source cluster's name [optional]
sourcePeer String The source peer's name [optional]
sourceService String The source service's name [optional]

Return type

ApiHBaseReplicationSetupStatus

Authorization

basic

HTTP request headers

hbaseReplicationSetup

ApiCommand hbaseReplicationSetup(clusterName, serviceName, force, body)

Perform one time setup for HBase replication.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The service name.
Boolean force = false; // Boolean | If true, perform setup even if already setup. (Default false)
ApiHBaseReplicationSetupCommandArgs body = new ApiHBaseReplicationSetupCommandArgs(); // ApiHBaseReplicationSetupCommandArgs | 
try {
    ApiCommand result = apiInstance.hbaseReplicationSetup(clusterName, serviceName, force, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationSetup");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The service name.
force Boolean If true, perform setup even if already setup. (Default false) [optional] [default to false]
body ApiHBaseReplicationSetupCommandArgs [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hbaseReplicationSetupAdmin

ApiCommand hbaseReplicationSetupAdmin(clusterName, serviceName, cmPeerDefinition, op, path, user)

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | 
String cmPeerDefinition = "cmPeerDefinition_example"; // String | 
String op = "op_example"; // String | 
String path = "path_example"; // String | 
String user = "user_example"; // String | 
try {
    ApiCommand result = apiInstance.hbaseReplicationSetupAdmin(clusterName, serviceName, cmPeerDefinition, op, path, user);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseReplicationSetupAdmin");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String
cmPeerDefinition String [optional]
op String [optional]
path String [optional]
user String [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hbaseShellCommand

ApiCommand hbaseShellCommand(clusterName, serviceName, body)

Execute a hbase shell command.

Execute a hbase shell command

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HBase service name
ApiHBaseShellCommand body = new ApiHBaseShellCommand(); // ApiHBaseShellCommand | hbase shell command to be executed
try {
    ApiCommand result = apiInstance.hbaseShellCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseShellCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HBase service name
body ApiHBaseShellCommand hbase shell command to be executed [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hbaseUpgradeCommand

ApiCommand hbaseUpgradeCommand(clusterName, serviceName)

Upgrade HBase data in HDFS and ZooKeeper as part of upgrade from CDH4 to CDH5.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HBase service name.
try {
    ApiCommand result = apiInstance.hbaseUpgradeCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hbaseUpgradeCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HBase service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsAddSBNNToNSCommand

ApiCommand hdfsAddSBNNToNSCommand(clusterName, serviceName, body)

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | 
ApiAddSBNNToNSArguments body = new ApiAddSBNNToNSArguments(); // ApiAddSBNNToNSArguments | 
try {
    ApiCommand result = apiInstance.hdfsAddSBNNToNSCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsAddSBNNToNSCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String
body ApiAddSBNNToNSArguments [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsCreateTmpDir

ApiCommand hdfsCreateTmpDir(clusterName, serviceName)

Creates a tmp directory on the HDFS filesystem.

Creates a tmp directory on the HDFS filesystem.

Available since API v2.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | Name of the HDFS service on which to run the command.
try {
    ApiCommand result = apiInstance.hdfsCreateTmpDir(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsCreateTmpDir");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String Name of the HDFS service on which to run the command.

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsDisableAutoFailoverCommand

ApiCommand hdfsDisableAutoFailoverCommand(clusterName, serviceName, body)

Disable auto-failover for a highly available HDFS nameservice.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name.
String body = "body_example"; // String | The nameservice name.
try {
    ApiCommand result = apiInstance.hdfsDisableAutoFailoverCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsDisableAutoFailoverCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name.
body String The nameservice name. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsDisableHaCommand

ApiCommand hdfsDisableHaCommand(clusterName, serviceName, body)

Disable high availability (HA) for an HDFS NameNode.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name.
ApiHdfsDisableHaArguments body = new ApiHdfsDisableHaArguments(); // ApiHdfsDisableHaArguments | Arguments for the command.
try {
    ApiCommand result = apiInstance.hdfsDisableHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsDisableHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name.
body ApiHdfsDisableHaArguments Arguments for the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsDisableNnHaCommand

ApiCommand hdfsDisableNnHaCommand(clusterName, serviceName, body)

Disable High Availability (HA) with Automatic Failover for an HDFS NameNode.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name.
ApiDisableNnHaArguments body = new ApiDisableNnHaArguments(); // ApiDisableNnHaArguments | Arguments for the command.
try {
    ApiCommand result = apiInstance.hdfsDisableNnHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsDisableNnHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name.
body ApiDisableNnHaArguments Arguments for the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsEnableAutoFailoverCommand

ApiCommand hdfsEnableAutoFailoverCommand(clusterName, serviceName, body)

Enable auto-failover for an HDFS nameservice.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name.
ApiHdfsFailoverArguments body = new ApiHdfsFailoverArguments(); // ApiHdfsFailoverArguments | Arguments for the command.
try {
    ApiCommand result = apiInstance.hdfsEnableAutoFailoverCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsEnableAutoFailoverCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name.
body ApiHdfsFailoverArguments Arguments for the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsEnableHaCommand

ApiCommand hdfsEnableHaCommand(clusterName, serviceName, body)

Enable high availability (HA) for an HDFS NameNode.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name.
ApiHdfsHaArguments body = new ApiHdfsHaArguments(); // ApiHdfsHaArguments | Arguments for the command.
try {
    ApiCommand result = apiInstance.hdfsEnableHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsEnableHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name.
body ApiHdfsHaArguments Arguments for the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsEnableNnHaCommand

ApiCommand hdfsEnableNnHaCommand(clusterName, serviceName, body)

Enable High Availability (HA) with Automatic Failover for an HDFS NameNode.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name.
ApiEnableNnHaArguments body = new ApiEnableNnHaArguments(); // ApiEnableNnHaArguments | Arguments for the command.
try {
    ApiCommand result = apiInstance.hdfsEnableNnHaCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsEnableNnHaCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name.
body ApiEnableNnHaArguments Arguments for the command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsFailoverCommand

ApiCommand hdfsFailoverCommand(clusterName, serviceName, force, body)

Initiate a failover in an HDFS HA NameNode pair.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name.
Boolean force = false; // Boolean | Whether to force failover.
ApiRoleNameList body = new ApiRoleNameList(); // ApiRoleNameList | Names of the NameNodes in the HA pair.
try {
    ApiCommand result = apiInstance.hdfsFailoverCommand(clusterName, serviceName, force, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsFailoverCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name.
force Boolean Whether to force failover. [optional] [default to false]
body ApiRoleNameList Names of the NameNodes in the HA pair. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsFinalizeRollingUpgrade

ApiCommand hdfsFinalizeRollingUpgrade(clusterName, serviceName)

Finalizes the rolling upgrade for HDFS by updating the NameNode metadata permanently to the next version.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name.
try {
    ApiCommand result = apiInstance.hdfsFinalizeRollingUpgrade(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsFinalizeRollingUpgrade");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsRollEditsCommand

ApiCommand hdfsRollEditsCommand(clusterName, serviceName, body)

Roll the edits of an HDFS NameNode or Nameservice.

Roll the edits of an HDFS NameNode or Nameservice.

Available since API v3.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name.
ApiRollEditsArgs body = new ApiRollEditsArgs(); // ApiRollEditsArgs | Arguments to the Roll Edits command.
try {
    ApiCommand result = apiInstance.hdfsRollEditsCommand(clusterName, serviceName, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsRollEditsCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name.
body ApiRollEditsArgs Arguments to the Roll Edits command. [optional]

Return type

ApiCommand

Authorization

basic

HTTP request headers

hdfsUpgradeMetadataCommand

ApiCommand hdfsUpgradeMetadataCommand(clusterName, serviceName)

Upgrade HDFS Metadata as part of a major version upgrade.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The HDFS service name.
try {
    ApiCommand result = apiInstance.hdfsUpgradeMetadataCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hdfsUpgradeMetadataCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The HDFS service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

hiveCreateMetastoreDatabaseCommand

ApiCommand hiveCreateMetastoreDatabaseCommand(clusterName, serviceName)

Create the Hive Metastore Database.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | Name of the Hive service on which to run the command.
try {
    ApiCommand result = apiInstance.hiveCreateMetastoreDatabaseCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hiveCreateMetastoreDatabaseCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String Name of the Hive service on which to run the command.

Return type

ApiCommand

Authorization

basic

HTTP request headers

hiveCreateMetastoreDatabaseTablesCommand

ApiCommand hiveCreateMetastoreDatabaseTablesCommand(clusterName, serviceName)

Create the Hive Metastore Database tables.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | Name of the Hive service on which to run the command.
try {
    ApiCommand result = apiInstance.hiveCreateMetastoreDatabaseTablesCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hiveCreateMetastoreDatabaseTablesCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String Name of the Hive service on which to run the command.

Return type

ApiCommand

Authorization

basic

HTTP request headers

hiveUpdateMetastoreNamenodesCommand

ApiCommand hiveUpdateMetastoreNamenodesCommand(clusterName, serviceName)

Update Hive Metastore to point to a NameNode's Nameservice name instead of hostname.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | Name of the Hive service on which to run the command.
try {
    ApiCommand result = apiInstance.hiveUpdateMetastoreNamenodesCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hiveUpdateMetastoreNamenodesCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String Name of the Hive service on which to run the command.

Return type

ApiCommand

Authorization

basic

HTTP request headers

hiveUpgradeMetastoreCommand

ApiCommand hiveUpgradeMetastoreCommand(clusterName, serviceName)

Upgrade Hive Metastore as part of a major version upgrade.

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.

Example

// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.ServicesResourceApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

ServicesResourceApi apiInstance = new ServicesResourceApi();
String clusterName = "clusterName_example"; // String | 
String serviceName = "serviceName_example"; // String | The Hive service name.
try {
    ApiCommand result = apiInstance.hiveUpgradeMetastoreCommand(clusterName, serviceName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ServicesResourceApi#hiveUpgradeMetastoreCommand");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
clusterName String
serviceName String The Hive service name.

Return type

ApiCommand

Authorization

basic

HTTP request headers

hiveValidateMetastoreSchemaCommand

ApiCommand hiveValidateMetastoreSchemaCommand(clusterName, serviceName)

Validate the Hive Metastore Schema.

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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the Hive service on which to run the command.
    try {
        ApiCommand result = apiInstance.hiveValidateMetastoreSchemaCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#hiveValidateMetastoreSchemaCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the Hive service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    hueDumpDbCommand

    ApiCommand hueDumpDbCommand(clusterName, serviceName)

    Runs Hue's dumpdata command.

    Runs Hue's dumpdata command. Available since API v10.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The name of the service
    try {
        ApiCommand result = apiInstance.hueDumpDbCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#hueDumpDbCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The name of the service

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    hueLoadDbCommand

    ApiCommand hueLoadDbCommand(clusterName, serviceName)

    Runs Hue's loaddata command.

    Runs Hue's loaddata command. Available since API v10.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The name of the service
    try {
        ApiCommand result = apiInstance.hueLoadDbCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#hueLoadDbCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The name of the service

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    hueSyncDbCommand

    ApiCommand hueSyncDbCommand(clusterName, serviceName)

    Runs Hue's syncdb command.

    Runs Hue's syncdb command. Available since API v10.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The name of the service
    try {
        ApiCommand result = apiInstance.hueSyncDbCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#hueSyncDbCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The name of the service

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    impalaCreateCatalogDatabaseCommand

    ApiCommand impalaCreateCatalogDatabaseCommand(clusterName, 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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the Impala service on which to run the command.
    try {
        ApiCommand result = apiInstance.impalaCreateCatalogDatabaseCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#impalaCreateCatalogDatabaseCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the Impala service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    impalaCreateCatalogDatabaseTablesCommand

    ApiCommand impalaCreateCatalogDatabaseTablesCommand(clusterName, 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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the Impala service on which to run the command.
    try {
        ApiCommand result = apiInstance.impalaCreateCatalogDatabaseTablesCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#impalaCreateCatalogDatabaseTablesCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the Impala service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    importMrConfigsIntoYarn

    ApiCommand importMrConfigsIntoYarn(clusterName, serviceName)

    Import MapReduce configuration into Yarn, overwriting Yarn configuration.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the Yarn service on which to run the command.
    try {
        ApiCommand result = apiInstance.importMrConfigsIntoYarn(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#importMrConfigsIntoYarn");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the Yarn service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    initSolrCommand

    ApiCommand initSolrCommand(clusterName, serviceName)

    Initializes the Solr service in Zookeeper.

    Initializes the Solr service in Zookeeper.

    Available since API v4.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The Solr service name.
    try {
        ApiCommand result = apiInstance.initSolrCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#initSolrCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The Solr service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    installMrFrameworkJars

    ApiCommand installMrFrameworkJars(clusterName, serviceName)

    Creates an HDFS directory to hold the MapReduce2 framework JARs (if necessary), and uploads the framework JARs to it.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the YARN service on which to run the command.
    try {
        ApiCommand result = apiInstance.installMrFrameworkJars(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#installMrFrameworkJars");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the YARN service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    installOozieShareLib

    ApiCommand installOozieShareLib(clusterName, serviceName)

    Creates directory for Oozie user in HDFS and installs the ShareLib in it.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the Oozie service on which to run the command.
    try {
        ApiCommand result = apiInstance.installOozieShareLib(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#installOozieShareLib");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the Oozie service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    ksMigrateToSentry

    ApiCommand ksMigrateToSentry(clusterName, serviceName)

    Migrates the HBase Indexer policy-based permissions to Sentry, by invoking the SentryConfigToolIndexer.

    Migrates the HBase Indexer policy-based permissions to Sentry, by invoking the SentryConfigToolIndexer.

    Note:

  • Available since API v30.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | A String representing the KeyStore Indexer service name.
    try {
        ApiCommand result = apiInstance.ksMigrateToSentry(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#ksMigrateToSentry");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String A String representing the KeyStore Indexer service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    listActiveCommands

    ApiCommandList listActiveCommands(clusterName, serviceName, commandName, view)

    List active service commands.

    List active service commands.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service to which the role belongs.
    String commandName = "commandName_example"; // String | the command name, unique for the command class HdfsCreateSnapshotCommand#COMMAND_NAME
    String view = "summary"; // String | The view of the data to materialize, either \"summary\" or \"full\".
    try {
        ApiCommandList result = apiInstance.listActiveCommands(clusterName, serviceName, commandName, view);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#listActiveCommands");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service to which the role belongs.
    commandName String the command name, unique for the command class HdfsCreateSnapshotCommand#COMMAND_NAME [optional]
    view String The view of the data to materialize, either "summary" or "full". [optional] [default to summary] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY]

    Return type

    ApiCommandList

    Authorization

    basic

    HTTP request headers

    listRoleTypes

    ApiRoleTypeList listRoleTypes(clusterName, serviceName)

    List the supported role types for a service.

    List the supported role types for a service.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service to modify.
    try {
        ApiRoleTypeList result = apiInstance.listRoleTypes(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#listRoleTypes");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service to modify.

    Return type

    ApiRoleTypeList

    Authorization

    basic

    HTTP request headers

    listServiceCommands

    ApiCommandMetadataList listServiceCommands(clusterName, serviceName)

    Lists all the commands (for CSD based services only) that can be executed by name on the provided service.

    Lists all the commands (for CSD based services only) that can be executed by name on the provided service.

    Available since API v6.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service name.
    try {
        ApiCommandMetadataList result = apiInstance.listServiceCommands(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#listServiceCommands");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service name.

    Return type

    ApiCommandMetadataList

    Authorization

    basic

    HTTP request headers

    offlineCommand

    ApiCommand offlineCommand(clusterName, serviceName, timeout, body)

    Offline roles of a service.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service name.
    java.math.BigDecimal timeout = new java.math.BigDecimal(); // java.math.BigDecimal | 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).
    ApiRoleNameList body = new ApiRoleNameList(); // ApiRoleNameList | List of role names to offline.
    try {
        ApiCommand result = apiInstance.offlineCommand(clusterName, serviceName, timeout, body);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#offlineCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service name.
    timeout java.math.BigDecimal 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). [optional]
    body ApiRoleNameList List of role names to offline. [optional]

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    oozieCreateEmbeddedDatabaseCommand

    ApiCommand oozieCreateEmbeddedDatabaseCommand(clusterName, serviceName)

    Create the Oozie Server Database.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the Oozie service on which to run the command.
    try {
        ApiCommand result = apiInstance.oozieCreateEmbeddedDatabaseCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#oozieCreateEmbeddedDatabaseCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the Oozie service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    oozieDumpDatabaseCommand

    ApiCommand oozieDumpDatabaseCommand(clusterName, serviceName)

    Dump the Oozie Server Database.

    Dump the Oozie Server Database.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The name of the service
    try {
        ApiCommand result = apiInstance.oozieDumpDatabaseCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#oozieDumpDatabaseCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The name of the service

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    oozieLoadDatabaseCommand

    ApiCommand oozieLoadDatabaseCommand(clusterName, serviceName)

    Load the Oozie Server Database from dump.

    Load the Oozie Server Database from dump.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The name of the service
    try {
        ApiCommand result = apiInstance.oozieLoadDatabaseCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#oozieLoadDatabaseCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The name of the service

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    oozieUpgradeDbCommand

    ApiCommand oozieUpgradeDbCommand(clusterName, serviceName)

    Upgrade Oozie Database schema as part of a major version upgrade.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The Oozie service name.
    try {
        ApiCommand result = apiInstance.oozieUpgradeDbCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#oozieUpgradeDbCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The Oozie service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    readService

    ApiService readService(clusterName, serviceName, view)

    Retrieves details information about a service.

    Retrieves details information about a service.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service name.
    String view = "full"; // String | DataView to materialize. Defaults to 'full'.
    try {
        ApiService result = apiInstance.readService(clusterName, serviceName, view);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#readService");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service name.
    view String DataView to materialize. Defaults to 'full'. [optional] [default to full] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY]

    Return type

    ApiService

    Authorization

    basic

    HTTP request headers

    readServiceConfig

    ApiServiceConfig readServiceConfig(clusterName, serviceName, view)

    Retrieves the configuration of a specific service.

    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).

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service to query.
    String view = "summary"; // String | The view of the data to materialize, either \"summary\" or \"full\".
    try {
        ApiServiceConfig result = apiInstance.readServiceConfig(clusterName, serviceName, view);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#readServiceConfig");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service to query.
    view String The view of the data to materialize, either "summary" or "full". [optional] [default to summary] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY]

    Return type

    ApiServiceConfig

    Authorization

    basic

    HTTP request headers

    readServices

    ApiServiceList readServices(clusterName, view)

    Lists all services registered in the cluster.

    Lists all services registered in the cluster.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String view = "summary"; // String | 
    try {
        ApiServiceList result = apiInstance.readServices(clusterName, view);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#readServices");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    view String [optional] [default to summary] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY]

    Return type

    ApiServiceList

    Authorization

    basic

    HTTP request headers

    readTags

    List<ApiEntityTag> readTags(clusterName, serviceName, limit, offset)

    Returns the tags associated with this service.

    Returns the tags associated with this service. Tag names beginning with the prefix cldr (case insensitive) are reserved for internal use by Cloudera.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The name of the service
    java.math.BigDecimal limit = new java.math.BigDecimal(); // java.math.BigDecimal | Number of tags
    java.math.BigDecimal offset = new java.math.BigDecimal(); // java.math.BigDecimal | Index of the first tag to retrieve
    try {
        List<ApiEntityTag> result = apiInstance.readTags(clusterName, serviceName, limit, offset);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#readTags");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The name of the service
    limit java.math.BigDecimal Number of tags [optional] [default to 10]
    offset java.math.BigDecimal Index of the first tag to retrieve [optional] [default to 0]

    Return type

    List<ApiEntityTag>

    Authorization

    basic

    HTTP request headers

    recommissionCommand

    ApiCommand recommissionCommand(clusterName, serviceName, body)

    Recommission roles of a service.

    Recommission roles of a service.

    The list should contain names of slave roles to recommission.

    Available since API v2.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the service on which to run the command.
    ApiRoleNameList body = new ApiRoleNameList(); // ApiRoleNameList | List of role names to recommision.
    try {
        ApiCommand result = apiInstance.recommissionCommand(clusterName, serviceName, body);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#recommissionCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the service on which to run the command.
    body ApiRoleNameList List of role names to recommision. [optional]

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    recommissionWithStartCommand

    ApiCommand recommissionWithStartCommand(clusterName, serviceName, body)

    Start and recommission roles of a service.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the service on which to run the command.
    ApiRoleNameList body = new ApiRoleNameList(); // ApiRoleNameList | List of role names to recommision.
    try {
        ApiCommand result = apiInstance.recommissionWithStartCommand(clusterName, serviceName, body);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#recommissionWithStartCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the service on which to run the command.
    body ApiRoleNameList List of role names to recommision. [optional]

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    restartCommand

    ApiCommand restartCommand(clusterName, serviceName)

    Restart the service.

    Restart the service.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service to start.
    try {
        ApiCommand result = apiInstance.restartCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#restartCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service to start.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    rollingRestart

    ApiCommand rollingRestart(clusterName, serviceName, body)

    Command to run rolling restart of roles in a service.

    Command to run rolling restart of roles in a service. The sequence is:

    1. Restart all the non-slave roles
    2. If slaves are present restart them in batches of size specified in RollingRestartCmdArgs
    3. Perform any post-command needed after rolling restart

    Available since API v3. Only available with Cloudera Manager Enterprise Edition.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | 
    ApiRollingRestartArgs body = new ApiRollingRestartArgs(); // ApiRollingRestartArgs | 
    try {
        ApiCommand result = apiInstance.rollingRestart(clusterName, serviceName, body);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#rollingRestart");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String
    body ApiRollingRestartArgs [optional]

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    sentryCreateDatabaseCommand

    ApiCommand sentryCreateDatabaseCommand(clusterName, serviceName)

    Create the Sentry Server Database.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the Sentry service on which to run the command.
    try {
        ApiCommand result = apiInstance.sentryCreateDatabaseCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#sentryCreateDatabaseCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the Sentry service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    sentryCreateDatabaseTablesCommand

    ApiCommand sentryCreateDatabaseTablesCommand(clusterName, serviceName)

    Create the Sentry Server Database tables.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the Sentry service on which to run the command.
    try {
        ApiCommand result = apiInstance.sentryCreateDatabaseTablesCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#sentryCreateDatabaseTablesCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the Sentry service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    sentryUpgradeDatabaseTablesCommand

    ApiCommand sentryUpgradeDatabaseTablesCommand(clusterName, serviceName)

    Upgrade the Sentry Server Database tables.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the Sentry service on which to run the command.
    try {
        ApiCommand result = apiInstance.sentryUpgradeDatabaseTablesCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#sentryUpgradeDatabaseTablesCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the Sentry service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    serviceCommandByName

    ApiCommand serviceCommandByName(clusterName, commandName, serviceName)

    Executes a command on the service specified by name.

    Executes a command on the service specified by name.

    Available since API v6.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String commandName = "commandName_example"; // String | The command name.
    String serviceName = "serviceName_example"; // String | The service name.
    try {
        ApiCommand result = apiInstance.serviceCommandByName(clusterName, commandName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#serviceCommandByName");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    commandName String The command name.
    serviceName String The service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    solrBootstrapCollectionsCommand

    ApiCommand solrBootstrapCollectionsCommand(clusterName, serviceName)

    Bootstraps Solr Collections after the CDH upgrade.

    Bootstraps Solr Collections after the CDH upgrade.

    Note: This is only needed for upgrading to CDH6.0.

    Available since API v30.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | A String representing the Solr service name.
    try {
        ApiCommand result = apiInstance.solrBootstrapCollectionsCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#solrBootstrapCollectionsCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String A String representing the Solr service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    solrBootstrapConfigCommand

    ApiCommand solrBootstrapConfigCommand(clusterName, serviceName)

    Bootstraps Solr config during the CDH upgrade.

    Bootstraps Solr config during the CDH upgrade.

    Note: This is only needed for upgrading to CDH6.0.

    Available since API v30.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | A String representing the Solr service name.
    try {
        ApiCommand result = apiInstance.solrBootstrapConfigCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#solrBootstrapConfigCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String A String representing the Solr service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    solrConfigBackupCommand

    ApiCommand solrConfigBackupCommand(clusterName, serviceName)

    Backs up Solr configuration metadata before CDH upgrade.

    Backs up Solr configuration metadata before CDH upgrade.

    Note:

  • Available since API v30.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | A String representing the Solr service name.
    try {
        ApiCommand result = apiInstance.solrConfigBackupCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#solrConfigBackupCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String A String representing the Solr service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    solrMigrateSentryPrivilegesCommand

    ApiCommand solrMigrateSentryPrivilegesCommand(clusterName, serviceName)

    Migrates Sentry privileges to new model compatible to support more granular permissions if Solr is configured with a Sentry service.

    Migrates Sentry privileges to new model compatible to support more granular permissions if Solr is configured with a Sentry service.

    Note:

  • Available since API v30.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | A String representing the Solr service name.
    try {
        ApiCommand result = apiInstance.solrMigrateSentryPrivilegesCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#solrMigrateSentryPrivilegesCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String A String representing the Solr service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    solrReinitializeStateForUpgradeCommand

    ApiCommand solrReinitializeStateForUpgradeCommand(clusterName, serviceName)

    Reinitializes the Solr state by clearing the Solr HDFS data directory, the Solr data directory, and the Zookeeper state.

    Reinitializes the Solr state by clearing the Solr HDFS data directory, the Solr data directory, and the Zookeeper state.

    Note:

  • Available since API v30.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | A String representing the Solr service name.
    try {
        ApiCommand result = apiInstance.solrReinitializeStateForUpgradeCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#solrReinitializeStateForUpgradeCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String A String representing the Solr service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    solrValidateMetadataCommand

    ApiCommand solrValidateMetadataCommand(clusterName, serviceName)

    Validates Solr metadata and configurations.

    Validates Solr metadata and configurations.

    Note: This is only needed for upgrading to CDH6.0.

    Available since API v30.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | A String representing the Solr service name.
    try {
        ApiCommand result = apiInstance.solrValidateMetadataCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#solrValidateMetadataCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String A String representing the Solr service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    sqoopCreateDatabaseTablesCommand

    ApiCommand sqoopCreateDatabaseTablesCommand(clusterName, serviceName)

    Create the Sqoop2 Server Database tables.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the Sentry service on which to run the command.
    try {
        ApiCommand result = apiInstance.sqoopCreateDatabaseTablesCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#sqoopCreateDatabaseTablesCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the Sentry service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    sqoopUpgradeDbCommand

    ApiCommand sqoopUpgradeDbCommand(clusterName, serviceName)

    Upgrade Sqoop Database schema as part of a major version upgrade.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The Sqoop service name.
    try {
        ApiCommand result = apiInstance.sqoopUpgradeDbCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#sqoopUpgradeDbCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The Sqoop service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    startCommand

    ApiCommand startCommand(clusterName, serviceName)

    Start the service.

    Start the service.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service to start.
    try {
        ApiCommand result = apiInstance.startCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#startCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service to start.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    stopCommand

    ApiCommand stopCommand(clusterName, serviceName)

    Stop the service.

    Stop the service.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service to stop.
    try {
        ApiCommand result = apiInstance.stopCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#stopCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service to stop.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    switchToMr2

    ApiCommand switchToMr2(clusterName, serviceName)

    Change the cluster to use MR2 instead of MR1.

    Change the cluster to use MR2 instead of MR1. Services will be restarted.

    Will perform the following steps:

    Available since API v6.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | Name of the Yarn service on which to run the command.
    try {
        ApiCommand result = apiInstance.switchToMr2(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#switchToMr2");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String Name of the Yarn service on which to run the command.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    updateService

    ApiService updateService(clusterName, serviceName, body)

    Updates service information.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service name.
    ApiService body = new ApiService(); // ApiService | Updated service information.
    try {
        ApiService result = apiInstance.updateService(clusterName, serviceName, body);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#updateService");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service name.
    body ApiService Updated service information. [optional]

    Return type

    ApiService

    Authorization

    basic

    HTTP request headers

    updateServiceConfig

    ApiServiceConfig updateServiceConfig(clusterName, serviceName, message, body)

    Updates the service configuration with the given values.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service to modify.
    String message = "message_example"; // String | Optional message describing the changes.
    ApiServiceConfig body = new ApiServiceConfig(); // ApiServiceConfig | Configuration changes.
    try {
        ApiServiceConfig result = apiInstance.updateServiceConfig(clusterName, serviceName, message, body);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#updateServiceConfig");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service to modify.
    message String Optional message describing the changes. [optional]
    body ApiServiceConfig Configuration changes. [optional]

    Return type

    ApiServiceConfig

    Authorization

    basic

    HTTP request headers

    yarnFormatStateStore

    ApiCommand yarnFormatStateStore(clusterName, serviceName)

    Formats the state store in ZooKeeper used for Resource Manager High Availability.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The YARN service name.
    try {
        ApiCommand result = apiInstance.yarnFormatStateStore(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#yarnFormatStateStore");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The YARN service name.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    zooKeeperCleanupCommand

    ApiCommand zooKeeperCleanupCommand(clusterName, serviceName)

    Clean up all running server instances of a ZooKeeper service.

    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.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service to start.
    try {
        ApiCommand result = apiInstance.zooKeeperCleanupCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#zooKeeperCleanupCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service to start.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers

    zooKeeperInitCommand

    ApiCommand zooKeeperInitCommand(clusterName, serviceName)

    Initializes all the server instances of a ZooKeeper service.

    Initializes all the server instances of a ZooKeeper service.

    ZooKeeper server roles need to be initialized before they can be used.

    Example

    // Import classes:
    //import com.cloudera.api.swagger.client.ApiClient;
    //import com.cloudera.api.swagger.client.ApiException;
    //import com.cloudera.api.swagger.client.Configuration;
    //import com.cloudera.api.swagger.client.auth.*;
    //import com.cloudera.api.swagger.ServicesResourceApi;
    
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: basic
    HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
    basic.setUsername("YOUR USERNAME");
    basic.setPassword("YOUR PASSWORD");
    
    ServicesResourceApi apiInstance = new ServicesResourceApi();
    String clusterName = "clusterName_example"; // String | 
    String serviceName = "serviceName_example"; // String | The service to start.
    try {
        ApiCommand result = apiInstance.zooKeeperInitCommand(clusterName, serviceName);
        System.out.println(result);
    } catch (ApiException e) {
        System.err.println("Exception when calling ServicesResourceApi#zooKeeperInitCommand");
        e.printStackTrace();
    }
    

    Parameters

    Name Type Description Notes
    clusterName String
    serviceName String The service to start.

    Return type

    ApiCommand

    Authorization

    basic

    HTTP request headers