{"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments/25189236","id":25189236,"diff_hunk":"@@ -613,21 +795,37 @@ public ByteBuffer toByteBuffer(TimerRollup o) {\n             try {\n                 byte type = typeOf(o);\n                 byte[] buf = new byte[sizeOf(o, type)];\n-                serializeTimer(o, buf);\n+                serializeV2Timer(o, buf);\n                 return ByteBuffer.wrap(buf);\n             } catch (IOException ex) {\n                 throw new RuntimeException(ex);\n             }\n         }\n \n+        @VisibleForTesting\n+        public ByteBuffer toByteBufferWithV1Serialization(TimerRollup o) {\n+            try {\n+                byte type = typeOf(o);\n+                byte[] buf = new byte[sizeOfV1(o, type)];\n+                serializeV1Timer(o, buf);\n+                return ByteBuffer.wrap(buf);\n+            } catch (IOException ex) {\n+                throw new RuntimeException(ex);\n+            }\n+        }\n+\n+\n         @Override\n         public TimerRollup fromByteBuffer(ByteBuffer byteBuffer) {\n             CodedInputStream in = CodedInputStream.newInstance(byteBuffer.array());\n             try {\n                 byte version = in.readRawByte();\n-                if (version != VERSION_1_TIMER)\n+                if (version > VERSION_2_TIMER)","path":"blueflood-core/src/main/java/com/rackspacecloud/blueflood/io/serializers/NumericSerializer.java","position":267,"original_position":267,"commit_id":"ddee7e0a18fe5d72f749871ca1f43178401f5e49","original_commit_id":"ddee7e0a18fe5d72f749871ca1f43178401f5e49","user":{"login":"chinmay-gupte","id":4722931,"avatar_url":"https://avatars.githubusercontent.com/u/4722931?v=3","gravatar_id":"","url":"https://api.github.com/users/chinmay-gupte","html_url":"https://github.com/chinmay-gupte","followers_url":"https://api.github.com/users/chinmay-gupte/followers","following_url":"https://api.github.com/users/chinmay-gupte/following{/other_user}","gists_url":"https://api.github.com/users/chinmay-gupte/gists{/gist_id}","starred_url":"https://api.github.com/users/chinmay-gupte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chinmay-gupte/subscriptions","organizations_url":"https://api.github.com/users/chinmay-gupte/orgs","repos_url":"https://api.github.com/users/chinmay-gupte/repos","events_url":"https://api.github.com/users/chinmay-gupte/events{/privacy}","received_events_url":"https://api.github.com/users/chinmay-gupte/received_events","type":"User","site_admin":false},"body":"Can you make the checking for versions more explicit like,\r\n```\r\nif (version == V1) {...}\r\nelse if (version == V2) {...}\r\nelse SerializationException()\r\n```","created_at":"2015-02-23T18:45:43Z","updated_at":"2015-02-23T18:45:43Z","html_url":"https://github.com/rackerlabs/blueflood/pull/440#discussion_r25189236","pull_request_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/440","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments/25189236"},"html":{"href":"https://github.com/rackerlabs/blueflood/pull/440#discussion_r25189236"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/440"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/440","id":29653847,"html_url":"https://github.com/rackerlabs/blueflood/pull/440","diff_url":"https://github.com/rackerlabs/blueflood/pull/440.diff","patch_url":"https://github.com/rackerlabs/blueflood/pull/440.patch","issue_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/440","number":440,"state":"open","locked":false,"title":"RFR: Changing the precision of sum field in timer to double","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},"body":"The statsd payload being sent by ele https://gist.github.com/tilogaat/4d44019dd93d53fac6ce \r\nis erroring out because it has a timer whose sum is of greater precision than  long. \r\nAssuming long precision for timer.sum is not enough. Therefore, changing the precision to be double instead. \r\n\r\n","created_at":"2015-02-19T22:08:42Z","updated_at":"2015-02-23T18:45:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f364a9ea149c53b11b3b7b58d0c8cf17a1389041","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/440/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/440/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/440/comments","statuses_url":"https://api.github.com/repos/rackerlabs/blueflood/statuses/ddee7e0a18fe5d72f749871ca1f43178401f5e49","head":{"label":"tilogaat:timer-sum-double","ref":"timer-sum-double","sha":"ddee7e0a18fe5d72f749871ca1f43178401f5e49","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},"repo":{"id":22357256,"name":"blueflood","full_name":"tilogaat/blueflood","owner":{"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},"private":false,"html_url":"https://github.com/tilogaat/blueflood","description":"A distributed system designed to ingest and process time series data","fork":true,"url":"https://api.github.com/repos/tilogaat/blueflood","forks_url":"https://api.github.com/repos/tilogaat/blueflood/forks","keys_url":"https://api.github.com/repos/tilogaat/blueflood/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tilogaat/blueflood/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tilogaat/blueflood/teams","hooks_url":"https://api.github.com/repos/tilogaat/blueflood/hooks","issue_events_url":"https://api.github.com/repos/tilogaat/blueflood/issues/events{/number}","events_url":"https://api.github.com/repos/tilogaat/blueflood/events","assignees_url":"https://api.github.com/repos/tilogaat/blueflood/assignees{/user}","branches_url":"https://api.github.com/repos/tilogaat/blueflood/branches{/branch}","tags_url":"https://api.github.com/repos/tilogaat/blueflood/tags","blobs_url":"https://api.github.com/repos/tilogaat/blueflood/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tilogaat/blueflood/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tilogaat/blueflood/git/refs{/sha}","trees_url":"https://api.github.com/repos/tilogaat/blueflood/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tilogaat/blueflood/statuses/{sha}","languages_url":"https://api.github.com/repos/tilogaat/blueflood/languages","stargazers_url":"https://api.github.com/repos/tilogaat/blueflood/stargazers","contributors_url":"https://api.github.com/repos/tilogaat/blueflood/contributors","subscribers_url":"https://api.github.com/repos/tilogaat/blueflood/subscribers","subscription_url":"https://api.github.com/repos/tilogaat/blueflood/subscription","commits_url":"https://api.github.com/repos/tilogaat/blueflood/commits{/sha}","git_commits_url":"https://api.github.com/repos/tilogaat/blueflood/git/commits{/sha}","comments_url":"https://api.github.com/repos/tilogaat/blueflood/comments{/number}","issue_comment_url":"https://api.github.com/repos/tilogaat/blueflood/issues/comments{/number}","contents_url":"https://api.github.com/repos/tilogaat/blueflood/contents/{+path}","compare_url":"https://api.github.com/repos/tilogaat/blueflood/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tilogaat/blueflood/merges","archive_url":"https://api.github.com/repos/tilogaat/blueflood/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tilogaat/blueflood/downloads","issues_url":"https://api.github.com/repos/tilogaat/blueflood/issues{/number}","pulls_url":"https://api.github.com/repos/tilogaat/blueflood/pulls{/number}","milestones_url":"https://api.github.com/repos/tilogaat/blueflood/milestones{/number}","notifications_url":"https://api.github.com/repos/tilogaat/blueflood/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tilogaat/blueflood/labels{/name}","releases_url":"https://api.github.com/repos/tilogaat/blueflood/releases{/id}","created_at":"2014-07-28T20:44:27Z","updated_at":"2014-07-28T21:21:07Z","pushed_at":"2015-02-20T22:52:13Z","git_url":"git://github.com/tilogaat/blueflood.git","ssh_url":"git@github.com:tilogaat/blueflood.git","clone_url":"https://github.com/tilogaat/blueflood.git","svn_url":"https://github.com/tilogaat/blueflood","homepage":"http://www.blueflood.io","size":4555,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"rackerlabs:master","ref":"master","sha":"7937a0bd4136e22340664ae2bb2a0b76a96865e7","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":10081109,"name":"blueflood","full_name":"rackerlabs/blueflood","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/blueflood","description":"A distributed system designed to ingest and process time series data","fork":false,"url":"https://api.github.com/repos/rackerlabs/blueflood","forks_url":"https://api.github.com/repos/rackerlabs/blueflood/forks","keys_url":"https://api.github.com/repos/rackerlabs/blueflood/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/blueflood/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/blueflood/teams","hooks_url":"https://api.github.com/repos/rackerlabs/blueflood/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/blueflood/events","assignees_url":"https://api.github.com/repos/rackerlabs/blueflood/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/blueflood/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/blueflood/tags","blobs_url":"https://api.github.com/repos/rackerlabs/blueflood/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/blueflood/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/blueflood/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/blueflood/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/blueflood/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/blueflood/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/blueflood/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/blueflood/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/blueflood/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/blueflood/subscription","commits_url":"https://api.github.com/repos/rackerlabs/blueflood/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/blueflood/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/blueflood/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/blueflood/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/blueflood/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/blueflood/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/blueflood/merges","archive_url":"https://api.github.com/repos/rackerlabs/blueflood/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/blueflood/downloads","issues_url":"https://api.github.com/repos/rackerlabs/blueflood/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/blueflood/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/blueflood/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/blueflood/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/blueflood/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/blueflood/releases{/id}","created_at":"2013-05-15T14:50:39Z","updated_at":"2015-02-19T20:18:53Z","pushed_at":"2015-02-20T18:48:39Z","git_url":"git://github.com/rackerlabs/blueflood.git","ssh_url":"git@github.com:rackerlabs/blueflood.git","clone_url":"https://github.com/rackerlabs/blueflood.git","svn_url":"https://github.com/rackerlabs/blueflood","homepage":"http://www.blueflood.io","size":10241,"stargazers_count":283,"watchers_count":283,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":37,"mirror_url":null,"open_issues_count":31,"forks":37,"open_issues":31,"watchers":283,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/440"},"html":{"href":"https://github.com/rackerlabs/blueflood/pull/440"},"issue":{"href":"https://api.github.com/repos/rackerlabs/blueflood/issues/440"},"comments":{"href":"https://api.github.com/repos/rackerlabs/blueflood/issues/440/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/440/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/blueflood/pulls/440/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/blueflood/statuses/ddee7e0a18fe5d72f749871ca1f43178401f5e49"}}}}