All URIs are relative to https://localhost/api/v33
Method | HTTP request | Description |
---|---|---|
get_metrics | GET /clusters/{clusterName}/services/{serviceName}/nameservices/{nameservice}/metrics | Fetch metric readings for a particular nameservice. |
list_nameservices | GET /clusters/{clusterName}/services/{serviceName}/nameservices | List the nameservices of an HDFS service. |
read_nameservice | GET /clusters/{clusterName}/services/{serviceName}/nameservices/{nameservice} | Retrieve information about a nameservice. |
ApiMetricList get_metrics(cluster_name, nameservice, service_name, _from=_from, metrics=metrics, to=to, view=view)
Fetch metric readings for a particular nameservice.
Fetch metric readings for a particular nameservice.
By default, this call will look up all metrics available. 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, even if no readings are available in the requested window.
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.NameservicesResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str |
nameservice = 'nameservice_example' # str | The nameservice.
service_name = 'service_name_example' # str | The service name.
_from = '_from_example' # str | Start of the period to query. (optional)
metrics = ['metrics_example'] # list[str] | Filter for which metrics to query. (optional)
to = 'now' # str | End of the period to query. (optional) (default to now)
view = 'summary' # str | The view of the data to materialize, either \"summary\" or \"full\". (optional) (default to summary)
try:
# Fetch metric readings for a particular nameservice.
api_response = api_instance.get_metrics(cluster_name, nameservice, service_name, _from=_from, metrics=metrics, to=to, view=view)
pprint(api_response)
except ApiException as e:
print("Exception when calling NameservicesResourceApi->get_metrics: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
cluster_name | str | ||
nameservice | str | The nameservice. | |
service_name | str | The service name. | |
_from | str | Start of the period to query. | [optional] |
metrics | list[str] | Filter for which metrics to query. | [optional] |
to | str | End of the period to query. | [optional] [default to now] |
view | str | The view of the data to materialize, either "summary" or "full". | [optional] [default to summary] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiNameserviceList list_nameservices(cluster_name, service_name, view=view)
List the nameservices of an HDFS service.
List the nameservices of an HDFS service.
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.NameservicesResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str |
service_name = 'service_name_example' # str | The service name.
view = 'summary' # str | The view of the data to materialize, either \"summary\" or \"full\". (optional) (default to summary)
try:
# List the nameservices of an HDFS service.
api_response = api_instance.list_nameservices(cluster_name, service_name, view=view)
pprint(api_response)
except ApiException as e:
print("Exception when calling NameservicesResourceApi->list_nameservices: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
cluster_name | str | ||
service_name | str | The service name. | |
view | str | The view of the data to materialize, either "summary" or "full". | [optional] [default to summary] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiNameservice read_nameservice(cluster_name, nameservice, service_name, view=view)
Retrieve information about a nameservice.
Retrieve information about a nameservice.
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.NameservicesResourceApi(cm_client.ApiClient(configuration))
cluster_name = 'cluster_name_example' # str |
nameservice = 'nameservice_example' # str | The nameservice to retrieve.
service_name = 'service_name_example' # str | The service name.
view = 'summary' # str | The view to materialize. Defaults to 'full'. (optional) (default to summary)
try:
# Retrieve information about a nameservice.
api_response = api_instance.read_nameservice(cluster_name, nameservice, service_name, view=view)
pprint(api_response)
except ApiException as e:
print("Exception when calling NameservicesResourceApi->read_nameservice: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
cluster_name | str | ||
nameservice | str | The nameservice to retrieve. | |
service_name | str | The service name. | |
view | str | The view to materialize. Defaults to 'full'. | [optional] [default to summary] |
[Back to top] [Back to API list] [Back to Model list] [Back to README]