Home

/clusters/resources/tagged/{query_type}?applicationType={value}
/clusters/resources/tagged/{query_type}?applicationType={value}

Gets total job count per status in a given time window (at one hour intervals).

Request
GET http://unravel-host:3000/api/v1/clusters/resources/tagged/{query_type}?applicationType={value}&from={timestamp}&to={timestamp}&groupBy={type}&interval={polling_interval}
Path parameters

Name

Type

Description

query_type

string

Query type. Valid values are:

  • cpu: Returns vcores as count

  • memory: Returns memory in bytes

Query parameters

Required parameters are highlighted.

Name

Type

Description

from

string

Start time in Unix epoch format.

to

string

End time in Unix epoch format.

applicationType

integer

Application type.

Valid values are: cascading, impala, hive, mr, pig, spark, tez.

interval

integer

Polling interval.

Valid values are: 1m, 5m, 10m, 30m, 1h.

Response body
{
   epoch-timestamp : count
}
Examples

Get vcore usage for MapReduce:

curl -X GET "http://http://myserver.com:3000/api/v1/clusters/resources/tagged/cpu?to=1536275883&groupBy=%7B%22type%22:%22applicationType%22,%22value%22:%5B%22MAPREDUCE%22%5D%7D&interval=1h&from=1536189483" -H  "accept: application/json" -H  "Authorization: JWT token"

Get memory usage for Spark:

curl -X GET "http://http://myserver.com:3000/api/v1/clusters/resources/tagged/memory?to=1536275883&groupBy=%7B%22type%22:%22applicationType%22,%22value%22:%5B%22SPARK%22%5D%7D&interval=1h&from=1536189483" -H  "accept: application/json" -H  "Authorization: JWT token"
/clusters/resources/tagged/{query_type}?UserName={list}

Returns vcore/memory usage per user.

Request
GET http://unravel-host:3000/api/v1/clusters/resources/tagged/{query_type}?UserName={list}&from={timestamp}&to={timestamp}&groupBy={type}&interval={polling_interval}
Path Parameters

Name

Type

Description

query_type

string

Query type. Valid values are:

  • cpu: Returns vcores as count

  • memory: Returns memory in bytes

Query Parameters

Name

Type

Description

from

string

Start time in Unix epoch format.

to

string

End time in Unix epoch format.

UserName

integer

List of usernames separated by commas.

interval

integer

Polling interval.

Valid values are: 1m, 5m, 10m, 30m, 1h.

Response Fields
{
   epoch-timestamp : count
}
Examples

Get vcore usage for certain user(s):

curl -X GET "http://http://myserver.com:3000/api/v1/clusters/resources/tagged/cpu?to=1536276842&groupBy=%7B%22type%22:%22user%22,%22value%22:%5B%22root%22%5D%7D&interval=1h&from=1536190442" -H  "accept: application/json" -H  "Authorization: JWT token"

Get memory usage for certain user(s):

curl -X GET "http://http://myserver.com:3000/api/v1/clusters/resources/tagged/memory?to=1536276842&groupBy=%7B%22type%22:%22user%22,%22value%22:%5B%22root%22%5D%7D&interval=1h&from=1536190442" -H  "accept: application/json" -H  "Authorization: JWT token"
/clusters/resources/tagged/{query_type}?QueueName={list}

Returns vcore/memory usage per queue.

Request
GET http://unravel-host:3000/api/v1/clusters/resources/tagged/{query_type}?QueueName={list}&from={timestamp}&to={timestamp}&groupBy={type}&interval={polling_interval}
Path Parameters

Name

Type

Description

query_type

string

Query type. Valid values are:

  • cpu: Returns vcores as count

  • memory: Returns memory in bytes

Query Parameters

Name

Type

Description

from

string

Start time in Unix epoch format.

to

string

End time in Unix epoch format.

QueueName

integer

List of queue names separated by commas.

interval

integer

Polling interval.

Valid values are: 1m, 5m, 10m, 30m, 1h.

Response Fields
{
   epoch-timestamp : count
}
Examples

Get vcore usage for certain queue(s):

curl -X GET "http://http://myserver.com:3000/api/v1/clusters/resources/tagged/cpu?to=1536277362&groupBy=%7B%22type%22:%22queue%22,%22value%22:%5B%22root.users.root%22%5D%7D&interval=1h&from=1536190962" -H  "accept: application/json" -H  "Authorization: JWT token"

Get memory usage for certain queue(s):

curl -X GET "http://http://myserver.com:3000/api/v1/clusters/resources/tagged/memory?to=1536277362&groupBy=%7B%22type%22:%22queue%22,%22value%22:%5B%22root.users.root%22%5D%7D&interval=1h&from=1536190962" -H  "accept: application/json" -H  "Authorization: JWT token"