All URIs are relative to /api/v58
| Method | HTTP request | Description |
|---|---|---|
| abortCommand | POST /commands/{commandId}/abort | |
| findCommandByCorrelationId | GET /commands/commandByCorrelationId/{correlationId} | |
| getCommandResultData | GET /commands/{commandId}/download | Download the end result of a command. |
| getCommandWithSteps | GET /commands/{commandId}/steps | |
| getStandardError | GET /commands/{commandId}/logs/stderr | |
| getStandardOutput | GET /commands/{commandId}/logs/stdout | |
| readCommand | GET /commands/{commandId} | |
| readCommands | GET /commands/commands | |
| replicationReport | GET /commands/{commandId}/replicationReport | |
| retry | POST /commands/{commandId}/retry |
ApiCommand abortCommand(commandId)
Abort a running command.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CommandsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CommandsResourceApi apiInstance = new CommandsResourceApi();
Long commandId = 789L; // Long | The command id.
try {
ApiCommand result = apiInstance.abortCommand(commandId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommandsResourceApi#abortCommand");
e.printStackTrace();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| commandId | Long | The command id. |
ApiCommand findCommandByCorrelationId(correlationId, startTime)
Retrieve command by the correlation ID that was provided at command creation. Used to recover command references when the command ID is not available.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CommandsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CommandsResourceApi apiInstance = new CommandsResourceApi();
String correlationId = "correlationId_example"; // String | Correlation ID provided at command creation
Long startTime = 789L; // Long | Timestamp from which the command was started
try {
ApiCommand result = apiInstance.findCommandByCorrelationId(correlationId, startTime);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommandsResourceApi#findCommandByCorrelationId");
e.printStackTrace();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| correlationId | String | Correlation ID provided at command creation | |
| startTime | Long | Timestamp from which the command was started | [optional] |
File getCommandResultData(commandId)
Download the end result of a command.
Download the end result of a command. Content-Type header is explicitly set in the implementation instead of using annotation. In case the MIME type is not set for the command result, application/octet-stream is set.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CommandsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CommandsResourceApi apiInstance = new CommandsResourceApi();
Long commandId = 789L; // Long | The command id.
try {
File result = apiInstance.getCommandResultData(commandId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommandsResourceApi#getCommandResultData");
e.printStackTrace();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| commandId | Long | The command id. |
ApiCommandWithSteps getCommandWithSteps(commandId)
Retrieve detailed information of an asynchronous command including the command steps.
Cloudera Manager keeps the results and statuses of asynchronous commands, which have non-negative command IDs. On the other hand, synchronous commands complete immediately, and their results are passed back in the return object of the command execution API call. Outside of that return object, there is no way to check the result of a synchronous command.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CommandsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CommandsResourceApi apiInstance = new CommandsResourceApi();
Long commandId = 789L; // Long | The command id.
try {
ApiCommandWithSteps result = apiInstance.getCommandWithSteps(commandId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommandsResourceApi#getCommandWithSteps");
e.printStackTrace();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| commandId | Long | The command id. |
File getStandardError(commandId)
Download a zip-compressed archive of standard error outputs for the command's one-off processes. Log files are returned zipped together.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CommandsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CommandsResourceApi apiInstance = new CommandsResourceApi();
Long commandId = 789L; // Long | The command id.
try {
File result = apiInstance.getStandardError(commandId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommandsResourceApi#getStandardError");
e.printStackTrace();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| commandId | Long | The command id. |
File getStandardOutput(commandId)
Download a zip-compressed archive of standard outputs for the command's one-off processes. Log files are returned zipped together.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CommandsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CommandsResourceApi apiInstance = new CommandsResourceApi();
Long commandId = 789L; // Long | The command id.
try {
File result = apiInstance.getStandardOutput(commandId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommandsResourceApi#getStandardOutput");
e.printStackTrace();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| commandId | Long | The command id. |
ApiCommand readCommand(commandId)
Retrieve detailed information on an asynchronous command.
Cloudera Manager keeps the results and statuses of asynchronous commands, which have non-negative command IDs. On the other hand, synchronous commands complete immediately, and their results are passed back in the return object of the command execution API call. Outside of that return object, there is no way to check the result of a synchronous command.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CommandsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CommandsResourceApi apiInstance = new CommandsResourceApi();
Long commandId = 789L; // Long | The command id.
try {
ApiCommand result = apiInstance.readCommand(commandId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommandsResourceApi#readCommand");
e.printStackTrace();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| commandId | Long | The command id. |
ApiCommandList readCommands(endTime, limit, name, offset, startTime, success)
Retrieve detailed information on all recent 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.CommandsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CommandsResourceApi apiInstance = new CommandsResourceApi();
Long endTime = 789L; // Long | timestamp of the command end time
java.math.BigDecimal limit = new java.math.BigDecimal(); // java.math.BigDecimal | command count to return (from offset)
String name = "name_example"; // String | the command name, unique for the command class HdfsCreateSnapshotCommand#COMMAND_NAME
java.math.BigDecimal offset = new java.math.BigDecimal(); // java.math.BigDecimal | command position to start
Long startTime = 789L; // Long | timestamp of the command start time
Boolean success = true; // Boolean | whether the command was successful, if already finished
try {
ApiCommandList result = apiInstance.readCommands(endTime, limit, name, offset, startTime, success);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommandsResourceApi#readCommands");
e.printStackTrace();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| endTime | Long | timestamp of the command end time | [optional] |
| limit | java.math.BigDecimal | command count to return (from offset) | [optional] |
| name | String | the command name, unique for the command class HdfsCreateSnapshotCommand#COMMAND_NAME | [optional] |
| offset | java.math.BigDecimal | command position to start | [optional] |
| startTime | Long | timestamp of the command start time | [optional] |
| success | Boolean | whether the command was successful, if already finished | [optional] |
String replicationReport(commandId, type)
Get the replication report CSV files.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CommandsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CommandsResourceApi apiInstance = new CommandsResourceApi();
Long commandId = 789L; // Long | The command id.
String type = "type_example"; // String | The requested report type.
try {
String result = apiInstance.replicationReport(commandId, type);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommandsResourceApi#replicationReport");
e.printStackTrace();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| commandId | Long | The command id. | |
| type | String | The requested report type. | [optional] |
String
ApiCommand retry(commandId)
Try to rerun a command.
// Import classes:
//import com.cloudera.api.swagger.client.ApiClient;
//import com.cloudera.api.swagger.client.ApiException;
//import com.cloudera.api.swagger.client.Configuration;
//import com.cloudera.api.swagger.client.auth.*;
//import com.cloudera.api.swagger.CommandsResourceApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");
CommandsResourceApi apiInstance = new CommandsResourceApi();
Long commandId = 789L; // Long | ID of the command that needs to be run.
try {
ApiCommand result = apiInstance.retry(commandId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CommandsResourceApi#retry");
e.printStackTrace();
}
| Name | Type | Description | Notes |
|---|---|---|---|
| commandId | Long | ID of the command that needs to be run. |