{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/54807092","id":54807092,"diff_hunk":"@@ -117,20 +123,20 @@ public UpdateMetadataRequest(int controllerId, int controllerEpoch, Set<BrokerEn\n         for (BrokerEndPoint brokerEndPoint : brokerEndPoints) {\n             Map<SecurityProtocol, EndPoint> endPoints = Collections.singletonMap(SecurityProtocol.PLAINTEXT,\n                     new EndPoint(brokerEndPoint.host(), brokerEndPoint.port()));\n-            brokers.add(new Broker(brokerEndPoint.id(), endPoints));\n+            brokers.add(new Broker(brokerEndPoint.id(), endPoints, null));\n         }\n         return brokers;\n     }\n \n     /**\n-     * Constructor for version 1.\n+     * Constructor for version 2.\n      */\n     public UpdateMetadataRequest(int controllerId, int controllerEpoch, Map<TopicPartition,\n             PartitionState> partitionStates, Set<Broker> liveBrokers) {\n-        this(1, controllerId, controllerEpoch, partitionStates, liveBrokers);\n+        this(2, controllerId, controllerEpoch, partitionStates, liveBrokers);\n     }\n \n-    private UpdateMetadataRequest(int version, int controllerId, int controllerEpoch, Map<TopicPartition,\n+    public UpdateMetadataRequest(int version, int controllerId, int controllerEpoch, Map<TopicPartition,","path":"clients/src/main/java/org/apache/kafka/common/requests/UpdateMetadataRequest.java","position":53,"original_position":53,"commit_id":"b7f1a3962e49bc2b555fe0f5e545618d6d8b1b40","original_commit_id":"b7f1a3962e49bc2b555fe0f5e545618d6d8b1b40","user":{"login":"allenxwang","id":1728105,"avatar_url":"https://avatars.githubusercontent.com/u/1728105?v=3","gravatar_id":"","url":"https://api.github.com/users/allenxwang","html_url":"https://github.com/allenxwang","followers_url":"https://api.github.com/users/allenxwang/followers","following_url":"https://api.github.com/users/allenxwang/following{/other_user}","gists_url":"https://api.github.com/users/allenxwang/gists{/gist_id}","starred_url":"https://api.github.com/users/allenxwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenxwang/subscriptions","organizations_url":"https://api.github.com/users/allenxwang/orgs","repos_url":"https://api.github.com/users/allenxwang/repos","events_url":"https://api.github.com/users/allenxwang/events{/privacy}","received_events_url":"https://api.github.com/users/allenxwang/received_events","type":"User","site_admin":false},"body":"I will add the check for version. I believe 0 is still supported so 0, 1 and 2 should be allowed.\r\n","created_at":"2016-03-02T22:53:29Z","updated_at":"2016-03-02T22:53:29Z","html_url":"https://github.com/apache/kafka/pull/132#discussion_r54807092","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/132","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/54807092"},"html":{"href":"https://github.com/apache/kafka/pull/132#discussion_r54807092"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/132"}}},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/132","id":42158890,"html_url":"https://github.com/apache/kafka/pull/132","diff_url":"https://github.com/apache/kafka/pull/132.diff","patch_url":"https://github.com/apache/kafka/pull/132.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/132","number":132,"state":"open","locked":false,"title":"KAFKA-1215: Rack-Aware replica assignment option","user":{"login":"allenxwang","id":1728105,"avatar_url":"https://avatars.githubusercontent.com/u/1728105?v=3","gravatar_id":"","url":"https://api.github.com/users/allenxwang","html_url":"https://github.com/allenxwang","followers_url":"https://api.github.com/users/allenxwang/followers","following_url":"https://api.github.com/users/allenxwang/following{/other_user}","gists_url":"https://api.github.com/users/allenxwang/gists{/gist_id}","starred_url":"https://api.github.com/users/allenxwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenxwang/subscriptions","organizations_url":"https://api.github.com/users/allenxwang/orgs","repos_url":"https://api.github.com/users/allenxwang/repos","events_url":"https://api.github.com/users/allenxwang/events{/privacy}","received_events_url":"https://api.github.com/users/allenxwang/received_events","type":"User","site_admin":false},"body":"Please see https://cwiki.apache.org/confluence/display/KAFKA/KIP-36+Rack+aware+replica+assignment for the overall design.\r\n\r\nThe update to TopicMetadataRequest/TopicMetadataResponse will be done in a different PR.","created_at":"2015-08-11T18:06:08Z","updated_at":"2016-03-02T22:53:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c02a91d4e509bcac4e4fa053e6cfac1f347d13a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/132/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/132/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/132/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/b7f1a3962e49bc2b555fe0f5e545618d6d8b1b40","head":{"label":"allenxwang:KAFKA-1215","ref":"KAFKA-1215","sha":"b7f1a3962e49bc2b555fe0f5e545618d6d8b1b40","user":{"login":"allenxwang","id":1728105,"avatar_url":"https://avatars.githubusercontent.com/u/1728105?v=3","gravatar_id":"","url":"https://api.github.com/users/allenxwang","html_url":"https://github.com/allenxwang","followers_url":"https://api.github.com/users/allenxwang/followers","following_url":"https://api.github.com/users/allenxwang/following{/other_user}","gists_url":"https://api.github.com/users/allenxwang/gists{/gist_id}","starred_url":"https://api.github.com/users/allenxwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenxwang/subscriptions","organizations_url":"https://api.github.com/users/allenxwang/orgs","repos_url":"https://api.github.com/users/allenxwang/repos","events_url":"https://api.github.com/users/allenxwang/events{/privacy}","received_events_url":"https://api.github.com/users/allenxwang/received_events","type":"User","site_admin":false},"repo":{"id":25887909,"name":"kafka","full_name":"allenxwang/kafka","owner":{"login":"allenxwang","id":1728105,"avatar_url":"https://avatars.githubusercontent.com/u/1728105?v=3","gravatar_id":"","url":"https://api.github.com/users/allenxwang","html_url":"https://github.com/allenxwang","followers_url":"https://api.github.com/users/allenxwang/followers","following_url":"https://api.github.com/users/allenxwang/following{/other_user}","gists_url":"https://api.github.com/users/allenxwang/gists{/gist_id}","starred_url":"https://api.github.com/users/allenxwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allenxwang/subscriptions","organizations_url":"https://api.github.com/users/allenxwang/orgs","repos_url":"https://api.github.com/users/allenxwang/repos","events_url":"https://api.github.com/users/allenxwang/events{/privacy}","received_events_url":"https://api.github.com/users/allenxwang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/allenxwang/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/allenxwang/kafka","forks_url":"https://api.github.com/repos/allenxwang/kafka/forks","keys_url":"https://api.github.com/repos/allenxwang/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/allenxwang/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/allenxwang/kafka/teams","hooks_url":"https://api.github.com/repos/allenxwang/kafka/hooks","issue_events_url":"https://api.github.com/repos/allenxwang/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/allenxwang/kafka/events","assignees_url":"https://api.github.com/repos/allenxwang/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/allenxwang/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/allenxwang/kafka/tags","blobs_url":"https://api.github.com/repos/allenxwang/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/allenxwang/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/allenxwang/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/allenxwang/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/allenxwang/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/allenxwang/kafka/languages","stargazers_url":"https://api.github.com/repos/allenxwang/kafka/stargazers","contributors_url":"https://api.github.com/repos/allenxwang/kafka/contributors","subscribers_url":"https://api.github.com/repos/allenxwang/kafka/subscribers","subscription_url":"https://api.github.com/repos/allenxwang/kafka/subscription","commits_url":"https://api.github.com/repos/allenxwang/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/allenxwang/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/allenxwang/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/allenxwang/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/allenxwang/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/allenxwang/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/allenxwang/kafka/merges","archive_url":"https://api.github.com/repos/allenxwang/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/allenxwang/kafka/downloads","issues_url":"https://api.github.com/repos/allenxwang/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/allenxwang/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/allenxwang/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/allenxwang/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/allenxwang/kafka/labels{/name}","releases_url":"https://api.github.com/repos/allenxwang/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/allenxwang/kafka/deployments","created_at":"2014-10-28T20:08:20Z","updated_at":"2014-10-28T07:04:48Z","pushed_at":"2016-02-29T23:38:56Z","git_url":"git://github.com/allenxwang/kafka.git","ssh_url":"git@github.com:allenxwang/kafka.git","clone_url":"https://github.com/allenxwang/kafka.git","svn_url":"https://github.com/allenxwang/kafka","homepage":null,"size":26510,"stargazers_count":0,"watchers_count":0,"language":null,"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":"0.8.1"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"92c35230f463e570de17239d8e76c7be5350c7d8","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}","deployments_url":"https://api.github.com/repos/apache/kafka/deployments","created_at":"2011-08-15T18:06:16Z","updated_at":"2016-03-02T19:02:58Z","pushed_at":"2016-03-02T22:52:27Z","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":35266,"stargazers_count":2695,"watchers_count":2695,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1631,"mirror_url":"git://git.apache.org/kafka.git","open_issues_count":144,"forks":1631,"open_issues":144,"watchers":2695,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/132"},"html":{"href":"https://github.com/apache/kafka/pull/132"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/132"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/132/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/132/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/132/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/b7f1a3962e49bc2b555fe0f5e545618d6d8b1b40"}}}}