Data Engineering Administrator Guide > Monitoring REST API > ClusterStats
  

ClusterStats

With the ClusterStats REST API, you can view the maximum number of cluster nodes used by a mapping for a cluster configuration in a given time duration.

GET Request

To request information from the ClusterStats, use the following URL:
<Rest operations hub service host>:<Rest operations hub service port>/Rest operations hub/services/v1/mapping service/ClusterStats(startTimeInmillis=[value], endTimeInmillis=[value])
The following table describes the attributes in the ClusterStats Get URL:
Field
Type
Description
startTimeInmillis
Long
Required. Specifies the start time in milliseconds.
endTimeInmillis
Long
Required. Specifies the end time in milliseconds.
Tip: You can use the local timezone and convert the date and time in milliseconds by using a web utility such as Current Millis. You can also use the mapping run time to get the time in milliseconds.

Get Response

Return information for the ClusterStats for the specified time duration.
The following table describes the ClusterStats attributes present in the body of the response on the native or Hadoop environment:
Field
Type
Description
startTimeInmillis
Long
Specifies the start time in milliseconds.
endTimeInmillis
Long
Specifies the end time in milliseconds.
clusterStatDetails
String
Specifies the maximum number of nodes used by a mapping for a cluster configuration along with mapping ID, cluster configuration ID, and engine type.

Retrieve Cluster Statistics

Use the script to retrieve the details of the cluster statistics on the Spark environment.
You can use the REST API to retrieve information about the cluster statistics with the following request URL:
<Rest operations hub service host>:<Rest operations hub service port>/Rest operations hub/services/v1/mapping service/
ClusterStats(startTimeInmillis=1554769512503, endTimeInmillis=1564769512503)

Cluster Statistics Output


"startTimeInmillis": 1554769512503,

"endTimeInmillis": 1564769512503,

"clusterStatDetails": [

"CCOID = ivlhdp755 , EXECUTOR TYPE = SPARK : MAXIMUM NODES USED = 4 , MAPPINGID = zlxX8LUgEem_6GPOtA8lwg",

"CCOID = invishwas , EXECUTOR TYPE = SPARK : MAXIMUM NODES USED = 2 , MAPPINGID = UPgZ6LU9EemihPpIGP8fCw",

"CCOID = cdhpr , EXECUTOR TYPE = SPARK : MAXIMUM NODES USED = 1 , MAPPINGID = Yk-rSLUgEem_6GPOtA8lwg"]