Created 02-06-2017 07:59 PM
Hello,
I've set up a AMS API call to retrieve Yarn matrix on a minute basis. I tried to add startTime/endTime in my query. Even though I found the metrics returned are not reflecting the latest time stamp, and data is kind of stale. Is there a way I can configure my query so that it can always catch the latest state of the metrics?
Example of my tests:
curl 'http://myhost:6188/ws/v1/timeline/metrics?metricNames=[metricsname]&appId=resourcemanager&startTime=1486410484&endTime=1486410784&precision=SECONDS'
In the return below, I want to see at least the endTime epoch or endTime - 1min epoch, but sometimes it can't get this far.
{u'metrics': [{u'metrics': {u'1486410630000': 0.0, u'1486410570000': 0.0, u'1486410540000': 0.0, u'1486410600000': 0.0, u'1486410510000': 0.0}, u'timestamp': 1486410510000, u'appid': u'resourcemanager', u'starttime': 1486410510000, u'metricname': u'metricsname'}]}
Thanks for the help!
Created 02-07-2017 06:24 PM
When a hostname is not specified, AMS returns data aggregated across all hosts/appId that send this metric. The aggregation happens every 2 mins, creating 4 x 30 second aggregates per iteration.
Add the following query parameter to your curl URL.
&hostname=<resourcemanager_host>
This should return most recent data.
Created 02-07-2017 06:24 PM
When a hostname is not specified, AMS returns data aggregated across all hosts/appId that send this metric. The aggregation happens every 2 mins, creating 4 x 30 second aggregates per iteration.
Add the following query parameter to your curl URL.
&hostname=<resourcemanager_host>
This should return most recent data.
Created 02-08-2017 06:29 PM
Thanks @Aravindan Vijayan for the information. This works.