{"action":"created","comment":{"url":"https://api.github.com/repos/urbanairship/datacube/pulls/comments/174591148","pull_request_review_id":103976063,"id":174591148,"diff_hunk":"@@ -326,39 +391,66 @@ private void flushBatch(Batch<T> batch) throws IOException, InterruptedException\n \n         long nanoTimeBeforeBatch = System.nanoTime();\n \n+\n         try {\n-            for (Map.Entry<Address, T> entry : batchMap.entrySet()) {\n-                final Address address = entry.getKey();\n-                final T op = entry.getValue();\n-                final byte[] rowKey = ArrayUtils.addAll(uniqueCubeName, address.toWriteKey(idService));\n-                final long nanoTimeBeforeWrite = System.nanoTime();\n-\n-                byte[] dbBytes;\n-                switch (commitType) {\n-                    case INCREMENT:\n-                        long postIncr = increment(rowKey, op);\n-                        dbBytes = Bytes.toBytes(postIncr);\n-                        break;\n-                    case READ_COMBINE_CAS:\n-                        dbBytes = readCombineCas(rowKey, op);\n-                        break;\n-                    case OVERWRITE:\n-                        overwrite(rowKey, op);\n-                        dbBytes = op.serialize();\n-                        break;\n-                    default:\n-                        throw new RuntimeException(\"Unsupported commit type \" + commitType);\n+            if (commitType.equals(CommitType.INCREMENT) && configuration.batchSize > 1) {","path":"src/main/java/com/urbanairship/datacube/dbharnesses/HBaseDbHarness.java","position":171,"original_position":171,"commit_id":"13792abc3aa59a6f48eb51313a6f90bdd65647b7","original_commit_id":"13792abc3aa59a6f48eb51313a6f90bdd65647b7","user":{"login":"AWinterman","id":524923,"avatar_url":"https://avatars3.githubusercontent.com/u/524923?v=4","gravatar_id":"","url":"https://api.github.com/users/AWinterman","html_url":"https://github.com/AWinterman","followers_url":"https://api.github.com/users/AWinterman/followers","following_url":"https://api.github.com/users/AWinterman/following{/other_user}","gists_url":"https://api.github.com/users/AWinterman/gists{/gist_id}","starred_url":"https://api.github.com/users/AWinterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AWinterman/subscriptions","organizations_url":"https://api.github.com/users/AWinterman/orgs","repos_url":"https://api.github.com/users/AWinterman/repos","events_url":"https://api.github.com/users/AWinterman/events{/privacy}","received_events_url":"https://api.github.com/users/AWinterman/received_events","type":"User","site_admin":false},"body":"We'd still need an extra branch outside of it, and the iteration happens completely differently. I just dont think that's worth risking the changes to the existing logic.","created_at":"2018-03-14T19:56:38Z","updated_at":"2018-03-14T19:56:38Z","html_url":"https://github.com/urbanairship/datacube/pull/86#discussion_r174591148","pull_request_url":"https://api.github.com/repos/urbanairship/datacube/pulls/86","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/urbanairship/datacube/pulls/comments/174591148"},"html":{"href":"https://github.com/urbanairship/datacube/pull/86#discussion_r174591148"},"pull_request":{"href":"https://api.github.com/repos/urbanairship/datacube/pulls/86"}},"in_reply_to_id":174590600},"pull_request":{"url":"https://api.github.com/repos/urbanairship/datacube/pulls/86","id":175056559,"html_url":"https://github.com/urbanairship/datacube/pull/86","diff_url":"https://github.com/urbanairship/datacube/pull/86.diff","patch_url":"https://github.com/urbanairship/datacube/pull/86.patch","issue_url":"https://api.github.com/repos/urbanairship/datacube/issues/86","number":86,"state":"open","locked":false,"title":"add batch increment operation to hbase db harness","user":{"login":"AWinterman","id":524923,"avatar_url":"https://avatars3.githubusercontent.com/u/524923?v=4","gravatar_id":"","url":"https://api.github.com/users/AWinterman","html_url":"https://github.com/AWinterman","followers_url":"https://api.github.com/users/AWinterman/followers","following_url":"https://api.github.com/users/AWinterman/following{/other_user}","gists_url":"https://api.github.com/users/AWinterman/gists{/gist_id}","starred_url":"https://api.github.com/users/AWinterman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AWinterman/subscriptions","organizations_url":"https://api.github.com/users/AWinterman/orgs","repos_url":"https://api.github.com/users/AWinterman/repos","events_url":"https://api.github.com/users/AWinterman/events{/privacy}","received_events_url":"https://api.github.com/users/AWinterman/received_events","type":"User","site_admin":false},"body":"this lets us have each flusher increment more than a single row in each\r\nrequest, which should improve performance when writing a large number\r\nof dimensions either because we have many rollups, or because the batch\r\nincrements many different rows.\r\n\r\nAlso adds a configuration object to the hbasedb harness, since the number\r\nof primitive parameters has grown somewhat out of hand.\r\n\r\nAlso adds a shutdown method to the hbasedbharness that flushes the inflight messages and then shutsdown the threadpool","created_at":"2018-03-14T19:07:59Z","updated_at":"2018-03-14T19:56:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1584285782cae2ed517f0c2248fb390f59f0519","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/urbanairship/datacube/pulls/86/commits","review_comments_url":"https://api.github.com/repos/urbanairship/datacube/pulls/86/comments","review_comment_url":"https://api.github.com/repos/urbanairship/datacube/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urbanairship/datacube/issues/86/comments","statuses_url":"https://api.github.com/repos/urbanairship/datacube/statuses/13792abc3aa59a6f48eb51313a6f90bdd65647b7","head":{"label":"urbanairship:batch","ref":"batch","sha":"13792abc3aa59a6f48eb51313a6f90bdd65647b7","user":{"login":"urbanairship","id":360059,"avatar_url":"https://avatars0.githubusercontent.com/u/360059?v=4","gravatar_id":"","url":"https://api.github.com/users/urbanairship","html_url":"https://github.com/urbanairship","followers_url":"https://api.github.com/users/urbanairship/followers","following_url":"https://api.github.com/users/urbanairship/following{/other_user}","gists_url":"https://api.github.com/users/urbanairship/gists{/gist_id}","starred_url":"https://api.github.com/users/urbanairship/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbanairship/subscriptions","organizations_url":"https://api.github.com/users/urbanairship/orgs","repos_url":"https://api.github.com/users/urbanairship/repos","events_url":"https://api.github.com/users/urbanairship/events{/privacy}","received_events_url":"https://api.github.com/users/urbanairship/received_events","type":"Organization","site_admin":false},"repo":{"id":3655776,"name":"datacube","full_name":"urbanairship/datacube","owner":{"login":"urbanairship","id":360059,"avatar_url":"https://avatars0.githubusercontent.com/u/360059?v=4","gravatar_id":"","url":"https://api.github.com/users/urbanairship","html_url":"https://github.com/urbanairship","followers_url":"https://api.github.com/users/urbanairship/followers","following_url":"https://api.github.com/users/urbanairship/following{/other_user}","gists_url":"https://api.github.com/users/urbanairship/gists{/gist_id}","starred_url":"https://api.github.com/users/urbanairship/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbanairship/subscriptions","organizations_url":"https://api.github.com/users/urbanairship/orgs","repos_url":"https://api.github.com/users/urbanairship/repos","events_url":"https://api.github.com/users/urbanairship/events{/privacy}","received_events_url":"https://api.github.com/users/urbanairship/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/urbanairship/datacube","description":"Multidimensional data storage with rollups for numerical data","fork":false,"url":"https://api.github.com/repos/urbanairship/datacube","forks_url":"https://api.github.com/repos/urbanairship/datacube/forks","keys_url":"https://api.github.com/repos/urbanairship/datacube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urbanairship/datacube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urbanairship/datacube/teams","hooks_url":"https://api.github.com/repos/urbanairship/datacube/hooks","issue_events_url":"https://api.github.com/repos/urbanairship/datacube/issues/events{/number}","events_url":"https://api.github.com/repos/urbanairship/datacube/events","assignees_url":"https://api.github.com/repos/urbanairship/datacube/assignees{/user}","branches_url":"https://api.github.com/repos/urbanairship/datacube/branches{/branch}","tags_url":"https://api.github.com/repos/urbanairship/datacube/tags","blobs_url":"https://api.github.com/repos/urbanairship/datacube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urbanairship/datacube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urbanairship/datacube/git/refs{/sha}","trees_url":"https://api.github.com/repos/urbanairship/datacube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urbanairship/datacube/statuses/{sha}","languages_url":"https://api.github.com/repos/urbanairship/datacube/languages","stargazers_url":"https://api.github.com/repos/urbanairship/datacube/stargazers","contributors_url":"https://api.github.com/repos/urbanairship/datacube/contributors","subscribers_url":"https://api.github.com/repos/urbanairship/datacube/subscribers","subscription_url":"https://api.github.com/repos/urbanairship/datacube/subscription","commits_url":"https://api.github.com/repos/urbanairship/datacube/commits{/sha}","git_commits_url":"https://api.github.com/repos/urbanairship/datacube/git/commits{/sha}","comments_url":"https://api.github.com/repos/urbanairship/datacube/comments{/number}","issue_comment_url":"https://api.github.com/repos/urbanairship/datacube/issues/comments{/number}","contents_url":"https://api.github.com/repos/urbanairship/datacube/contents/{+path}","compare_url":"https://api.github.com/repos/urbanairship/datacube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urbanairship/datacube/merges","archive_url":"https://api.github.com/repos/urbanairship/datacube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urbanairship/datacube/downloads","issues_url":"https://api.github.com/repos/urbanairship/datacube/issues{/number}","pulls_url":"https://api.github.com/repos/urbanairship/datacube/pulls{/number}","milestones_url":"https://api.github.com/repos/urbanairship/datacube/milestones{/number}","notifications_url":"https://api.github.com/repos/urbanairship/datacube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urbanairship/datacube/labels{/name}","releases_url":"https://api.github.com/repos/urbanairship/datacube/releases{/id}","deployments_url":"https://api.github.com/repos/urbanairship/datacube/deployments","created_at":"2012-03-08T01:55:05Z","updated_at":"2018-03-07T05:15:56Z","pushed_at":"2018-03-14T19:37:34Z","git_url":"git://github.com/urbanairship/datacube.git","ssh_url":"git@github.com:urbanairship/datacube.git","clone_url":"https://github.com/urbanairship/datacube.git","svn_url":"https://github.com/urbanairship/datacube","homepage":"http://urbanairship.com","size":4686,"stargazers_count":258,"watchers_count":258,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":61,"open_issues":13,"watchers":258,"default_branch":"master"}},"base":{"label":"urbanairship:master","ref":"master","sha":"c21dfca4a999de9d837aca533fa864106858b30d","user":{"login":"urbanairship","id":360059,"avatar_url":"https://avatars0.githubusercontent.com/u/360059?v=4","gravatar_id":"","url":"https://api.github.com/users/urbanairship","html_url":"https://github.com/urbanairship","followers_url":"https://api.github.com/users/urbanairship/followers","following_url":"https://api.github.com/users/urbanairship/following{/other_user}","gists_url":"https://api.github.com/users/urbanairship/gists{/gist_id}","starred_url":"https://api.github.com/users/urbanairship/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbanairship/subscriptions","organizations_url":"https://api.github.com/users/urbanairship/orgs","repos_url":"https://api.github.com/users/urbanairship/repos","events_url":"https://api.github.com/users/urbanairship/events{/privacy}","received_events_url":"https://api.github.com/users/urbanairship/received_events","type":"Organization","site_admin":false},"repo":{"id":3655776,"name":"datacube","full_name":"urbanairship/datacube","owner":{"login":"urbanairship","id":360059,"avatar_url":"https://avatars0.githubusercontent.com/u/360059?v=4","gravatar_id":"","url":"https://api.github.com/users/urbanairship","html_url":"https://github.com/urbanairship","followers_url":"https://api.github.com/users/urbanairship/followers","following_url":"https://api.github.com/users/urbanairship/following{/other_user}","gists_url":"https://api.github.com/users/urbanairship/gists{/gist_id}","starred_url":"https://api.github.com/users/urbanairship/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbanairship/subscriptions","organizations_url":"https://api.github.com/users/urbanairship/orgs","repos_url":"https://api.github.com/users/urbanairship/repos","events_url":"https://api.github.com/users/urbanairship/events{/privacy}","received_events_url":"https://api.github.com/users/urbanairship/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/urbanairship/datacube","description":"Multidimensional data storage with rollups for numerical data","fork":false,"url":"https://api.github.com/repos/urbanairship/datacube","forks_url":"https://api.github.com/repos/urbanairship/datacube/forks","keys_url":"https://api.github.com/repos/urbanairship/datacube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urbanairship/datacube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urbanairship/datacube/teams","hooks_url":"https://api.github.com/repos/urbanairship/datacube/hooks","issue_events_url":"https://api.github.com/repos/urbanairship/datacube/issues/events{/number}","events_url":"https://api.github.com/repos/urbanairship/datacube/events","assignees_url":"https://api.github.com/repos/urbanairship/datacube/assignees{/user}","branches_url":"https://api.github.com/repos/urbanairship/datacube/branches{/branch}","tags_url":"https://api.github.com/repos/urbanairship/datacube/tags","blobs_url":"https://api.github.com/repos/urbanairship/datacube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urbanairship/datacube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urbanairship/datacube/git/refs{/sha}","trees_url":"https://api.github.com/repos/urbanairship/datacube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urbanairship/datacube/statuses/{sha}","languages_url":"https://api.github.com/repos/urbanairship/datacube/languages","stargazers_url":"https://api.github.com/repos/urbanairship/datacube/stargazers","contributors_url":"https://api.github.com/repos/urbanairship/datacube/contributors","subscribers_url":"https://api.github.com/repos/urbanairship/datacube/subscribers","subscription_url":"https://api.github.com/repos/urbanairship/datacube/subscription","commits_url":"https://api.github.com/repos/urbanairship/datacube/commits{/sha}","git_commits_url":"https://api.github.com/repos/urbanairship/datacube/git/commits{/sha}","comments_url":"https://api.github.com/repos/urbanairship/datacube/comments{/number}","issue_comment_url":"https://api.github.com/repos/urbanairship/datacube/issues/comments{/number}","contents_url":"https://api.github.com/repos/urbanairship/datacube/contents/{+path}","compare_url":"https://api.github.com/repos/urbanairship/datacube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urbanairship/datacube/merges","archive_url":"https://api.github.com/repos/urbanairship/datacube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urbanairship/datacube/downloads","issues_url":"https://api.github.com/repos/urbanairship/datacube/issues{/number}","pulls_url":"https://api.github.com/repos/urbanairship/datacube/pulls{/number}","milestones_url":"https://api.github.com/repos/urbanairship/datacube/milestones{/number}","notifications_url":"https://api.github.com/repos/urbanairship/datacube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urbanairship/datacube/labels{/name}","releases_url":"https://api.github.com/repos/urbanairship/datacube/releases{/id}","deployments_url":"https://api.github.com/repos/urbanairship/datacube/deployments","created_at":"2012-03-08T01:55:05Z","updated_at":"2018-03-07T05:15:56Z","pushed_at":"2018-03-14T19:37:34Z","git_url":"git://github.com/urbanairship/datacube.git","ssh_url":"git@github.com:urbanairship/datacube.git","clone_url":"https://github.com/urbanairship/datacube.git","svn_url":"https://github.com/urbanairship/datacube","homepage":"http://urbanairship.com","size":4686,"stargazers_count":258,"watchers_count":258,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":61,"open_issues":13,"watchers":258,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urbanairship/datacube/pulls/86"},"html":{"href":"https://github.com/urbanairship/datacube/pull/86"},"issue":{"href":"https://api.github.com/repos/urbanairship/datacube/issues/86"},"comments":{"href":"https://api.github.com/repos/urbanairship/datacube/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/urbanairship/datacube/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/urbanairship/datacube/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urbanairship/datacube/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/urbanairship/datacube/statuses/13792abc3aa59a6f48eb51313a6f90bdd65647b7"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"AWinterman"}}