[Hawkular-dev] Understanding data retention

Michael Burman miburman at redhat.com
Fri Sep 23 06:07:58 EDT 2016


Hi,

I don't think the model should convert, but the MetricsServiceImpl getTTL is not doing to conversion which it probably should (best place to add it). And while we have stuff that tests this, it's not actually testing they end up correctly for single datapoint in the Cassandra, only the DEFAULT_TTL is tested for that..

https://github.com/hawkular/hawkular-metrics/pull/609

  - Micke

----- Original Message -----
From: "Gareth Healy" <garethahealy at gmail.com>
To: "Discussions around Hawkular development" <hawkular-dev at lists.jboss.org>
Sent: Thursday, September 22, 2016 7:54:56 PM
Subject: [Hawkular-dev] Understanding data retention

A metric supports data retention (TTL); the swagger docs say this is number of days. 


    * https://github.com/hawkular/hawkular-metrics/blob/5eb13c6dbddafdcc0fcd5eb7fc3dacd9858e18c8/core/metrics-model/src/main/java/org/hawkular/metrics/model/Metric.java#L167 


    * 
http://www.hawkular.org/docs/rest/rest-metrics.html#Metric 
There is also a default TTL which is in days but converted internally into seconds: 


    * https://github.com/hawkular/hawkular-metrics/blob/39389e4bf5a988ef01cbad83b488cadd47c93066/core/metrics-core-service/src/main/java/org/hawkular/metrics/core/service/MetricsServiceImpl.java#L180 
Looking at when metrics are created, i can't see any conversion from days to seconds for metrics; so any data i create with a Metric DataRetention of 30 "days" gets removed straight away. 

So my question is: 


    * Are the swagger docs wrong? 

or 


    * Should the model convert to seconds? 

Or...have i missed something... ? 

Cheers. 



_______________________________________________
hawkular-dev mailing list
hawkular-dev at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hawkular-dev


More information about the hawkular-dev mailing list