cm_client.MgmtRoleCommandsResourceApi

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

Method HTTP request Description
jmap_dump POST /cm/service/roleCommands/jmapDump Run the jmapDump diagnostic command.
jmap_histo POST /cm/service/roleCommands/jmapHisto Run the jmapHisto diagnostic command.
jstack POST /cm/service/roleCommands/jstack Run the jstack diagnostic command.
lsof POST /cm/service/roleCommands/lsof Run the lsof diagnostic command.
restart_command POST /cm/service/roleCommands/restart Restart a set of Cloudera Management Services roles.
start_command POST /cm/service/roleCommands/start Start a set of Cloudera Management Services roles.
stop_command POST /cm/service/roleCommands/stop Stop a set of Cloudera Management Services roles.

jmap_dump

ApiBulkCommandList jmap_dump(body=body)

Run the jmapDump diagnostic command.

Run the jmapDump diagnostic command. The command runs the jmap utility to capture a dump of the role's java heap.

Available since API v8.

Example

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.MgmtRoleCommandsResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiRoleNameList() # ApiRoleNameList | the names of the roles to jmap. (optional)

try:
    # Run the jmapDump diagnostic command.
    api_response = api_instance.jmap_dump(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MgmtRoleCommandsResourceApi->jmap_dump: %s\n" % e)

Parameters

Name Type Description Notes
body ApiRoleNameList the names of the roles to jmap. [optional]

Return type

ApiBulkCommandList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

jmap_histo

ApiBulkCommandList jmap_histo(body=body)

Run the jmapHisto diagnostic command.

Run the jmapHisto diagnostic command. The command runs the jmap utility to capture a histogram of the objects on the role's java heap.

Available since API v8.

Example

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.MgmtRoleCommandsResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiRoleNameList() # ApiRoleNameList | the names of the roles to jmap. (optional)

try:
    # Run the jmapHisto diagnostic command.
    api_response = api_instance.jmap_histo(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MgmtRoleCommandsResourceApi->jmap_histo: %s\n" % e)

Parameters

Name Type Description Notes
body ApiRoleNameList the names of the roles to jmap. [optional]

Return type

ApiBulkCommandList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

jstack

ApiBulkCommandList jstack(body=body)

Run the jstack diagnostic command.

Run the jstack diagnostic command. The command runs the jstack utility to capture a role's java thread stacks.

Available since API v8.

Example

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.MgmtRoleCommandsResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiRoleNameList() # ApiRoleNameList | the names of the roles to jstack. (optional)

try:
    # Run the jstack diagnostic command.
    api_response = api_instance.jstack(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MgmtRoleCommandsResourceApi->jstack: %s\n" % e)

Parameters

Name Type Description Notes
body ApiRoleNameList the names of the roles to jstack. [optional]

Return type

ApiBulkCommandList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

lsof

ApiBulkCommandList lsof(body=body)

Run the lsof diagnostic command.

Run the lsof diagnostic command. This command runs the lsof utility to list a role's open files.

Available since API v8.

Example

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.MgmtRoleCommandsResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiRoleNameList() # ApiRoleNameList | the names of the roles to lsof. (optional)

try:
    # Run the lsof diagnostic command.
    api_response = api_instance.lsof(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MgmtRoleCommandsResourceApi->lsof: %s\n" % e)

Parameters

Name Type Description Notes
body ApiRoleNameList the names of the roles to lsof. [optional]

Return type

ApiBulkCommandList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restart_command

ApiBulkCommandList restart_command(body=body)

Restart a set of Cloudera Management Services roles.

Restart a set of Cloudera Management Services roles.

Example

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.MgmtRoleCommandsResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiRoleNameList() # ApiRoleNameList | The roles to restart. (optional)

try:
    # Restart a set of Cloudera Management Services roles.
    api_response = api_instance.restart_command(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MgmtRoleCommandsResourceApi->restart_command: %s\n" % e)

Parameters

Name Type Description Notes
body ApiRoleNameList The roles to restart. [optional]

Return type

ApiBulkCommandList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

start_command

ApiBulkCommandList start_command(body=body)

Start a set of Cloudera Management Services roles.

Start a set of Cloudera Management Services roles.

Example

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.MgmtRoleCommandsResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiRoleNameList() # ApiRoleNameList | The roles to start. (optional)

try:
    # Start a set of Cloudera Management Services roles.
    api_response = api_instance.start_command(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MgmtRoleCommandsResourceApi->start_command: %s\n" % e)

Parameters

Name Type Description Notes
body ApiRoleNameList The roles to start. [optional]

Return type

ApiBulkCommandList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

stop_command

ApiBulkCommandList stop_command(body=body)

Stop a set of Cloudera Management Services roles.

Stop a set of Cloudera Management Services roles.

Example

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.MgmtRoleCommandsResourceApi(cm_client.ApiClient(configuration))
body = cm_client.ApiRoleNameList() # ApiRoleNameList | The roles to stop. (optional)

try:
    # Stop a set of Cloudera Management Services roles.
    api_response = api_instance.stop_command(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MgmtRoleCommandsResourceApi->stop_command: %s\n" % e)

Parameters

Name Type Description Notes
body ApiRoleNameList The roles to stop. [optional]

Return type

ApiBulkCommandList

Authorization

basic

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]