{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/42322137","id":42322137,"diff_hunk":"@@ -58,19 +65,64 @@ object ZkUtils extends Logging {\n   val IsrChangeNotificationPath = \"/isr_change_notification\"\n   val EntityConfigPath = \"/config\"\n   val EntityConfigChangesPath = \"/config/changes\"\n+  \n+  \n+  def apply(zkUrl: String, sessionTimeout: Int, connectionTimeout: Int, isZkSecurityEnabled: Boolean): ZkUtils = {\n+    val (zkClient, zkConnection) = createZkClientAndConnection(zkUrl, sessionTimeout, connectionTimeout)\n+    new ZkUtils(zkClient, zkConnection, isZkSecurityEnabled)\n+  }","path":"core/src/main/scala/kafka/utils/ZkUtils.scala","position":47,"original_position":47,"commit_id":"58e17b2d0a2d53c53050efc68cb83de7649b9ea2","original_commit_id":"58e17b2d0a2d53c53050efc68cb83de7649b9ea2","user":{"login":"fpj","id":572920,"avatar_url":"https://avatars.githubusercontent.com/u/572920?v=3","gravatar_id":"","url":"https://api.github.com/users/fpj","html_url":"https://github.com/fpj","followers_url":"https://api.github.com/users/fpj/followers","following_url":"https://api.github.com/users/fpj/following{/other_user}","gists_url":"https://api.github.com/users/fpj/gists{/gist_id}","starred_url":"https://api.github.com/users/fpj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpj/subscriptions","organizations_url":"https://api.github.com/users/fpj/orgs","repos_url":"https://api.github.com/users/fpj/repos","events_url":"https://api.github.com/users/fpj/events{/privacy}","received_events_url":"https://api.github.com/users/fpj/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2015-10-18T15:29:45Z","updated_at":"2015-10-18T15:29:45Z","html_url":"https://github.com/apache/kafka/pull/303#discussion_r42322137","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/303","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/42322137"},"html":{"href":"https://github.com/apache/kafka/pull/303#discussion_r42322137"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/303"}}},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/303","id":47530262,"html_url":"https://github.com/apache/kafka/pull/303","diff_url":"https://github.com/apache/kafka/pull/303.diff","patch_url":"https://github.com/apache/kafka/pull/303.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/303","number":303,"state":"open","locked":false,"title":"KAFKA-2639: Refactoring of ZkUtils","user":{"login":"fpj","id":572920,"avatar_url":"https://avatars.githubusercontent.com/u/572920?v=3","gravatar_id":"","url":"https://api.github.com/users/fpj","html_url":"https://github.com/fpj","followers_url":"https://api.github.com/users/fpj/followers","following_url":"https://api.github.com/users/fpj/following{/other_user}","gists_url":"https://api.github.com/users/fpj/gists{/gist_id}","starred_url":"https://api.github.com/users/fpj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpj/subscriptions","organizations_url":"https://api.github.com/users/fpj/orgs","repos_url":"https://api.github.com/users/fpj/repos","events_url":"https://api.github.com/users/fpj/events{/privacy}","received_events_url":"https://api.github.com/users/fpj/received_events","type":"User","site_admin":false},"body":"I've split the work of KAFKA-1695 because this refactoring touches a large number of files. Most of the changes are trivial, but I feel it will be easier to review this way.\r\n\r\nThis pull request includes the one @Parth-Brahmbhatt started to address KAFKA-1695.  ","created_at":"2015-10-13T13:07:14Z","updated_at":"2015-10-18T15:29:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40085c6274738980e9db51528f514bffcb8a506a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/303/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/303/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/303/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/58e17b2d0a2d53c53050efc68cb83de7649b9ea2","head":{"label":"fpj:KAFKA-2639","ref":"KAFKA-2639","sha":"58e17b2d0a2d53c53050efc68cb83de7649b9ea2","user":{"login":"fpj","id":572920,"avatar_url":"https://avatars.githubusercontent.com/u/572920?v=3","gravatar_id":"","url":"https://api.github.com/users/fpj","html_url":"https://github.com/fpj","followers_url":"https://api.github.com/users/fpj/followers","following_url":"https://api.github.com/users/fpj/following{/other_user}","gists_url":"https://api.github.com/users/fpj/gists{/gist_id}","starred_url":"https://api.github.com/users/fpj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpj/subscriptions","organizations_url":"https://api.github.com/users/fpj/orgs","repos_url":"https://api.github.com/users/fpj/repos","events_url":"https://api.github.com/users/fpj/events{/privacy}","received_events_url":"https://api.github.com/users/fpj/received_events","type":"User","site_admin":false},"repo":{"id":39900213,"name":"kafka","full_name":"fpj/kafka","owner":{"login":"fpj","id":572920,"avatar_url":"https://avatars.githubusercontent.com/u/572920?v=3","gravatar_id":"","url":"https://api.github.com/users/fpj","html_url":"https://github.com/fpj","followers_url":"https://api.github.com/users/fpj/followers","following_url":"https://api.github.com/users/fpj/following{/other_user}","gists_url":"https://api.github.com/users/fpj/gists{/gist_id}","starred_url":"https://api.github.com/users/fpj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpj/subscriptions","organizations_url":"https://api.github.com/users/fpj/orgs","repos_url":"https://api.github.com/users/fpj/repos","events_url":"https://api.github.com/users/fpj/events{/privacy}","received_events_url":"https://api.github.com/users/fpj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fpj/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/fpj/kafka","forks_url":"https://api.github.com/repos/fpj/kafka/forks","keys_url":"https://api.github.com/repos/fpj/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fpj/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fpj/kafka/teams","hooks_url":"https://api.github.com/repos/fpj/kafka/hooks","issue_events_url":"https://api.github.com/repos/fpj/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/fpj/kafka/events","assignees_url":"https://api.github.com/repos/fpj/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/fpj/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/fpj/kafka/tags","blobs_url":"https://api.github.com/repos/fpj/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fpj/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fpj/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/fpj/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fpj/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/fpj/kafka/languages","stargazers_url":"https://api.github.com/repos/fpj/kafka/stargazers","contributors_url":"https://api.github.com/repos/fpj/kafka/contributors","subscribers_url":"https://api.github.com/repos/fpj/kafka/subscribers","subscription_url":"https://api.github.com/repos/fpj/kafka/subscription","commits_url":"https://api.github.com/repos/fpj/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/fpj/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/fpj/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/fpj/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/fpj/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/fpj/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fpj/kafka/merges","archive_url":"https://api.github.com/repos/fpj/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fpj/kafka/downloads","issues_url":"https://api.github.com/repos/fpj/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/fpj/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/fpj/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/fpj/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fpj/kafka/labels{/name}","releases_url":"https://api.github.com/repos/fpj/kafka/releases{/id}","created_at":"2015-07-29T15:11:21Z","updated_at":"2015-07-29T15:11:24Z","pushed_at":"2015-10-17T21:20:23Z","git_url":"git://github.com/fpj/kafka.git","ssh_url":"git@github.com:fpj/kafka.git","clone_url":"https://github.com/fpj/kafka.git","svn_url":"https://github.com/fpj/kafka","homepage":null,"size":23036,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"28e59a1df7da9bbfc133180ee332a68e4540ee3e","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":2211243,"name":"kafka","full_name":"apache/kafka","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/kafka","description":"Mirror of Apache Kafka","fork":false,"url":"https://api.github.com/repos/apache/kafka","forks_url":"https://api.github.com/repos/apache/kafka/forks","keys_url":"https://api.github.com/repos/apache/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/kafka/teams","hooks_url":"https://api.github.com/repos/apache/kafka/hooks","issue_events_url":"https://api.github.com/repos/apache/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/apache/kafka/events","assignees_url":"https://api.github.com/repos/apache/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/apache/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/apache/kafka/tags","blobs_url":"https://api.github.com/repos/apache/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/kafka/languages","stargazers_url":"https://api.github.com/repos/apache/kafka/stargazers","contributors_url":"https://api.github.com/repos/apache/kafka/contributors","subscribers_url":"https://api.github.com/repos/apache/kafka/subscribers","subscription_url":"https://api.github.com/repos/apache/kafka/subscription","commits_url":"https://api.github.com/repos/apache/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/apache/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/kafka/merges","archive_url":"https://api.github.com/repos/apache/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/kafka/downloads","issues_url":"https://api.github.com/repos/apache/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/apache/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/kafka/labels{/name}","releases_url":"https://api.github.com/repos/apache/kafka/releases{/id}","created_at":"2011-08-15T18:06:16Z","updated_at":"2015-10-18T08:21:17Z","pushed_at":"2015-10-18T04:21:26Z","git_url":"git://github.com/apache/kafka.git","ssh_url":"git@github.com:apache/kafka.git","clone_url":"https://github.com/apache/kafka.git","svn_url":"https://github.com/apache/kafka","homepage":null,"size":34819,"stargazers_count":2066,"watchers_count":2066,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1226,"mirror_url":"git://git.apache.org/kafka.git","open_issues_count":95,"forks":1226,"open_issues":95,"watchers":2066,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/303"},"html":{"href":"https://github.com/apache/kafka/pull/303"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/303"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/303/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/303/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/303/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/58e17b2d0a2d53c53050efc68cb83de7649b9ea2"}}}}