{"action":"created","comment":{"url":"https://api.github.com/repos/druid-io/druid/pulls/comments/79450588","id":79450588,"diff_hunk":"@@ -335,6 +359,8 @@ public void stop(boolean stopGracefully)\n         }\n         log.info(\"Shutdown notice handled\");\n \n+        taskClient.close();\n+        workerExec.shutdown();","path":"extensions-core/kafka-indexing-service/src/main/java/io/druid/indexing/kafka/supervisor/KafkaSupervisor.java","position":151,"original_position":151,"commit_id":"c4a5ddd207a716dc2f773e7c5364f73d157f9bcc","original_commit_id":"c4a5ddd207a716dc2f773e7c5364f73d157f9bcc","user":{"login":"gianm","id":1214075,"avatar_url":"https://avatars.githubusercontent.com/u/1214075?v=3","gravatar_id":"","url":"https://api.github.com/users/gianm","html_url":"https://github.com/gianm","followers_url":"https://api.github.com/users/gianm/followers","following_url":"https://api.github.com/users/gianm/following{/other_user}","gists_url":"https://api.github.com/users/gianm/gists{/gist_id}","starred_url":"https://api.github.com/users/gianm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gianm/subscriptions","organizations_url":"https://api.github.com/users/gianm/orgs","repos_url":"https://api.github.com/users/gianm/repos","events_url":"https://api.github.com/users/gianm/events{/privacy}","received_events_url":"https://api.github.com/users/gianm/received_events","type":"User","site_admin":false},"body":"What's the rationale for shutdown vs shutdownNow here?","created_at":"2016-09-19T17:57:31Z","updated_at":"2016-09-19T18:03:06Z","html_url":"https://github.com/druid-io/druid/pull/3452#discussion_r79450588","pull_request_url":"https://api.github.com/repos/druid-io/druid/pulls/3452","_links":{"self":{"href":"https://api.github.com/repos/druid-io/druid/pulls/comments/79450588"},"html":{"href":"https://github.com/druid-io/druid/pull/3452#discussion_r79450588"},"pull_request":{"href":"https://api.github.com/repos/druid-io/druid/pulls/3452"}}},"pull_request":{"url":"https://api.github.com/repos/druid-io/druid/pulls/3452","id":84922911,"html_url":"https://github.com/druid-io/druid/pull/3452","diff_url":"https://github.com/druid-io/druid/pull/3452.diff","patch_url":"https://github.com/druid-io/druid/pull/3452.patch","issue_url":"https://api.github.com/repos/druid-io/druid/issues/3452","number":3452,"state":"open","locked":false,"title":"KafkaSupervisor parallel HTTP requests","user":{"login":"dclim","id":11050882,"avatar_url":"https://avatars.githubusercontent.com/u/11050882?v=3","gravatar_id":"","url":"https://api.github.com/users/dclim","html_url":"https://github.com/dclim","followers_url":"https://api.github.com/users/dclim/followers","following_url":"https://api.github.com/users/dclim/following{/other_user}","gists_url":"https://api.github.com/users/dclim/gists{/gist_id}","starred_url":"https://api.github.com/users/dclim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dclim/subscriptions","organizations_url":"https://api.github.com/users/dclim/orgs","repos_url":"https://api.github.com/users/dclim/repos","events_url":"https://api.github.com/users/dclim/events{/privacy}","received_events_url":"https://api.github.com/users/dclim/received_events","type":"User","site_admin":false},"body":"The initial version of the supervisor was single-threaded which worked well enough in general but resulted in poor responsiveness when HTTP requests to the index task ChatHandlers didn't return in a timely fashion. The main change in this PR is to issue HTTP requests to multiple tasks simultaneously to improve the responsiveness of the supervisor. The overall coordination logic has not been changed.\r\n\r\nSummary of changes:\r\n\r\n**KafkaIndexTaskClient**\r\n- add better logging\r\n- make retries and timeouts configurable\r\n- add ListenableFuture async wrapper methods\r\n\r\n**KafkaSupervisor**\r\n- change concurrently accessed data structures to concurrent variants\r\n- separate issuing of HTTP requests (through KafkaIndexTaskClient) and supervision logic so that we can send parallel HTTP requests without waiting for responses and then wait on the responses as a group instead of sequentially\r\n\r\n**Testing**\r\n- existing tests all pass with minor modifications mainly to support new mock expectations\r\n- added new tests to test async KafkaIndexTaskClient methods; tests run parameterized with single/multiple threads\r\n- added additional tests to KafkaSupervisor to test expected handling of unresponsive tasks and graceful shutdown behavior\r\n- added basic integration test for Kafka indexing service to test task creation, handoff, and proper offset continuation between tasks\r\n\r\nHas been running for a few days in our test cluster with no related issues. \r\n\r\nFixes #3197 \r\n","created_at":"2016-09-12T18:44:53Z","updated_at":"2016-09-19T18:03:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90834ad9cc5712693b2dfb268c67a1c0240df0b5","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/druid-io/druid/milestones/20","html_url":"https://github.com/druid-io/druid/milestones/0.9.2","labels_url":"https://api.github.com/repos/druid-io/druid/milestones/20/labels","id":1571409,"number":20,"title":"0.9.2","description":"","creator":{"login":"fjy","id":428325,"avatar_url":"https://avatars.githubusercontent.com/u/428325?v=3","gravatar_id":"","url":"https://api.github.com/users/fjy","html_url":"https://github.com/fjy","followers_url":"https://api.github.com/users/fjy/followers","following_url":"https://api.github.com/users/fjy/following{/other_user}","gists_url":"https://api.github.com/users/fjy/gists{/gist_id}","starred_url":"https://api.github.com/users/fjy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fjy/subscriptions","organizations_url":"https://api.github.com/users/fjy/orgs","repos_url":"https://api.github.com/users/fjy/repos","events_url":"https://api.github.com/users/fjy/events{/privacy}","received_events_url":"https://api.github.com/users/fjy/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":170,"state":"open","created_at":"2016-02-08T22:01:21Z","updated_at":"2016-09-16T20:45:54Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/druid-io/druid/pulls/3452/commits","review_comments_url":"https://api.github.com/repos/druid-io/druid/pulls/3452/comments","review_comment_url":"https://api.github.com/repos/druid-io/druid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/druid-io/druid/issues/3452/comments","statuses_url":"https://api.github.com/repos/druid-io/druid/statuses/c4a5ddd207a716dc2f773e7c5364f73d157f9bcc","head":{"label":"dclim:kafkaindextaskclient-parallel","ref":"kafkaindextaskclient-parallel","sha":"c4a5ddd207a716dc2f773e7c5364f73d157f9bcc","user":{"login":"dclim","id":11050882,"avatar_url":"https://avatars.githubusercontent.com/u/11050882?v=3","gravatar_id":"","url":"https://api.github.com/users/dclim","html_url":"https://github.com/dclim","followers_url":"https://api.github.com/users/dclim/followers","following_url":"https://api.github.com/users/dclim/following{/other_user}","gists_url":"https://api.github.com/users/dclim/gists{/gist_id}","starred_url":"https://api.github.com/users/dclim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dclim/subscriptions","organizations_url":"https://api.github.com/users/dclim/orgs","repos_url":"https://api.github.com/users/dclim/repos","events_url":"https://api.github.com/users/dclim/events{/privacy}","received_events_url":"https://api.github.com/users/dclim/received_events","type":"User","site_admin":false},"repo":{"id":42546365,"name":"druid","full_name":"dclim/druid","owner":{"login":"dclim","id":11050882,"avatar_url":"https://avatars.githubusercontent.com/u/11050882?v=3","gravatar_id":"","url":"https://api.github.com/users/dclim","html_url":"https://github.com/dclim","followers_url":"https://api.github.com/users/dclim/followers","following_url":"https://api.github.com/users/dclim/following{/other_user}","gists_url":"https://api.github.com/users/dclim/gists{/gist_id}","starred_url":"https://api.github.com/users/dclim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dclim/subscriptions","organizations_url":"https://api.github.com/users/dclim/orgs","repos_url":"https://api.github.com/users/dclim/repos","events_url":"https://api.github.com/users/dclim/events{/privacy}","received_events_url":"https://api.github.com/users/dclim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dclim/druid","description":"Column oriented distributed data store ideal for powering interactive applications","fork":true,"url":"https://api.github.com/repos/dclim/druid","forks_url":"https://api.github.com/repos/dclim/druid/forks","keys_url":"https://api.github.com/repos/dclim/druid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dclim/druid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dclim/druid/teams","hooks_url":"https://api.github.com/repos/dclim/druid/hooks","issue_events_url":"https://api.github.com/repos/dclim/druid/issues/events{/number}","events_url":"https://api.github.com/repos/dclim/druid/events","assignees_url":"https://api.github.com/repos/dclim/druid/assignees{/user}","branches_url":"https://api.github.com/repos/dclim/druid/branches{/branch}","tags_url":"https://api.github.com/repos/dclim/druid/tags","blobs_url":"https://api.github.com/repos/dclim/druid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dclim/druid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dclim/druid/git/refs{/sha}","trees_url":"https://api.github.com/repos/dclim/druid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dclim/druid/statuses/{sha}","languages_url":"https://api.github.com/repos/dclim/druid/languages","stargazers_url":"https://api.github.com/repos/dclim/druid/stargazers","contributors_url":"https://api.github.com/repos/dclim/druid/contributors","subscribers_url":"https://api.github.com/repos/dclim/druid/subscribers","subscription_url":"https://api.github.com/repos/dclim/druid/subscription","commits_url":"https://api.github.com/repos/dclim/druid/commits{/sha}","git_commits_url":"https://api.github.com/repos/dclim/druid/git/commits{/sha}","comments_url":"https://api.github.com/repos/dclim/druid/comments{/number}","issue_comment_url":"https://api.github.com/repos/dclim/druid/issues/comments{/number}","contents_url":"https://api.github.com/repos/dclim/druid/contents/{+path}","compare_url":"https://api.github.com/repos/dclim/druid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dclim/druid/merges","archive_url":"https://api.github.com/repos/dclim/druid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dclim/druid/downloads","issues_url":"https://api.github.com/repos/dclim/druid/issues{/number}","pulls_url":"https://api.github.com/repos/dclim/druid/pulls{/number}","milestones_url":"https://api.github.com/repos/dclim/druid/milestones{/number}","notifications_url":"https://api.github.com/repos/dclim/druid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dclim/druid/labels{/name}","releases_url":"https://api.github.com/repos/dclim/druid/releases{/id}","deployments_url":"https://api.github.com/repos/dclim/druid/deployments","created_at":"2015-09-15T21:02:07Z","updated_at":"2016-02-01T17:26:20Z","pushed_at":"2016-09-12T17:38:50Z","git_url":"git://github.com/dclim/druid.git","ssh_url":"git@github.com:dclim/druid.git","clone_url":"https://github.com/dclim/druid.git","svn_url":"https://github.com/dclim/druid","homepage":"http://druid.io","size":109057,"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":"druid-io:master","ref":"master","sha":"1a5042ca26cd0b94f545dbaced85934b27867bf0","user":{"login":"druid-io","id":4203474,"avatar_url":"https://avatars.githubusercontent.com/u/4203474?v=3","gravatar_id":"","url":"https://api.github.com/users/druid-io","html_url":"https://github.com/druid-io","followers_url":"https://api.github.com/users/druid-io/followers","following_url":"https://api.github.com/users/druid-io/following{/other_user}","gists_url":"https://api.github.com/users/druid-io/gists{/gist_id}","starred_url":"https://api.github.com/users/druid-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/druid-io/subscriptions","organizations_url":"https://api.github.com/users/druid-io/orgs","repos_url":"https://api.github.com/users/druid-io/repos","events_url":"https://api.github.com/users/druid-io/events{/privacy}","received_events_url":"https://api.github.com/users/druid-io/received_events","type":"Organization","site_admin":false},"repo":{"id":6358188,"name":"druid","full_name":"druid-io/druid","owner":{"login":"druid-io","id":4203474,"avatar_url":"https://avatars.githubusercontent.com/u/4203474?v=3","gravatar_id":"","url":"https://api.github.com/users/druid-io","html_url":"https://github.com/druid-io","followers_url":"https://api.github.com/users/druid-io/followers","following_url":"https://api.github.com/users/druid-io/following{/other_user}","gists_url":"https://api.github.com/users/druid-io/gists{/gist_id}","starred_url":"https://api.github.com/users/druid-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/druid-io/subscriptions","organizations_url":"https://api.github.com/users/druid-io/orgs","repos_url":"https://api.github.com/users/druid-io/repos","events_url":"https://api.github.com/users/druid-io/events{/privacy}","received_events_url":"https://api.github.com/users/druid-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/druid-io/druid","description":"Column oriented distributed data store ideal for powering interactive applications","fork":false,"url":"https://api.github.com/repos/druid-io/druid","forks_url":"https://api.github.com/repos/druid-io/druid/forks","keys_url":"https://api.github.com/repos/druid-io/druid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/druid-io/druid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/druid-io/druid/teams","hooks_url":"https://api.github.com/repos/druid-io/druid/hooks","issue_events_url":"https://api.github.com/repos/druid-io/druid/issues/events{/number}","events_url":"https://api.github.com/repos/druid-io/druid/events","assignees_url":"https://api.github.com/repos/druid-io/druid/assignees{/user}","branches_url":"https://api.github.com/repos/druid-io/druid/branches{/branch}","tags_url":"https://api.github.com/repos/druid-io/druid/tags","blobs_url":"https://api.github.com/repos/druid-io/druid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/druid-io/druid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/druid-io/druid/git/refs{/sha}","trees_url":"https://api.github.com/repos/druid-io/druid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/druid-io/druid/statuses/{sha}","languages_url":"https://api.github.com/repos/druid-io/druid/languages","stargazers_url":"https://api.github.com/repos/druid-io/druid/stargazers","contributors_url":"https://api.github.com/repos/druid-io/druid/contributors","subscribers_url":"https://api.github.com/repos/druid-io/druid/subscribers","subscription_url":"https://api.github.com/repos/druid-io/druid/subscription","commits_url":"https://api.github.com/repos/druid-io/druid/commits{/sha}","git_commits_url":"https://api.github.com/repos/druid-io/druid/git/commits{/sha}","comments_url":"https://api.github.com/repos/druid-io/druid/comments{/number}","issue_comment_url":"https://api.github.com/repos/druid-io/druid/issues/comments{/number}","contents_url":"https://api.github.com/repos/druid-io/druid/contents/{+path}","compare_url":"https://api.github.com/repos/druid-io/druid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/druid-io/druid/merges","archive_url":"https://api.github.com/repos/druid-io/druid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/druid-io/druid/downloads","issues_url":"https://api.github.com/repos/druid-io/druid/issues{/number}","pulls_url":"https://api.github.com/repos/druid-io/druid/pulls{/number}","milestones_url":"https://api.github.com/repos/druid-io/druid/milestones{/number}","notifications_url":"https://api.github.com/repos/druid-io/druid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/druid-io/druid/labels{/name}","releases_url":"https://api.github.com/repos/druid-io/druid/releases{/id}","deployments_url":"https://api.github.com/repos/druid-io/druid/deployments","created_at":"2012-10-23T19:08:07Z","updated_at":"2016-09-19T15:27:27Z","pushed_at":"2016-09-19T11:01:25Z","git_url":"git://github.com/druid-io/druid.git","ssh_url":"git@github.com:druid-io/druid.git","clone_url":"https://github.com/druid-io/druid.git","svn_url":"https://github.com/druid-io/druid","homepage":"http://druid.io","size":156395,"stargazers_count":3727,"watchers_count":3727,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":873,"mirror_url":null,"open_issues_count":513,"forks":873,"open_issues":513,"watchers":3727,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/druid-io/druid/pulls/3452"},"html":{"href":"https://github.com/druid-io/druid/pull/3452"},"issue":{"href":"https://api.github.com/repos/druid-io/druid/issues/3452"},"comments":{"href":"https://api.github.com/repos/druid-io/druid/issues/3452/comments"},"review_comments":{"href":"https://api.github.com/repos/druid-io/druid/pulls/3452/comments"},"review_comment":{"href":"https://api.github.com/repos/druid-io/druid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/druid-io/druid/pulls/3452/commits"},"statuses":{"href":"https://api.github.com/repos/druid-io/druid/statuses/c4a5ddd207a716dc2f773e7c5364f73d157f9bcc"}}}}
{"actor":{"display_login":"gianm"}}