{"action":"created","comment":{"url":"https://api.github.com/repos/fpj/kafka/pulls/comments/42844012","id":42844012,"diff_hunk":"@@ -244,4 +135,119 @@ object ZkSecurityMigrator extends Logging {\n           e.printStackTrace()\n     }\n   }\n-}\n\\ No newline at end of file\n+}\n+\n+class ZkSecurityMigrator(zkUtils: ZkUtils) extends Logging {\n+  private val workQueue = new LinkedBlockingQueue[Runnable]\n+  private implicit val threadExecutionContext =\n+    ExecutionContext.fromExecutor(new ThreadPoolExecutor(1,\n+      Runtime.getRuntime().availableProcessors(),\n+      5000,\n+      TimeUnit.MILLISECONDS,\n+      workQueue))\n+\n+  private val futures = new ArrayBuffer[Future[String]]\n+\n+  private def setAclsRecursively(path: String) = {\n+    info(\"Setting ACL for path %s\".format(path))\n+    val setPromise = Promise[String]\n+    val childrenPromise = Promise[String]\n+    futures.synchronized {","path":"core/src/main/scala/kafka/admin/ZkSecurityMigrator.scala","position":165,"original_position":165,"commit_id":"07fc3779fe35bf2b4feea8c826060eb22346cddb","original_commit_id":"07fc3779fe35bf2b4feea8c826060eb22346cddb","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":"This is good.","created_at":"2015-10-23T08:40:13Z","updated_at":"2015-10-23T08:40:13Z","html_url":"https://github.com/fpj/kafka/pull/1#discussion_r42844012","pull_request_url":"https://api.github.com/repos/fpj/kafka/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/fpj/kafka/pulls/comments/42844012"},"html":{"href":"https://github.com/fpj/kafka/pull/1#discussion_r42844012"},"pull_request":{"href":"https://api.github.com/repos/fpj/kafka/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/fpj/kafka/pulls/1","id":48552127,"html_url":"https://github.com/fpj/kafka/pull/1","diff_url":"https://github.com/fpj/kafka/pull/1.diff","patch_url":"https://github.com/fpj/kafka/pull/1.patch","issue_url":"https://api.github.com/repos/fpj/kafka/issues/1","number":1,"state":"open","locked":false,"title":"A few suggestions for KAFKA-2641","user":{"login":"ijuma","id":24747,"avatar_url":"https://avatars.githubusercontent.com/u/24747?v=3","gravatar_id":"","url":"https://api.github.com/users/ijuma","html_url":"https://github.com/ijuma","followers_url":"https://api.github.com/users/ijuma/followers","following_url":"https://api.github.com/users/ijuma/following{/other_user}","gists_url":"https://api.github.com/users/ijuma/gists{/gist_id}","starred_url":"https://api.github.com/users/ijuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijuma/subscriptions","organizations_url":"https://api.github.com/users/ijuma/orgs","repos_url":"https://api.github.com/users/ijuma/repos","events_url":"https://api.github.com/users/ijuma/events{/privacy}","received_events_url":"https://api.github.com/users/ijuma/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-23T08:05:59Z","updated_at":"2015-10-23T08:40:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94fbd033989ee76c55f9441a9faa33c50e9f0e31","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fpj/kafka/pulls/1/commits","review_comments_url":"https://api.github.com/repos/fpj/kafka/pulls/1/comments","review_comment_url":"https://api.github.com/repos/fpj/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fpj/kafka/issues/1/comments","statuses_url":"https://api.github.com/repos/fpj/kafka/statuses/07fc3779fe35bf2b4feea8c826060eb22346cddb","head":{"label":"ijuma:KAFKA-2641","ref":"KAFKA-2641","sha":"07fc3779fe35bf2b4feea8c826060eb22346cddb","user":{"login":"ijuma","id":24747,"avatar_url":"https://avatars.githubusercontent.com/u/24747?v=3","gravatar_id":"","url":"https://api.github.com/users/ijuma","html_url":"https://github.com/ijuma","followers_url":"https://api.github.com/users/ijuma/followers","following_url":"https://api.github.com/users/ijuma/following{/other_user}","gists_url":"https://api.github.com/users/ijuma/gists{/gist_id}","starred_url":"https://api.github.com/users/ijuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijuma/subscriptions","organizations_url":"https://api.github.com/users/ijuma/orgs","repos_url":"https://api.github.com/users/ijuma/repos","events_url":"https://api.github.com/users/ijuma/events{/privacy}","received_events_url":"https://api.github.com/users/ijuma/received_events","type":"User","site_admin":false},"repo":{"id":32646946,"name":"kafka","full_name":"ijuma/kafka","owner":{"login":"ijuma","id":24747,"avatar_url":"https://avatars.githubusercontent.com/u/24747?v=3","gravatar_id":"","url":"https://api.github.com/users/ijuma","html_url":"https://github.com/ijuma","followers_url":"https://api.github.com/users/ijuma/followers","following_url":"https://api.github.com/users/ijuma/following{/other_user}","gists_url":"https://api.github.com/users/ijuma/gists{/gist_id}","starred_url":"https://api.github.com/users/ijuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ijuma/subscriptions","organizations_url":"https://api.github.com/users/ijuma/orgs","repos_url":"https://api.github.com/users/ijuma/repos","events_url":"https://api.github.com/users/ijuma/events{/privacy}","received_events_url":"https://api.github.com/users/ijuma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ijuma/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/ijuma/kafka","forks_url":"https://api.github.com/repos/ijuma/kafka/forks","keys_url":"https://api.github.com/repos/ijuma/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ijuma/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ijuma/kafka/teams","hooks_url":"https://api.github.com/repos/ijuma/kafka/hooks","issue_events_url":"https://api.github.com/repos/ijuma/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/ijuma/kafka/events","assignees_url":"https://api.github.com/repos/ijuma/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/ijuma/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/ijuma/kafka/tags","blobs_url":"https://api.github.com/repos/ijuma/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ijuma/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ijuma/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/ijuma/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ijuma/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/ijuma/kafka/languages","stargazers_url":"https://api.github.com/repos/ijuma/kafka/stargazers","contributors_url":"https://api.github.com/repos/ijuma/kafka/contributors","subscribers_url":"https://api.github.com/repos/ijuma/kafka/subscribers","subscription_url":"https://api.github.com/repos/ijuma/kafka/subscription","commits_url":"https://api.github.com/repos/ijuma/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/ijuma/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/ijuma/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/ijuma/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/ijuma/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/ijuma/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ijuma/kafka/merges","archive_url":"https://api.github.com/repos/ijuma/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ijuma/kafka/downloads","issues_url":"https://api.github.com/repos/ijuma/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/ijuma/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/ijuma/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/ijuma/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ijuma/kafka/labels{/name}","releases_url":"https://api.github.com/repos/ijuma/kafka/releases{/id}","created_at":"2015-03-21T19:33:59Z","updated_at":"2015-03-21T19:34:01Z","pushed_at":"2015-10-23T08:04:26Z","git_url":"git://github.com/ijuma/kafka.git","ssh_url":"git@github.com:ijuma/kafka.git","clone_url":"https://github.com/ijuma/kafka.git","svn_url":"https://github.com/ijuma/kafka","homepage":null,"size":24408,"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":"fpj:KAFKA-2641","ref":"KAFKA-2641","sha":"8c58e0e92943b37367c85523052b3503e80a21e0","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-23T08:31:54Z","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":23687,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/fpj/kafka/pulls/1"},"html":{"href":"https://github.com/fpj/kafka/pull/1"},"issue":{"href":"https://api.github.com/repos/fpj/kafka/issues/1"},"comments":{"href":"https://api.github.com/repos/fpj/kafka/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/fpj/kafka/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/fpj/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fpj/kafka/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/fpj/kafka/statuses/07fc3779fe35bf2b4feea8c826060eb22346cddb"}}}}