All URIs are relative to https://localhost/api/v30
Method | HTTP request | Description |
---|---|---|
collectYarnApplicationDiagnostics | POST /clusters/{clusterName}/services/{serviceName}/commands/yarnApplicationDiagnosticsCollection | Collect the Diagnostics data for Yarn applications. |
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. |
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. |
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. |
createRoles | POST /clusters/{clusterName}/services/{serviceName}/roles | Create new roles in a given service. |
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. |
deleteRole | DELETE /clusters/{clusterName}/services/{serviceName}/roles/{roleName} | Deletes a role from a given service. |
deleteService | DELETE /clusters/{clusterName}/services/{serviceName} | Deletes a service from the system. |
deployClientConfigCommand | POST /clusters/{clusterName}/services/{serviceName}/commands/deployClientConfig | Deploy a service's client configuration. |
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. |
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. |
enterMaintenanceMode_0 | POST /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/commands/enterMaintenanceMode | Put the role into maintenance mode. |
exitMaintenanceMode | POST /clusters/{clusterName}/services/{serviceName}/commands/exitMaintenanceMode | Take the service out of maintenance mode. |
exitMaintenanceMode_0 | POST /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/commands/exitMaintenanceMode | Take the role out of maintenance mode. |
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. |
getFullLog | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/logs/full | Retrieves the log file for the role's main process. |
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. |
getMetrics_0 | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/metrics | Fetch metric readings for a particular role. |
getMrUsageReport | GET /clusters/{clusterName}/services/{serviceName}/reports/mrUsageReport | Fetch the MR usage report. |
getStandardError | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/logs/stderr | Retrieves the role's standard error output. |
getStandardOutput | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/logs/stdout | Retrieves the role's standard output. |
getYarnUtilization | GET /clusters/{clusterName}/services/{serviceName}/yarnUtilization | Provides the resource utilization of the yarn service as well as the resource utilization per tenant. |
hbaseUpgradeCommand | POST /clusters/{clusterName}/services/{serviceName}/commands/hbaseUpgrade | Upgrade HBase data in HDFS and ZooKeeper as part of upgrade from CDH4 to CDH5. |
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. |
listActiveCommands_0 | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/commands | List active role 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 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. |
readRole | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName} | Retrieves detailed information about a role. |
readRoleConfig | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/config | Retrieves the configuration of a specific role. |
readRoles | GET /clusters/{clusterName}/services/{serviceName}/roles | Lists all roles of a given service. |
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. |
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. |
updateRoleConfig | PUT /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/config | Updates the role configuration with the given values. |
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. |
ApiCommand collectYarnApplicationDiagnostics(clusterName, serviceName, body)
Collect the Diagnostics data for Yarn applications.
Collect the Diagnostics data for Yarn applications
Available since API v8.
// 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();
}
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] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Hue service name. |
ApiCommand createHBaseRootCommand(clusterName, serviceName)
Creates the root directory of an HBase service.
Creates the root directory of an HBase service.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HBase service name. |
ApiCommand createHiveUserDirCommand(clusterName, serviceName)
Create the Hive user directory.
Create the Hive user directory
Available since API v4.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Hive service name. |
ApiCommand createHiveWarehouseCommand(clusterName, serviceName)
Create the Hive warehouse directory, on Hive services.
Create the Hive warehouse directory, on Hive services.
Available since API v3.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Hive service name. |
ApiCommand createImpalaUserDirCommand(clusterName, serviceName)
Create the Impala user directory.
Create the Impala user directory
Available since API v6.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Impala service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Oozie service on which to run the command. |
ApiRoleList createRoles(clusterName, serviceName, body)
Create new roles in a given service.
Create new roles in a given service.
Service Type | Available Role Types |
---|---|
HDFS (CDH3) | NAMENODE, DATANODE, SECONDARYNAMENODE, BALANCER, GATEWAY |
HDFS (CDH4) | NAMENODE, DATANODE, SECONDARYNAMENODE, BALANCER, HTTPFS, FAILOVERCONTROLLER, GATEWAY, JOURNALNODE |
HDFS (CDH5) | NAMENODE, DATANODE, SECONDARYNAMENODE, BALANCER, HTTPFS, FAILOVERCONTROLLER, GATEWAY, JOURNALNODE, NFSGATEWAY | MAPREDUCE | JOBTRACKER, TASKTRACKER, GATEWAY, FAILOVERCONTROLLER, | HBASE | MASTER, REGIONSERVER, GATEWAY, HBASETHRIFTSERVER, HBASERESTSERVER |
YARN | RESOURCEMANAGER, NODEMANAGER, JOBHISTORY, GATEWAY |
OOZIE | OOZIE_SERVER |
ZOOKEEPER | SERVER |
HUE (CDH3) | HUE_SERVER, BEESWAX_SERVER, KT_RENEWER, JOBSUBD |
HUE (CDH4) | HUE_SERVER, BEESWAX_SERVER, KT_RENEWER |
HUE (CDH5) | HUE_SERVER, KT_RENEWER |
HUE (CDH5 5.5+) | HUE_SERVER, KT_RENEWER, HUE_LOAD_BALANCER |
FLUME | AGENT |
IMPALA (CDH4) | IMPALAD, STATESTORE, CATALOGSERVER |
IMPALA (CDH5) | IMPALAD, STATESTORE, CATALOGSERVER |
HIVE | HIVESERVER2, HIVEMETASTORE, WEBHCAT, GATEWAY |
SOLR | SOLR_SERVER, GATEWAY |
SQOOP | SQOOP_SERVER |
SQOOP_CLIENT | GATEWAY |
SENTRY | SENTRY_SERVER |
ACCUMULO16 | GARBAGE_COLLECTOR, GATEWAY, ACCUMULO16_MASTER, MONITOR, ACCUMULO16_TSERVER, TRACER |
KMS | KMS |
KS_INDEXER | HBASE_INDEXER |
SPARK_ON_YARN | GATEWAY, SPARK_YARN_HISTORY_SERVER |
// 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 |
ApiRoleList body = new ApiRoleList(); // ApiRoleList | Roles to create.
try {
ApiRoleList result = apiInstance.createRoles(clusterName, serviceName, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#createRoles");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | ||
body | ApiRoleList | Roles to create. | [optional] |
ApiServiceList createServices(clusterName, body)
Creates a list of services.
Creates a list of services.
There are typically two service creation strategies:
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 |
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
body | ApiServiceList | Details of the services to create. | [optional] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Solr service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Sqoop service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The YARN service name. |
ApiCommand createYarnJobHistoryDirCommand(clusterName, serviceName)
Create the Yarn job history directory.
Create the Yarn job history directory
Available since API v6.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The YARN service name. |
ApiCommand createYarnNodeManagerRemoteAppLogDirCommand(clusterName, serviceName)
Create the Yarn NodeManager remote application log directory.
Create the Yarn NodeManager remote application log directory
Available since API v6.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The YARN service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HBase service name. | |
body | ApiRoleNameList | List of role names to decommision. | [optional] |
ApiRole deleteRole(clusterName, roleName, serviceName)
Deletes a role from a given service.
Deletes a role from a given service.
// 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 roleName = "roleName_example"; // String | The role name.
String serviceName = "serviceName_example"; // String |
try {
ApiRole result = apiInstance.deleteRole(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#deleteRole");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role name. | |
serviceName | String |
ApiService deleteService(clusterName, serviceName)
Deletes a service from the system.
Deletes a service from the system.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The name of the service to delete. |
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.// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service name. | |
body | ApiRoleNameList | List of role names. | [optional] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The MapReduce service name. | |
body | ApiDisableJtHaArguments | Arguments for the command. | [optional] |
ApiCommand disableLlamaHaCommand(clusterName, serviceName, body)
Not Supported.
Not Supported. Llama was removed.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | ||
body | ApiDisableLlamaHaArguments | [optional] |
ApiCommand disableLlamaRmCommand(clusterName, serviceName)
Not Supported.
Not Supported. Llama was removed.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Oozie service name. | |
body | ApiDisableOozieHaArguments | Arguments for the command. | [optional] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The YARN service name. | |
body | ApiDisableRmHaArguments | Arguments for the command. | [optional] |
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.
// 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();
}
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] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The MapReduce service name. | |
body | ApiEnableJtHaArguments | Arguments for the command. | [optional] |
ApiCommand enableLlamaHaCommand(clusterName, serviceName, body)
Not Supported.
Not Supported. Llama was removed.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | ||
body | ApiEnableLlamaHaArguments | [optional] |
ApiCommand enableLlamaRmCommand(clusterName, serviceName, body)
Not Supported.
Not Supported. Llama was removed.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | ||
body | ApiEnableLlamaRmArguments | [optional] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Oozie service name. | |
body | ApiEnableOozieHaArguments | Arguments for the command. | [optional] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The YARN service name. | |
body | ApiEnableRmHaArguments | Arguments for the command. | [optional] |
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.
// 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();
}
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] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service name. |
ApiCommand enterMaintenanceMode_0(clusterName, roleName, serviceName)
Put the role into maintenance mode.
Put the role into maintenance mode. This is a synchronous command. The result is known immediately upon return.
Available since API v2.
// 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 roleName = "roleName_example"; // String | The role name.
String serviceName = "serviceName_example"; // String |
try {
ApiCommand result = apiInstance.enterMaintenanceMode_0(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#enterMaintenanceMode_0");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role name. | |
serviceName | String |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service name. |
ApiCommand exitMaintenanceMode_0(clusterName, roleName, serviceName)
Take the role out of maintenance mode.
Take the role out of maintenance mode. This is a synchronous command. The result is known immediately upon return.
Available since API v2.
// 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 roleName = "roleName_example"; // String | The role name.
String serviceName = "serviceName_example"; // String |
try {
ApiCommand result = apiInstance.exitMaintenanceMode_0(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#exitMaintenanceMode_0");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role name. | |
serviceName | String |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The name of the cluster. |
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.
// 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 {
apiInstance.getClientConfig(clusterName, serviceName);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#getClientConfig");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service name. |
null (empty response body)
String getFullLog(clusterName, roleName, serviceName)
Retrieves the log file for the role's main process.
Retrieves the log file for the role's main process.
If the role is not started, this will be the log file associated with the last time the role was run.
Log files are returned as plain text (type "text/plain").
// 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 roleName = "roleName_example"; // String | The role to fetch logs from.
String serviceName = "serviceName_example"; // String |
try {
String result = apiInstance.getFullLog(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#getFullLog");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role to fetch logs from. | |
serviceName | String |
String
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.
// 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();
}
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] |
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.
// 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.
Integer endHourOfDay = 23; // Integer | 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.
Integer startHourOfDay = 0; // Integer | 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();
}
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 | Integer | 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 | Integer | 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] |
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.
// 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();
}
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] |
ApiMetricList getMetrics_0(clusterName, roleName, serviceName, from, metrics, to, view)
Fetch metric readings for a particular role.
Fetch metric readings for a particular role.
By default, this call will look up all metrics available for the role. 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 role, even if no readings are available in the requested window.
// 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 roleName = "roleName_example"; // String | The name of the role.
String serviceName = "serviceName_example"; // String |
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_0(clusterName, roleName, serviceName, from, metrics, to, view);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#getMetrics_0");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The name of the role. | |
serviceName | String | ||
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] |
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.
// 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();
}
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] |
String getStandardError(clusterName, roleName, serviceName)
Retrieves the role's standard error output.
Retrieves the role's standard error output.
If the role is not started, this will be the output associated with the last time the role was run.
Log files are returned as plain text (type "text/plain").
// 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 roleName = "roleName_example"; // String | The role to fetch stderr from.
String serviceName = "serviceName_example"; // String |
try {
String result = apiInstance.getStandardError(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#getStandardError");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role to fetch stderr from. | |
serviceName | String |
String
String getStandardOutput(clusterName, roleName, serviceName)
Retrieves the role's standard output.
Retrieves the role's standard output.
If the role is not started, this will be the output associated with the last time the role was run.
Log files are returned as plain text (type "text/plain").
// 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 roleName = "roleName_example"; // String | The role to fetch stdout from.
String serviceName = "serviceName_example"; // String |
try {
String result = apiInstance.getStandardOutput(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#getStandardOutput");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role to fetch stdout from. | |
serviceName | String |
String
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.
// 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.
Integer endHourOfDay = 23; // Integer | 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.
Integer startHourOfDay = 0; // Integer | 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();
}
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 | Integer | 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 | Integer | 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] |
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.// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HBase service name. |
ApiCommand hdfsCreateTmpDir(clusterName, serviceName)
Creates a tmp directory on the HDFS filesystem.
Creates a tmp directory on the HDFS filesystem.
Available since API v2.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the HDFS service on which to run the command. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HDFS service name. | |
body | String | The nameservice name. | [optional] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HDFS service name. | |
body | ApiHdfsDisableHaArguments | Arguments for the command. | [optional] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HDFS service name. | |
body | ApiDisableNnHaArguments | Arguments for the command. | [optional] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HDFS service name. | |
body | ApiHdfsFailoverArguments | Arguments for the command. | [optional] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HDFS service name. | |
body | ApiHdfsHaArguments | Arguments for the command. | [optional] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HDFS service name. | |
body | ApiEnableNnHaArguments | Arguments for the command. | [optional] |
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.
// 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();
}
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] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HDFS service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HDFS service name. | |
body | ApiRollEditsArgs | Arguments to the Roll Edits command. | [optional] |
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.// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The HDFS service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Hive service on which to run the command. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Hive service on which to run the command. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Hive service on which to run the command. |
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.// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Hive service name. |
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:
Available since API v17.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Hive service on which to run the command. |
ApiCommand hueDumpDbCommand(clusterName, serviceName)
Runs Hue's dumpdata command.
Runs Hue's dumpdata command. Available since API v10.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The name of the service |
ApiCommand hueLoadDbCommand(clusterName, serviceName)
Runs Hue's loaddata command.
Runs Hue's loaddata command. Available since API v10.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The name of the service |
ApiCommand hueSyncDbCommand(clusterName, serviceName)
Runs Hue's syncdb command.
Runs Hue's syncdb command. Available since API v10.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The name of the service |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Impala service on which to run the command. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Impala service on which to run the command. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Yarn service on which to run the command. |
ApiCommand initSolrCommand(clusterName, serviceName)
Initializes the Solr service in Zookeeper.
Initializes the Solr service in Zookeeper.
Available since API v4.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Solr service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the YARN service on which to run the command. |
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.// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Oozie service on which to run the command. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | A String representing the KeyStore Indexer service name. |
ApiCommandList listActiveCommands(clusterName, serviceName, view)
List active service commands.
List active service commands.
// 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 view = "summary"; // String | The view of the data to materialize, either \"summary\" or \"full\".
try {
ApiCommandList result = apiInstance.listActiveCommands(clusterName, serviceName, view);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#listActiveCommands");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service to which the role belongs. | |
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] |
ApiCommandList listActiveCommands_0(clusterName, roleName, serviceName, view)
List active role commands.
List active role commands.
// 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 roleName = "roleName_example"; // String | The role to start.
String serviceName = "serviceName_example"; // String |
String view = "summary"; // String | The view of the data to materialize, either \"summary\" or \"full\".
try {
ApiCommandList result = apiInstance.listActiveCommands_0(clusterName, roleName, serviceName, view);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#listActiveCommands_0");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role to start. | |
serviceName | String | ||
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] |
ApiRoleTypeList listRoleTypes(clusterName, serviceName)
List the supported role types for a service.
List the supported role types for a service.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service to modify. |
ApiCommandMetadataList listServiceCommands(clusterName, serviceName)
Lists all the commands that can be executed by name on the provided service.
Lists all the commands that can be executed by name on the provided service.
Available since API v6.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service name. |
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.
// 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.
BigDecimal timeout = new BigDecimal(); // 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service name. | |
timeout | 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] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Oozie service on which to run the command. |
ApiCommand oozieDumpDatabaseCommand(clusterName, serviceName)
Dump the Oozie Server Database.
Dump the Oozie Server Database.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The name of the service |
ApiCommand oozieLoadDatabaseCommand(clusterName, serviceName)
Load the Oozie Server Database from dump.
Load the Oozie Server Database from dump.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The name of the service |
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.// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Oozie service name. |
ApiRole readRole(clusterName, roleName, serviceName)
Retrieves detailed information about a role.
Retrieves detailed information about a role.
// 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 roleName = "roleName_example"; // String | The role name.
String serviceName = "serviceName_example"; // String |
try {
ApiRole result = apiInstance.readRole(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#readRole");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role name. | |
serviceName | String |
ApiConfigList readRoleConfig(clusterName, roleName, serviceName, view)
Retrieves the configuration of a specific role.
Retrieves the configuration of a specific role. Note that the "full" view performs validation on the configuration, which could take a few seconds on a large cluster (around 500 nodes or more).
// 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 roleName = "roleName_example"; // String | The role to look up.
String serviceName = "serviceName_example"; // String |
String view = "summary"; // String | The view of the data to materialize, either \"summary\" or \"full\".
try {
ApiConfigList result = apiInstance.readRoleConfig(clusterName, roleName, serviceName, view);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#readRoleConfig");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role to look up. | |
serviceName | String | ||
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] |
ApiRoleList readRoles(clusterName, serviceName)
Lists all roles of a given service.
Lists all roles of a given service.
// 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 {
ApiRoleList result = apiInstance.readRoles(clusterName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#readRoles");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String |
ApiService readService(clusterName, serviceName, view)
Retrieves details information about a service.
Retrieves details information about a service.
// 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();
}
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] |
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).
// 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();
}
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] |
ApiServiceList readServices(clusterName, view)
Lists all services registered in the cluster.
Lists all services registered in the cluster.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
view | String | [optional] [default to summary] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY] |
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.
// 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();
}
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] |
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.
// 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();
}
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] |
ApiCommand restartCommand(clusterName, serviceName)
Restart the service.
Restart the service.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service to start. |
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:
Available since API v3. Only available with Cloudera Manager Enterprise Edition.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | ||
body | ApiRollingRestartArgs | [optional] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Sentry service on which to run the command. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Sentry service on which to run the command. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Sentry service on which to run the command. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
commandName | String | The command name. | |
serviceName | String | The service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | A String representing the Solr service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | A String representing the Solr service name. |
ApiCommand solrConfigBackupCommand(clusterName, serviceName)
Backs up Solr configuration metadata before CDH upgrade.
Backs up Solr configuration metadata before CDH upgrade.
Note:
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | A String representing the Solr service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | A String representing the Solr service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | A String representing the Solr service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | A String representing the Solr service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Sentry service on which to run the command. |
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.// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The Sqoop service name. |
ApiCommand startCommand(clusterName, serviceName)
Start the service.
Start the service.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service to start. |
ApiCommand stopCommand(clusterName, serviceName)
Stop the service.
Stop the service.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service to stop. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | Name of the Yarn service on which to run the command. |
ApiConfigList updateRoleConfig(clusterName, roleName, serviceName, message, body)
Updates the role configuration with the given values.
Updates the role configuration with the given values.
If a value is set in the given configuration, it will be added to the role'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.
// 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 roleName = "roleName_example"; // String | The role to modify.
String serviceName = "serviceName_example"; // String |
String message = "message_example"; // String | Optional message describing the changes.
ApiConfigList body = new ApiConfigList(); // ApiConfigList | Configuration changes.
try {
ApiConfigList result = apiInstance.updateRoleConfig(clusterName, roleName, serviceName, message, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesResourceApi#updateRoleConfig");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role to modify. | |
serviceName | String | ||
message | String | Optional message describing the changes. | [optional] |
body | ApiConfigList | Configuration changes. | [optional] |
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.// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service name. | |
body | ApiService | Updated service information. | [optional] |
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.
// 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();
}
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] |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The YARN service name. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service to start. |
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.
// 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();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | The service to start. |