All URIs are relative to https://localhost/api/v41
Method | HTTP request | Description |
---|---|---|
abort_command | POST /commands/{commandId}/abort | Abort a running command. |
get_standard_error | GET /commands/{commandId}/logs/stderr | Download a zip-compressed archive of standard error outputs for the command's one-off processes. |
get_standard_output | GET /commands/{commandId}/logs/stdout | Download a zip-compressed archive of standard outputs for the command's one-off processes. |
read_command | GET /commands/{commandId} | Retrieve detailed information on an asynchronous command. |
retry | POST /commands/{commandId}/retry | Try to rerun a command. |
ApiCommand abort_command(command_id)
Abort a running command.
Abort a running command.
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.CommandsResourceApi(cm_client.ApiClient(configuration))
command_id = 3.4 # float | The command id.
try:
# Abort a running command.
api_response = api_instance.abort_command(command_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommandsResourceApi->abort_command: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
command_id | float | The command id. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
file get_standard_error(command_id)
Download a zip-compressed archive of standard error outputs for the command's one-off processes.
Download a zip-compressed archive of standard error outputs for the command's one-off processes. Log files are returned zipped together.
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.CommandsResourceApi(cm_client.ApiClient(configuration))
command_id = 3.4 # float | The command id.
try:
# Download a zip-compressed archive of standard error outputs for the command's one-off processes.
api_response = api_instance.get_standard_error(command_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommandsResourceApi->get_standard_error: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
command_id | float | The command id. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
file get_standard_output(command_id)
Download a zip-compressed archive of standard outputs for the command's one-off processes.
Download a zip-compressed archive of standard outputs for the command's one-off processes. Log files are returned zipped together.
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.CommandsResourceApi(cm_client.ApiClient(configuration))
command_id = 3.4 # float | The command id.
try:
# Download a zip-compressed archive of standard outputs for the command's one-off processes.
api_response = api_instance.get_standard_output(command_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommandsResourceApi->get_standard_output: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
command_id | float | The command id. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiCommand read_command(command_id)
Retrieve detailed information on an asynchronous command.
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.
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.CommandsResourceApi(cm_client.ApiClient(configuration))
command_id = 3.4 # float | The command id.
try:
# Retrieve detailed information on an asynchronous command.
api_response = api_instance.read_command(command_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommandsResourceApi->read_command: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
command_id | float | The command id. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiCommand retry(command_id)
Try to rerun a command.
Try to rerun a command.
from __future__ import print_function
import time
import cm_client
from cm_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basic
configuration = cm_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = cm_client.CommandsResourceApi(cm_client.ApiClient(configuration))
command_id = 3.4 # float | ID of the command that needs to be run.
try:
# Try to rerun a command.
api_response = api_instance.retry(command_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling CommandsResourceApi->retry: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
command_id | float | ID of the command that needs to be run. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]