{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments/39067889","id":39067889,"diff_hunk":"@@ -91,48 +83,22 @@ public BigtableBufferedMutator(\n       String dataHost,\n       BufferedMutator.ExceptionListener listener,\n       ExecutorService heapSizeExecutor) {\n-    this.client = client;\n     this.adapter = adapter;\n-    this.sizeManager = new HeapSizeManager(maxHeapSize, maxInflightRpcs, heapSizeExecutor);\n     this.configuration = configuration;\n     this.exceptionListener = listener;\n     this.host = dataHost;\n+    this.asyncMutator = new AsyncMutator(client, maxInflightRpcs, maxHeapSize, heapSizeExecutor);\n   }\n \n   @Override\n   public void close() throws IOException {\n-    WriteLock lock = mutationLock.writeLock();\n-    lock.lock();\n-    try {\n-      if (!closed) {\n-        doFlush();\n-        closed = true;\n-      }\n-    } finally {\n-      lock.unlock();\n-    }\n+    flush();","path":"bigtable-hbase/src/main/java/com/google/cloud/bigtable/hbase/BigtableBufferedMutator.java","position":69,"original_position":69,"commit_id":"9afdfabfa001e7c782de8b9129097ccee5db648d","original_commit_id":"51469d97b3101e4044b0348079eaa3a2724344f2","user":{"login":"sduskis","id":99305,"avatar_url":"https://avatars.githubusercontent.com/u/99305?v=3","gravatar_id":"","url":"https://api.github.com/users/sduskis","html_url":"https://github.com/sduskis","followers_url":"https://api.github.com/users/sduskis/followers","following_url":"https://api.github.com/users/sduskis/following{/other_user}","gists_url":"https://api.github.com/users/sduskis/gists{/gist_id}","starred_url":"https://api.github.com/users/sduskis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sduskis/subscriptions","organizations_url":"https://api.github.com/users/sduskis/orgs","repos_url":"https://api.github.com/users/sduskis/repos","events_url":"https://api.github.com/users/sduskis/events{/privacy}","received_events_url":"https://api.github.com/users/sduskis/received_events","type":"User","site_admin":false},"body":"Angus and I went back and forth on this one.  We should always flush, even if a user previously closed; the user may have had an exception that happened in a previous call to close, so try to complete the calls again.","created_at":"2015-09-09T16:54:24Z","updated_at":"2015-09-09T16:54:24Z","html_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/474#discussion_r39067889","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/474","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments/39067889"},"html":{"href":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/474#discussion_r39067889"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/474"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/474","id":44561960,"html_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/474","diff_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/474.diff","patch_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/474.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/474","number":474,"state":"open","locked":false,"title":"Introducing AsyncMutator - a version of BufferedMutator without HBase.","user":{"login":"sduskis","id":99305,"avatar_url":"https://avatars.githubusercontent.com/u/99305?v=3","gravatar_id":"","url":"https://api.github.com/users/sduskis","html_url":"https://github.com/sduskis","followers_url":"https://api.github.com/users/sduskis/followers","following_url":"https://api.github.com/users/sduskis/following{/other_user}","gists_url":"https://api.github.com/users/sduskis/gists{/gist_id}","starred_url":"https://api.github.com/users/sduskis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sduskis/subscriptions","organizations_url":"https://api.github.com/users/sduskis/orgs","repos_url":"https://api.github.com/users/sduskis/repos","events_url":"https://api.github.com/users/sduskis/events{/privacy}","received_events_url":"https://api.github.com/users/sduskis/received_events","type":"User","site_admin":false},"body":"BigtableBufferedMutator now leverages AsyncMutator to perfom throttling.","created_at":"2015-09-09T15:10:11Z","updated_at":"2015-09-09T16:54:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f565b9c3ac6ca9567081c2af643f0da7772f7799","assignee":{"login":"kevinsi4508","id":11320261,"avatar_url":"https://avatars.githubusercontent.com/u/11320261?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsi4508","html_url":"https://github.com/kevinsi4508","followers_url":"https://api.github.com/users/kevinsi4508/followers","following_url":"https://api.github.com/users/kevinsi4508/following{/other_user}","gists_url":"https://api.github.com/users/kevinsi4508/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsi4508/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsi4508/subscriptions","organizations_url":"https://api.github.com/users/kevinsi4508/orgs","repos_url":"https://api.github.com/users/kevinsi4508/repos","events_url":"https://api.github.com/users/kevinsi4508/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsi4508/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/474/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/474/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/474/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/statuses/9afdfabfa001e7c782de8b9129097ccee5db648d","head":{"label":"sduskis:introduce_async_manager","ref":"introduce_async_manager","sha":"9afdfabfa001e7c782de8b9129097ccee5db648d","user":{"login":"sduskis","id":99305,"avatar_url":"https://avatars.githubusercontent.com/u/99305?v=3","gravatar_id":"","url":"https://api.github.com/users/sduskis","html_url":"https://github.com/sduskis","followers_url":"https://api.github.com/users/sduskis/followers","following_url":"https://api.github.com/users/sduskis/following{/other_user}","gists_url":"https://api.github.com/users/sduskis/gists{/gist_id}","starred_url":"https://api.github.com/users/sduskis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sduskis/subscriptions","organizations_url":"https://api.github.com/users/sduskis/orgs","repos_url":"https://api.github.com/users/sduskis/repos","events_url":"https://api.github.com/users/sduskis/events{/privacy}","received_events_url":"https://api.github.com/users/sduskis/received_events","type":"User","site_admin":false},"repo":{"id":35497990,"name":"cloud-bigtable-client","full_name":"sduskis/cloud-bigtable-client","owner":{"login":"sduskis","id":99305,"avatar_url":"https://avatars.githubusercontent.com/u/99305?v=3","gravatar_id":"","url":"https://api.github.com/users/sduskis","html_url":"https://github.com/sduskis","followers_url":"https://api.github.com/users/sduskis/followers","following_url":"https://api.github.com/users/sduskis/following{/other_user}","gists_url":"https://api.github.com/users/sduskis/gists{/gist_id}","starred_url":"https://api.github.com/users/sduskis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sduskis/subscriptions","organizations_url":"https://api.github.com/users/sduskis/orgs","repos_url":"https://api.github.com/users/sduskis/repos","events_url":"https://api.github.com/users/sduskis/events{/privacy}","received_events_url":"https://api.github.com/users/sduskis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sduskis/cloud-bigtable-client","description":"HBase client extension to access Google Cloud Bigtable","fork":true,"url":"https://api.github.com/repos/sduskis/cloud-bigtable-client","forks_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/forks","keys_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/teams","hooks_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/hooks","issue_events_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/issues/events{/number}","events_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/events","assignees_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/assignees{/user}","branches_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/branches{/branch}","tags_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/tags","blobs_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/statuses/{sha}","languages_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/languages","stargazers_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/stargazers","contributors_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/contributors","subscribers_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/subscribers","subscription_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/subscription","commits_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/contents/{+path}","compare_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/merges","archive_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/downloads","issues_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/issues{/number}","pulls_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/pulls{/number}","milestones_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/milestones{/number}","notifications_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/labels{/name}","releases_url":"https://api.github.com/repos/sduskis/cloud-bigtable-client/releases{/id}","created_at":"2015-05-12T15:56:54Z","updated_at":"2015-05-12T15:58:10Z","pushed_at":"2015-09-09T16:40:10Z","git_url":"git://github.com/sduskis/cloud-bigtable-client.git","ssh_url":"git@github.com:sduskis/cloud-bigtable-client.git","clone_url":"https://github.com/sduskis/cloud-bigtable-client.git","svn_url":"https://github.com/sduskis/cloud-bigtable-client","homepage":"","size":4936,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"GoogleCloudPlatform:master","ref":"master","sha":"8ed270a38d18200a6afb033b169a25e21489a47c","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":18442381,"name":"cloud-bigtable-client","full_name":"GoogleCloudPlatform/cloud-bigtable-client","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client","description":"HBase client extension to access Google Cloud Bigtable","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/releases{/id}","created_at":"2014-04-04T14:54:35Z","updated_at":"2015-09-08T17:28:59Z","pushed_at":"2015-09-09T16:40:10Z","git_url":"git://github.com/GoogleCloudPlatform/cloud-bigtable-client.git","ssh_url":"git@github.com:GoogleCloudPlatform/cloud-bigtable-client.git","clone_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client.git","svn_url":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client","homepage":"","size":13107,"stargazers_count":28,"watchers_count":28,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":6,"forks":16,"open_issues":6,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/474"},"html":{"href":"https://github.com/GoogleCloudPlatform/cloud-bigtable-client/pull/474"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/474"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/issues/474/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/474/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/pulls/474/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-bigtable-client/statuses/9afdfabfa001e7c782de8b9129097ccee5db648d"}}}}