{"action":"created","issue":{"url":"https://api.github.com/repos/rackerlabs/blueflood/issues/468","labels_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/468/labels{/name}","comments_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/468/comments","events_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/468/events","html_url":"https://github.com/rackerlabs/blueflood/pull/468","id":81154302,"number":468,"title":"RFR: Fixing the points to Granularity mapping such that it takes into account the ttls ","user":{"login":"tilogaat","id":8238570,"avatar_url":"https://avatars.githubusercontent.com/u/8238570?v=3","gravatar_id":"","url":"https://api.github.com/users/tilogaat","html_url":"https://github.com/tilogaat","followers_url":"https://api.github.com/users/tilogaat/followers","following_url":"https://api.github.com/users/tilogaat/following{/other_user}","gists_url":"https://api.github.com/users/tilogaat/gists{/gist_id}","starred_url":"https://api.github.com/users/tilogaat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilogaat/subscriptions","organizations_url":"https://api.github.com/users/tilogaat/orgs","repos_url":"https://api.github.com/users/tilogaat/repos","events_url":"https://api.github.com/users/tilogaat/events{/privacy}","received_events_url":"https://api.github.com/users/tilogaat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-26T21:56:15Z","updated_at":"2015-05-29T23:41:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/468","html_url":"https://github.com/rackerlabs/blueflood/pull/468","diff_url":"https://github.com/rackerlabs/blueflood/pull/468.diff","patch_url":"https://github.com/rackerlabs/blueflood/pull/468.patch"},"body":"Currently, when a query arrives for points, BF tries to internally map it to resolution and invokes GetByResolution. But sometimes the interval is for older data and BF fails to take into account that the data may have been TTLd out. \r\n\r\nFor example, if the query is for 1000 points that have occurred in the last month, Full Granularity should not be the best match because the data for Full resolution has TTLd out and will not be available. \r\nHowever currently BF just returns Full Granularity because that's the way we can return the max points (close to 1000), but when BF checks into the metrics_full CF, there will not be anything in it because data has TTLd. \r\n\r\nThis PR tries to make the points to granularity mapping smarter by taking into account the ttls. \r\n\r\nMain code changed is here in [Granularity.java](https://github.com/rackerlabs/blueflood/compare/master...tilogaat:fix-points2granularity?expand=1#diff-f6ab010e2a8c7c85dd54384bd3a64b37R261)\r\n\r\nTodo: \r\n1. Tests, tests, tests\r\n2. Code cleanup\r\n"},"comment":{"url":"https://api.github.com/repos/rackerlabs/blueflood/issues/comments/106959573","html_url":"https://github.com/rackerlabs/blueflood/pull/468#issuecomment-106959573","issue_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/468","id":106959573,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T23:41:31Z","updated_at":"2015-05-29T23:41:31Z","body":"\n[![Coverage Status](https://coveralls.io/builds/2686034/badge)](https://coveralls.io/builds/2686034)\n\nCoverage decreased (-0.25%) to 51.64% when pulling **d1af0057453934574443af43220c41c2b890a43a on tilogaat:fix-points2granularity** into **b387533d34d43281beb83d06393eb271494b60d6 on rackerlabs:master**.\n"}}