All URIs are relative to https://localhost/api/v55
Method | HTTP request | Description |
---|---|---|
addTags | PUT /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/tags | Attach tags to the role. |
bulkDeleteRoles | POST /clusters/{clusterName}/services/{serviceName}/roles/bulkDelete | Bulk delete roles in a particular service by name. |
createRoles | POST /clusters/{clusterName}/services/{serviceName}/roles | Create new roles in a given service. |
deleteRole | DELETE /clusters/{clusterName}/services/{serviceName}/roles/{roleName} | Deletes a role from a given service. |
deleteTags | DELETE /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/tags | Remove the tags associated with the role. |
enterMaintenanceMode | POST /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/commands/enterMaintenanceMode | Put the role into maintenance mode. |
exitMaintenanceMode | POST /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/commands/exitMaintenanceMode | Take the role out of maintenance mode. |
getFullLog | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/logs/full | Retrieves the log file for the role's main process. |
getMetrics | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/metrics | Fetch metric readings for a particular role. |
getStacksLog | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/logs/stacks | Retrieves the stacks log file, if any, for the role's main process. |
getStacksLogsBundle | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/logs/stacksBundle | Download a zip-compressed archive of role stacks logs. |
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. |
impalaDiagnostics | POST /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/commands/impalaDiagnostics | Collects diagnostics data for an Impala role. |
listActiveCommands | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/commands | List active role commands. |
listCommands | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/commandsByName | Lists all the commands that can be executed by name on the provided role. |
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. |
readTags | GET /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/tags | Returns the tags associated with this role. |
updateRoleConfig | PUT /clusters/{clusterName}/services/{serviceName}/roles/{roleName}/config | Updates the role configuration with the given values. |
List<ApiEntityTag> addTags(clusterName, roleName, serviceName, body)
Attach tags to the role.
Attach tags to the role. Tag names beginning with the prefix cldr (case insensitive) are reserved for internal use by Cloudera.
// 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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String roleName = "roleName_example"; // String | Name of the role
String serviceName = "serviceName_example"; // String |
List<ApiEntityTag> body = Arrays.asList(new ApiEntityTag()); // List<ApiEntityTag> | List of tags to add to the role
try {
List<ApiEntityTag> result = apiInstance.addTags(clusterName, roleName, serviceName, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#addTags");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | Name of the role | |
serviceName | String | ||
body | List<ApiEntityTag> | List of tags to add to the role | [optional] |
ApiRoleList bulkDeleteRoles(clusterName, serviceName, body)
Bulk delete roles in a particular service by name.
Bulk delete roles in a particular service by name. Fails if any role cannot be found.
// 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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String serviceName = "serviceName_example"; // String |
ApiRoleNameList body = new ApiRoleNameList(); // ApiRoleNameList | list of role names to be deleted
try {
ApiRoleList result = apiInstance.bulkDeleteRoles(clusterName, serviceName, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#bulkDeleteRoles");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | ||
body | ApiRoleNameList | list of role names to be deleted | [optional] |
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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
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 RolesResourceApi#createRoles");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | ||
body | ApiRoleList | Roles to create. | [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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
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 RolesResourceApi#deleteRole");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role name. | |
serviceName | String |
List<ApiEntityTag> deleteTags(clusterName, roleName, serviceName, body)
Remove the tags associated with the role.
Remove the tags associated with the role. Tag names beginning with the prefix cldr (case insensitive) are reserved for internal use by Cloudera.
// 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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String roleName = "roleName_example"; // String | Name of the role to remove tags from
String serviceName = "serviceName_example"; // String |
List<ApiEntityTag> body = Arrays.asList(new ApiEntityTag()); // List<ApiEntityTag> | A list of tags to remove from the role
try {
List<ApiEntityTag> result = apiInstance.deleteTags(clusterName, roleName, serviceName, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#deleteTags");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | Name of the role to remove tags from | |
serviceName | String | ||
body | List<ApiEntityTag> | A list of tags to remove from the role | [optional] |
ApiCommand enterMaintenanceMode(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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String roleName = "roleName_example"; // String | The role name.
String serviceName = "serviceName_example"; // String |
try {
ApiCommand result = apiInstance.enterMaintenanceMode(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#enterMaintenanceMode");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role name. | |
serviceName | String |
ApiCommand exitMaintenanceMode(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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String roleName = "roleName_example"; // String | The role name.
String serviceName = "serviceName_example"; // String |
try {
ApiCommand result = apiInstance.exitMaintenanceMode(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#exitMaintenanceMode");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role name. | |
serviceName | String |
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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
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 RolesResourceApi#getFullLog");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role to fetch logs from. | |
serviceName | String |
String
ApiMetricList getMetrics(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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
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(clusterName, roleName, serviceName, from, metrics, to, view);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#getMetrics");
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] |
String getStacksLog(clusterName, roleName, serviceName)
Retrieves the stacks log file, if any, for the role's main process.
Retrieves the stacks log file, if any, for the role's main process. Note that not all roles support periodic stacks collection. The 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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String roleName = "roleName_example"; // String | The role to fetch stacks logs from.
String serviceName = "serviceName_example"; // String |
try {
String result = apiInstance.getStacksLog(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#getStacksLog");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role to fetch stacks logs from. | |
serviceName | String |
String
File getStacksLogsBundle(clusterName, roleName, serviceName)
Download a zip-compressed archive of role stacks logs.
Download a zip-compressed archive of role stacks logs. Note that not all roles support periodic stacks collection.
// 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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String roleName = "roleName_example"; // String | The role to fetch the stacks logs bundle from.
String serviceName = "serviceName_example"; // String |
try {
File result = apiInstance.getStacksLogsBundle(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#getStacksLogsBundle");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role to fetch the stacks logs bundle from. | |
serviceName | String |
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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
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 RolesResourceApi#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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
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 RolesResourceApi#getStandardOutput");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role to fetch stdout from. | |
serviceName | String |
String
ApiCommand impalaDiagnostics(clusterName, roleName, serviceName, body)
Collects diagnostics data for an Impala role.
Collects diagnostics data for an Impala role.
Available since API v31.
// 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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String roleName = "roleName_example"; // String | The role name.
String serviceName = "serviceName_example"; // String |
ApiImpalaRoleDiagnosticsArgs body = new ApiImpalaRoleDiagnosticsArgs(); // ApiImpalaRoleDiagnosticsArgs |
try {
ApiCommand result = apiInstance.impalaDiagnostics(clusterName, roleName, serviceName, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#impalaDiagnostics");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role name. | |
serviceName | String | ||
body | ApiImpalaRoleDiagnosticsArgs | [optional] |
ApiCommandList listActiveCommands(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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
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(clusterName, roleName, serviceName, view);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#listActiveCommands");
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] |
ApiCommandMetadataList listCommands(clusterName, roleName, serviceName)
Lists all the commands that can be executed by name on the provided role.
Lists all the commands that can be executed by name on the provided 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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String roleName = "roleName_example"; // String | the role name.
String serviceName = "serviceName_example"; // String |
try {
ApiCommandMetadataList result = apiInstance.listCommands(clusterName, roleName, serviceName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#listCommands");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | the role name. | |
serviceName | String |
ApiRole readRole(clusterName, roleName, serviceName, view)
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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String roleName = "roleName_example"; // String | The role name.
String serviceName = "serviceName_example"; // String |
String view = "full"; // String | The view to materialize. Defaults to 'full'.
try {
ApiRole result = apiInstance.readRole(clusterName, roleName, serviceName, view);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#readRole");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The role name. | |
serviceName | String | ||
view | String | The view to materialize. Defaults to 'full'. | [optional] [default to full] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY] |
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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
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 RolesResourceApi#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, filter, view)
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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String serviceName = "serviceName_example"; // String |
String filter = ""; // String | Optional query to filter the roles by. <p> The query specifies the intersection of a list of constraints, joined together with semicolons (without spaces). For example: hostname==host1.abc.com;type==DATANODE </p> Currently supports filtering by: <ul> <li>hostname: The hostname of the host the role is running on.</li> <li>hostId: The unique identifier of the host the role is running on.</li> <li>type: The role's type.</li> </ul>
String view = "summary"; // String | DataView for getting roles. Defaults to 'summary'.
try {
ApiRoleList result = apiInstance.readRoles(clusterName, serviceName, filter, view);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#readRoles");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
serviceName | String | ||
filter | String | Optional query to filter the roles by. The query specifies the intersection of a list of constraints, joined together with semicolons (without spaces). For example: hostname==host1.abc.com;type==DATANODE Currently supports filtering by:
| [optional] [default to ] |
view | String | DataView for getting roles. Defaults to 'summary'. | [optional] [default to summary] [enum: EXPORT, EXPORT_REDACTED, FULL, FULL_WITH_HEALTH_CHECK_EXPLANATION, SUMMARY] |
List<ApiEntityTag> readTags(clusterName, roleName, serviceName, limit, offset)
Returns the tags associated with this role.
Returns the tags associated with this role. Tag names beginning with the prefix cldr (case insensitive) are reserved for internal use by Cloudera.
// 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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
String clusterName = "clusterName_example"; // String |
String roleName = "roleName_example"; // String | The name of the role
String serviceName = "serviceName_example"; // String |
java.math.BigDecimal limit = new java.math.BigDecimal(); // java.math.BigDecimal | Number of tags
java.math.BigDecimal offset = new java.math.BigDecimal(); // java.math.BigDecimal | Index of the first tag to retrieve
try {
List<ApiEntityTag> result = apiInstance.readTags(clusterName, roleName, serviceName, limit, offset);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RolesResourceApi#readTags");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
clusterName | String | ||
roleName | String | The name of the role | |
serviceName | String | ||
limit | java.math.BigDecimal | Number of tags | [optional] [default to 10] |
offset | java.math.BigDecimal | Index of the first tag to retrieve | [optional] [default to 0] |
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.RolesResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
RolesResourceApi apiInstance = new RolesResourceApi();
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 RolesResourceApi#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] |