{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/200802129","pull_request_review_id":135193334,"id":200802129,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDgwMjEyOQ==","diff_hunk":"@@ -576,7 +576,7 @@ class KafkaServer(val config: KafkaConfig, time: Time = Time.SYSTEM, threadNameP\n         if (requestHandlerPool != null)\n           CoreUtils.swallow(requestHandlerPool.shutdown(), this)\n \n-        CoreUtils.swallow(kafkaScheduler.shutdown(), this)\n+        if (kafkaScheduler != null) CoreUtils.swallow(kafkaScheduler.shutdown(), this)","path":"core/src/main/scala/kafka/server/KafkaServer.scala","position":5,"original_position":5,"commit_id":"3f44e54e3f24d3d08bee982ae0b4c4a0923012e1","original_commit_id":"3f44e54e3f24d3d08bee982ae0b4c4a0923012e1","user":{"login":"chia7712","id":6234750,"node_id":"MDQ6VXNlcjYyMzQ3NTA=","avatar_url":"https://avatars3.githubusercontent.com/u/6234750?v=4","gravatar_id":"","url":"https://api.github.com/users/chia7712","html_url":"https://github.com/chia7712","followers_url":"https://api.github.com/users/chia7712/followers","following_url":"https://api.github.com/users/chia7712/following{/other_user}","gists_url":"https://api.github.com/users/chia7712/gists{/gist_id}","starred_url":"https://api.github.com/users/chia7712/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chia7712/subscriptions","organizations_url":"https://api.github.com/users/chia7712/orgs","repos_url":"https://api.github.com/users/chia7712/repos","events_url":"https://api.github.com/users/chia7712/events{/privacy}","received_events_url":"https://api.github.com/users/chia7712/received_events","type":"User","site_admin":false},"body":"> Nit: please move the swallow to the next line to be consistent with the rest of the code.\r\n\r\ncopy that. Thanks for the reviews.","created_at":"2018-07-07T04:30:03Z","updated_at":"2018-07-07T04:30:03Z","html_url":"https://github.com/apache/kafka/pull/5339#discussion_r200802129","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/5339","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/200802129"},"html":{"href":"https://github.com/apache/kafka/pull/5339#discussion_r200802129"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/5339"}},"in_reply_to_id":200769667},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/5339","id":199652943,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NjUyOTQz","html_url":"https://github.com/apache/kafka/pull/5339","diff_url":"https://github.com/apache/kafka/pull/5339.diff","patch_url":"https://github.com/apache/kafka/pull/5339.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/5339","number":5339,"state":"open","locked":false,"title":"Minor: Fix the NPE happening in closing KafkaServer","user":{"login":"chia7712","id":6234750,"node_id":"MDQ6VXNlcjYyMzQ3NTA=","avatar_url":"https://avatars3.githubusercontent.com/u/6234750?v=4","gravatar_id":"","url":"https://api.github.com/users/chia7712","html_url":"https://github.com/chia7712","followers_url":"https://api.github.com/users/chia7712/followers","following_url":"https://api.github.com/users/chia7712/following{/other_user}","gists_url":"https://api.github.com/users/chia7712/gists{/gist_id}","starred_url":"https://api.github.com/users/chia7712/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chia7712/subscriptions","organizations_url":"https://api.github.com/users/chia7712/orgs","repos_url":"https://api.github.com/users/chia7712/repos","events_url":"https://api.github.com/users/chia7712/events{/privacy}","received_events_url":"https://api.github.com/users/chia7712/received_events","type":"User","site_admin":false},"body":"If server fails to connect to zk, the kafkaScheduler will be null when closing the kafka server. The NPE won't hurt kafka since the exception is swallowed.\r\n\r\n`kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING\r\n\tat kafka.zookeeper.ZooKeeperClient.$anonfun$waitUntilConnected$3(ZooKeeperClient.scala:225)\r\n\tat scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)\r\n\tat kafka.utils.CoreUtils$.inLock(CoreUtils.scala:251)\r\n\tat kafka.zookeeper.ZooKeeperClient.waitUntilConnected(ZooKeeperClient.scala:221)\r\n\tat kafka.zookeeper.ZooKeeperClient.<init>(ZooKeeperClient.scala:95)\r\n\tat kafka.zk.KafkaZkClient$.apply(KafkaZkClient.scala:1581)\r\n\tat kafka.server.KafkaServer.createZkClient$1(KafkaServer.scala:348)\r\n\tat kafka.server.KafkaServer.initZkClient(KafkaServer.scala:372)\r\n\tat kafka.server.KafkaServer.startup(KafkaServer.scala:202)\r\n\tat kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)\r\n\tat kafka.Kafka$.main(Kafka.scala:75)\r\n\tat kafka.Kafka.main(Kafka.scala)\r\n[2018-07-06 05:51:27,036] INFO shutting down (kafka.server.KafkaServer)\r\n[2018-07-06 05:51:27,042] WARN  (kafka.utils.CoreUtils$)\r\njava.lang.NullPointerException\r\n\tat kafka.server.KafkaServer.$anonfun$shutdown$6(KafkaServer.scala:579)\r\n\tat kafka.utils.CoreUtils$.swallow(CoreUtils.scala:86)\r\n\tat kafka.server.KafkaServer.shutdown(KafkaServer.scala:579)\r\n\tat kafka.server.KafkaServer.startup(KafkaServer.scala:329)\r\n\tat kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:38)\r\n\tat kafka.Kafka$.main(Kafka.scala:75)\r\n\tat kafka.Kafka.main(Kafka.scala)\r\n`\r\n\r\n### Committer Checklist (excluded from commit message)\r\n- [ ] Verify design and implementation \r\n- [ ] Verify test coverage and CI build status\r\n- [ ] Verify documentation (including upgrade notes)\r\n","created_at":"2018-07-06T06:03:54Z","updated_at":"2018-07-07T04:30:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87e71bfb029c42af0cb6983fd2bee3b6cda66bbc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/5339/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/5339/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/5339/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/3f44e54e3f24d3d08bee982ae0b4c4a0923012e1","head":{"label":"chia7712:fix_NPE_in_closing_kafkaserver","ref":"fix_NPE_in_closing_kafkaserver","sha":"3f44e54e3f24d3d08bee982ae0b4c4a0923012e1","user":{"login":"chia7712","id":6234750,"node_id":"MDQ6VXNlcjYyMzQ3NTA=","avatar_url":"https://avatars3.githubusercontent.com/u/6234750?v=4","gravatar_id":"","url":"https://api.github.com/users/chia7712","html_url":"https://github.com/chia7712","followers_url":"https://api.github.com/users/chia7712/followers","following_url":"https://api.github.com/users/chia7712/following{/other_user}","gists_url":"https://api.github.com/users/chia7712/gists{/gist_id}","starred_url":"https://api.github.com/users/chia7712/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chia7712/subscriptions","organizations_url":"https://api.github.com/users/chia7712/orgs","repos_url":"https://api.github.com/users/chia7712/repos","events_url":"https://api.github.com/users/chia7712/events{/privacy}","received_events_url":"https://api.github.com/users/chia7712/received_events","type":"User","site_admin":false},"repo":{"id":125210946,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUyMTA5NDY=","name":"kafka","full_name":"chia7712/kafka","owner":{"login":"chia7712","id":6234750,"node_id":"MDQ6VXNlcjYyMzQ3NTA=","avatar_url":"https://avatars3.githubusercontent.com/u/6234750?v=4","gravatar_id":"","url":"https://api.github.com/users/chia7712","html_url":"https://github.com/chia7712","followers_url":"https://api.github.com/users/chia7712/followers","following_url":"https://api.github.com/users/chia7712/following{/other_user}","gists_url":"https://api.github.com/users/chia7712/gists{/gist_id}","starred_url":"https://api.github.com/users/chia7712/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chia7712/subscriptions","organizations_url":"https://api.github.com/users/chia7712/orgs","repos_url":"https://api.github.com/users/chia7712/repos","events_url":"https://api.github.com/users/chia7712/events{/privacy}","received_events_url":"https://api.github.com/users/chia7712/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chia7712/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/chia7712/kafka","forks_url":"https://api.github.com/repos/chia7712/kafka/forks","keys_url":"https://api.github.com/repos/chia7712/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chia7712/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chia7712/kafka/teams","hooks_url":"https://api.github.com/repos/chia7712/kafka/hooks","issue_events_url":"https://api.github.com/repos/chia7712/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/chia7712/kafka/events","assignees_url":"https://api.github.com/repos/chia7712/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/chia7712/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/chia7712/kafka/tags","blobs_url":"https://api.github.com/repos/chia7712/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chia7712/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chia7712/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/chia7712/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chia7712/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/chia7712/kafka/languages","stargazers_url":"https://api.github.com/repos/chia7712/kafka/stargazers","contributors_url":"https://api.github.com/repos/chia7712/kafka/contributors","subscribers_url":"https://api.github.com/repos/chia7712/kafka/subscribers","subscription_url":"https://api.github.com/repos/chia7712/kafka/subscription","commits_url":"https://api.github.com/repos/chia7712/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/chia7712/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/chia7712/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/chia7712/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/chia7712/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/chia7712/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chia7712/kafka/merges","archive_url":"https://api.github.com/repos/chia7712/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chia7712/kafka/downloads","issues_url":"https://api.github.com/repos/chia7712/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/chia7712/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/chia7712/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/chia7712/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chia7712/kafka/labels{/name}","releases_url":"https://api.github.com/repos/chia7712/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/chia7712/kafka/deployments","created_at":"2018-03-14T12:43:46Z","updated_at":"2018-07-07T03:20:14Z","pushed_at":"2018-07-07T03:20:08Z","git_url":"git://github.com/chia7712/kafka.git","ssh_url":"git@github.com:chia7712/kafka.git","clone_url":"https://github.com/chia7712/kafka.git","svn_url":"https://github.com/chia7712/kafka","homepage":null,"size":68247,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"1aea0834d346f0afa16f946c47e51fefac37612b","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkyMjExMjQz","name":"kafka","full_name":"apache/kafka","owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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}","deployments_url":"https://api.github.com/repos/apache/kafka/deployments","created_at":"2011-08-15T18:06:16Z","updated_at":"2018-07-07T04:12:07Z","pushed_at":"2018-07-07T00:06:28Z","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":68995,"stargazers_count":8867,"watchers_count":8867,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5096,"mirror_url":null,"archived":false,"open_issues_count":472,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5096,"open_issues":472,"watchers":8867,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/5339"},"html":{"href":"https://github.com/apache/kafka/pull/5339"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/5339"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/5339/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/5339/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/5339/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/3f44e54e3f24d3d08bee982ae0b4c4a0923012e1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"chia7712"}}