{"action":"created","comment":{"url":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/comments/32869041","id":32869041,"diff_hunk":"@@ -490,6 +490,22 @@ void setDataAccess(DataAccess dataAccess) {\n     }\n \n     @Override\n+    public <T> Observable<T> findGaugeData(String tenantId, MetricId id, Long start, Long end,\n+            Func1<Observable<DataPoint<Double>>, Observable<T>>... funcs) {\n+\n+        Observable<DataPoint<Double>> dataCache = findGaugeData(tenantId, id, start, end).cache();\n+        Observable<T> result = null;\n+\n+        for (Func1<Observable<DataPoint<Double>>, Observable<T>> func : funcs) {\n+            result = (null == result) ?\n+                    func.call(dataCache) :\n+                    result.concatWith(func.call(dataCache));\n+        }\n+\n+        return result;\n+    }","path":"core/metrics-core-impl/src/main/java/org/hawkular/metrics/core/impl/MetricsServiceImpl.java","position":17,"original_position":17,"commit_id":"3a48ba1801ca6bb775c32b1cee47b3f59bbdd87e","original_commit_id":"3a48ba1801ca6bb775c32b1cee47b3f59bbdd87e","user":{"login":"jsanda","id":168121,"avatar_url":"https://avatars.githubusercontent.com/u/168121?v=3","gravatar_id":"","url":"https://api.github.com/users/jsanda","html_url":"https://github.com/jsanda","followers_url":"https://api.github.com/users/jsanda/followers","following_url":"https://api.github.com/users/jsanda/following{/other_user}","gists_url":"https://api.github.com/users/jsanda/gists{/gist_id}","starred_url":"https://api.github.com/users/jsanda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsanda/subscriptions","organizations_url":"https://api.github.com/users/jsanda/orgs","repos_url":"https://api.github.com/users/jsanda/repos","events_url":"https://api.github.com/users/jsanda/events{/privacy}","received_events_url":"https://api.github.com/users/jsanda/received_events","type":"User","site_admin":false},"body":"Excellent point. Only ```flatMap``` call is parallel because of the ```subscribeOn``` call. This would have certainly have to documented in the version of the method that takes the Scheduler argument. The additional method is not necessary for the PR. ","created_at":"2015-06-19T21:01:37Z","updated_at":"2015-06-19T21:01:37Z","html_url":"https://github.com/hawkular/hawkular-metrics/pull/263#discussion_r32869041","pull_request_url":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/263","_links":{"self":{"href":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/comments/32869041"},"html":{"href":"https://github.com/hawkular/hawkular-metrics/pull/263#discussion_r32869041"},"pull_request":{"href":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/263"}}},"pull_request":{"url":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/263","id":38111986,"html_url":"https://github.com/hawkular/hawkular-metrics/pull/263","diff_url":"https://github.com/hawkular/hawkular-metrics/pull/263.diff","patch_url":"https://github.com/hawkular/hawkular-metrics/pull/263.patch","issue_url":"https://api.github.com/repos/hawkular/hawkular-metrics/issues/263","number":263,"state":"open","locked":false,"title":"HWKMETRICS-144 Support server-side gauge data aggregate fetch","user":{"login":"jshaughn","id":2104052,"avatar_url":"https://avatars.githubusercontent.com/u/2104052?v=3","gravatar_id":"","url":"https://api.github.com/users/jshaughn","html_url":"https://github.com/jshaughn","followers_url":"https://api.github.com/users/jshaughn/followers","following_url":"https://api.github.com/users/jshaughn/following{/other_user}","gists_url":"https://api.github.com/users/jshaughn/gists{/gist_id}","starred_url":"https://api.github.com/users/jshaughn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshaughn/subscriptions","organizations_url":"https://api.github.com/users/jshaughn/orgs","repos_url":"https://api.github.com/users/jshaughn/repos","events_url":"https://api.github.com/users/jshaughn/events{/privacy}","received_events_url":"https://api.github.com/users/jshaughn/received_events","type":"User","site_admin":false},"body":"- override findGaugeData with a new signature that can apply one or\r\n  more functions to the fetched data (uses a single fetch)\r\n- provide some built in aggregate functions to be used with the new\r\n  findGaugeData signature out-of-box.","created_at":"2015-06-19T14:20:04Z","updated_at":"2015-06-19T21:01:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/263/commits","review_comments_url":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/263/comments","review_comment_url":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hawkular/hawkular-metrics/issues/263/comments","statuses_url":"https://api.github.com/repos/hawkular/hawkular-metrics/statuses/3a48ba1801ca6bb775c32b1cee47b3f59bbdd87e","head":{"label":"jshaughn:hwkmetrics-144","ref":"hwkmetrics-144","sha":"3a48ba1801ca6bb775c32b1cee47b3f59bbdd87e","user":{"login":"jshaughn","id":2104052,"avatar_url":"https://avatars.githubusercontent.com/u/2104052?v=3","gravatar_id":"","url":"https://api.github.com/users/jshaughn","html_url":"https://github.com/jshaughn","followers_url":"https://api.github.com/users/jshaughn/followers","following_url":"https://api.github.com/users/jshaughn/following{/other_user}","gists_url":"https://api.github.com/users/jshaughn/gists{/gist_id}","starred_url":"https://api.github.com/users/jshaughn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshaughn/subscriptions","organizations_url":"https://api.github.com/users/jshaughn/orgs","repos_url":"https://api.github.com/users/jshaughn/repos","events_url":"https://api.github.com/users/jshaughn/events{/privacy}","received_events_url":"https://api.github.com/users/jshaughn/received_events","type":"User","site_admin":false},"repo":{"id":37722720,"name":"hawkular-metrics","full_name":"jshaughn/hawkular-metrics","owner":{"login":"jshaughn","id":2104052,"avatar_url":"https://avatars.githubusercontent.com/u/2104052?v=3","gravatar_id":"","url":"https://api.github.com/users/jshaughn","html_url":"https://github.com/jshaughn","followers_url":"https://api.github.com/users/jshaughn/followers","following_url":"https://api.github.com/users/jshaughn/following{/other_user}","gists_url":"https://api.github.com/users/jshaughn/gists{/gist_id}","starred_url":"https://api.github.com/users/jshaughn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshaughn/subscriptions","organizations_url":"https://api.github.com/users/jshaughn/orgs","repos_url":"https://api.github.com/users/jshaughn/repos","events_url":"https://api.github.com/users/jshaughn/events{/privacy}","received_events_url":"https://api.github.com/users/jshaughn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jshaughn/hawkular-metrics","description":"Time Series Metrics Engine based on Cassandra","fork":true,"url":"https://api.github.com/repos/jshaughn/hawkular-metrics","forks_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/forks","keys_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/teams","hooks_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/hooks","issue_events_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/issues/events{/number}","events_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/events","assignees_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/assignees{/user}","branches_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/branches{/branch}","tags_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/tags","blobs_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/statuses/{sha}","languages_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/languages","stargazers_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/stargazers","contributors_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/contributors","subscribers_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/subscribers","subscription_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/subscription","commits_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/contents/{+path}","compare_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/merges","archive_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/downloads","issues_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/issues{/number}","pulls_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/pulls{/number}","milestones_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/milestones{/number}","notifications_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/labels{/name}","releases_url":"https://api.github.com/repos/jshaughn/hawkular-metrics/releases{/id}","created_at":"2015-06-19T13:17:08Z","updated_at":"2015-06-19T13:17:09Z","pushed_at":"2015-06-19T15:21:02Z","git_url":"git://github.com/jshaughn/hawkular-metrics.git","ssh_url":"git@github.com:jshaughn/hawkular-metrics.git","clone_url":"https://github.com/jshaughn/hawkular-metrics.git","svn_url":"https://github.com/jshaughn/hawkular-metrics","homepage":"","size":17265,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hawkular:master","ref":"master","sha":"e43df28dfff7e9ac7d04d6e693cac7e1e15036f3","user":{"login":"hawkular","id":10179627,"avatar_url":"https://avatars.githubusercontent.com/u/10179627?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkular","html_url":"https://github.com/hawkular","followers_url":"https://api.github.com/users/hawkular/followers","following_url":"https://api.github.com/users/hawkular/following{/other_user}","gists_url":"https://api.github.com/users/hawkular/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkular/subscriptions","organizations_url":"https://api.github.com/users/hawkular/orgs","repos_url":"https://api.github.com/users/hawkular/repos","events_url":"https://api.github.com/users/hawkular/events{/privacy}","received_events_url":"https://api.github.com/users/hawkular/received_events","type":"Organization","site_admin":false},"repo":{"id":17705626,"name":"hawkular-metrics","full_name":"hawkular/hawkular-metrics","owner":{"login":"hawkular","id":10179627,"avatar_url":"https://avatars.githubusercontent.com/u/10179627?v=3","gravatar_id":"","url":"https://api.github.com/users/hawkular","html_url":"https://github.com/hawkular","followers_url":"https://api.github.com/users/hawkular/followers","following_url":"https://api.github.com/users/hawkular/following{/other_user}","gists_url":"https://api.github.com/users/hawkular/gists{/gist_id}","starred_url":"https://api.github.com/users/hawkular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawkular/subscriptions","organizations_url":"https://api.github.com/users/hawkular/orgs","repos_url":"https://api.github.com/users/hawkular/repos","events_url":"https://api.github.com/users/hawkular/events{/privacy}","received_events_url":"https://api.github.com/users/hawkular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hawkular/hawkular-metrics","description":"Time Series Metrics Engine based on Cassandra","fork":false,"url":"https://api.github.com/repos/hawkular/hawkular-metrics","forks_url":"https://api.github.com/repos/hawkular/hawkular-metrics/forks","keys_url":"https://api.github.com/repos/hawkular/hawkular-metrics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hawkular/hawkular-metrics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hawkular/hawkular-metrics/teams","hooks_url":"https://api.github.com/repos/hawkular/hawkular-metrics/hooks","issue_events_url":"https://api.github.com/repos/hawkular/hawkular-metrics/issues/events{/number}","events_url":"https://api.github.com/repos/hawkular/hawkular-metrics/events","assignees_url":"https://api.github.com/repos/hawkular/hawkular-metrics/assignees{/user}","branches_url":"https://api.github.com/repos/hawkular/hawkular-metrics/branches{/branch}","tags_url":"https://api.github.com/repos/hawkular/hawkular-metrics/tags","blobs_url":"https://api.github.com/repos/hawkular/hawkular-metrics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hawkular/hawkular-metrics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hawkular/hawkular-metrics/git/refs{/sha}","trees_url":"https://api.github.com/repos/hawkular/hawkular-metrics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hawkular/hawkular-metrics/statuses/{sha}","languages_url":"https://api.github.com/repos/hawkular/hawkular-metrics/languages","stargazers_url":"https://api.github.com/repos/hawkular/hawkular-metrics/stargazers","contributors_url":"https://api.github.com/repos/hawkular/hawkular-metrics/contributors","subscribers_url":"https://api.github.com/repos/hawkular/hawkular-metrics/subscribers","subscription_url":"https://api.github.com/repos/hawkular/hawkular-metrics/subscription","commits_url":"https://api.github.com/repos/hawkular/hawkular-metrics/commits{/sha}","git_commits_url":"https://api.github.com/repos/hawkular/hawkular-metrics/git/commits{/sha}","comments_url":"https://api.github.com/repos/hawkular/hawkular-metrics/comments{/number}","issue_comment_url":"https://api.github.com/repos/hawkular/hawkular-metrics/issues/comments{/number}","contents_url":"https://api.github.com/repos/hawkular/hawkular-metrics/contents/{+path}","compare_url":"https://api.github.com/repos/hawkular/hawkular-metrics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hawkular/hawkular-metrics/merges","archive_url":"https://api.github.com/repos/hawkular/hawkular-metrics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hawkular/hawkular-metrics/downloads","issues_url":"https://api.github.com/repos/hawkular/hawkular-metrics/issues{/number}","pulls_url":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls{/number}","milestones_url":"https://api.github.com/repos/hawkular/hawkular-metrics/milestones{/number}","notifications_url":"https://api.github.com/repos/hawkular/hawkular-metrics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hawkular/hawkular-metrics/labels{/name}","releases_url":"https://api.github.com/repos/hawkular/hawkular-metrics/releases{/id}","created_at":"2014-03-13T10:07:30Z","updated_at":"2015-06-17T21:23:46Z","pushed_at":"2015-06-19T19:27:02Z","git_url":"git://github.com/hawkular/hawkular-metrics.git","ssh_url":"git@github.com:hawkular/hawkular-metrics.git","clone_url":"https://github.com/hawkular/hawkular-metrics.git","svn_url":"https://github.com/hawkular/hawkular-metrics","homepage":"","size":17265,"stargazers_count":47,"watchers_count":47,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":19,"forks":33,"open_issues":19,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/263"},"html":{"href":"https://github.com/hawkular/hawkular-metrics/pull/263"},"issue":{"href":"https://api.github.com/repos/hawkular/hawkular-metrics/issues/263"},"comments":{"href":"https://api.github.com/repos/hawkular/hawkular-metrics/issues/263/comments"},"review_comments":{"href":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/263/comments"},"review_comment":{"href":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hawkular/hawkular-metrics/pulls/263/commits"},"statuses":{"href":"https://api.github.com/repos/hawkular/hawkular-metrics/statuses/3a48ba1801ca6bb775c32b1cee47b3f59bbdd87e"}}}}