You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/01/15 08:17:14 UTC
[GitHub] [kafka] dajac opened a new pull request #9903: KAFKA-12204; Implement DescribeCluster API in the broker
dajac opened a new pull request #9903:
URL: https://github.com/apache/kafka/pull/9903
This PR implements the DescribeCluster API in the broker.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on pull request #9903: KAFKA-12204; Implement DescribeCluster API in the broker
Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #9903:
URL: https://github.com/apache/kafka/pull/9903#issuecomment-762738081
@rajinisivaram Thanks for your review. I have addressed your points and I have added few unit tests to verify the cluster authorized operations as you suggested. Could you have another look at it?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on pull request #9903: KAFKA-12204; Implement DescribeCluster API in the broker
Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #9903:
URL: https://github.com/apache/kafka/pull/9903#issuecomment-762081084
@ijuma Good point. Added them.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] twmb commented on a change in pull request #9903: KAFKA-12204; Implement DescribeCluster API in the broker
Posted by GitBox <gi...@apache.org>.
twmb commented on a change in pull request #9903:
URL: https://github.com/apache/kafka/pull/9903#discussion_r562394942
##########
File path: clients/src/main/resources/common/message/DescribeClusterResponse.json
##########
@@ -0,0 +1,47 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+{
+ "apiKey": 60,
+ "type": "response",
+ "name": "DescribeClusterResponse",
+ "validVersions": "0",
+ "flexibleVersions": "0+",
+ "fields": [
+ { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
+ "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
+ { "name": "ErrorCode", "type": "int16", "versions": "0+",
+ "about": "The top-level error code, or 0 if there was no error" },
+ { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null",
+ "about": "The top-level error message, or null if there was no error." },
+ { "name": "ClusterId", "type": "string", "nullableVersions": "0+", "versions": "0+", "default": "null",
Review comment:
Does it? Does MetadataResponse? Is there a reason Metadata does and this doesn't?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on a change in pull request #9903: KAFKA-12204; Implement DescribeCluster API in the broker
Posted by GitBox <gi...@apache.org>.
dajac commented on a change in pull request #9903:
URL: https://github.com/apache/kafka/pull/9903#discussion_r562449399
##########
File path: clients/src/main/resources/common/message/DescribeClusterResponse.json
##########
@@ -0,0 +1,47 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+{
+ "apiKey": 60,
+ "type": "response",
+ "name": "DescribeClusterResponse",
+ "validVersions": "0",
+ "flexibleVersions": "0+",
+ "fields": [
+ { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
+ "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
+ { "name": "ErrorCode", "type": "int16", "versions": "0+",
+ "about": "The top-level error code, or 0 if there was no error" },
+ { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null",
+ "about": "The top-level error message, or null if there was no error." },
+ { "name": "ClusterId", "type": "string", "nullableVersions": "0+", "versions": "0+", "default": "null",
Review comment:
`ClusterId` is always filled in the `DescribeClusterResponse` so it does not have to be `nullable`. In the `MetadataResponse` case, `ClusterId` is not supported by all the versions so having `null` as default helps to differentiate the cases where it is provided from the cases where it is not.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac merged pull request #9903: KAFKA-12204; Implement DescribeCluster API in the broker
Posted by GitBox <gi...@apache.org>.
dajac merged pull request #9903:
URL: https://github.com/apache/kafka/pull/9903
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] rajinisivaram commented on a change in pull request #9903: KAFKA-12204; Implement DescribeCluster API in the broker
Posted by GitBox <gi...@apache.org>.
rajinisivaram commented on a change in pull request #9903:
URL: https://github.com/apache/kafka/pull/9903#discussion_r559728102
##########
File path: clients/src/main/resources/common/message/DescribeClusterResponse.json
##########
@@ -0,0 +1,47 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+{
+ "apiKey": 60,
+ "type": "response",
+ "name": "DescribeClusterResponse",
+ "validVersions": "0",
+ "flexibleVersions": "0+",
+ "fields": [
+ { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
+ "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
+ { "name": "ErrorCode", "type": "int16", "versions": "0+",
+ "about": "The top-level error code, or 0 if there was no error" },
+ { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null",
+ "about": "The top-level error message, or null if there was no error." },
+ { "name": "ClusterId", "type": "string", "nullableVersions": "0+", "versions": "0+", "default": "null",
Review comment:
Does this need to be nullable or have a default?
##########
File path: clients/src/main/resources/common/message/DescribeClusterResponse.json
##########
@@ -0,0 +1,47 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+{
+ "apiKey": 60,
+ "type": "response",
+ "name": "DescribeClusterResponse",
+ "validVersions": "0",
+ "flexibleVersions": "0+",
+ "fields": [
+ { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
+ "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
+ { "name": "ErrorCode", "type": "int16", "versions": "0+",
+ "about": "The top-level error code, or 0 if there was no error" },
+ { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null",
+ "about": "The top-level error message, or null if there was no error." },
+ { "name": "ClusterId", "type": "string", "nullableVersions": "0+", "versions": "0+", "default": "null",
+ "about": "The cluster ID that responding broker belongs to." },
+ { "name": "ControllerId", "type": "int32", "versions": "0+", "default": "-1", "entityType": "brokerId",
+ "about": "The ID of the controller broker." },
+ { "name": "Brokers", "type": "[]DescribeClusterBroker", "versions": "0+",
+ "about": "Each broker in the response.", "fields": [
+ { "name": "NodeId", "type": "int32", "versions": "0+", "mapKey": true, "entityType": "brokerId",
Review comment:
BrokerId instead of NodeId? We seem to be using both elsewhere, but since it is in `Brokers`, `BrokerId` seems appropriate? Doesn't matter much either way I guess since this is internal.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] twmb commented on a change in pull request #9903: KAFKA-12204; Implement DescribeCluster API in the broker
Posted by GitBox <gi...@apache.org>.
twmb commented on a change in pull request #9903:
URL: https://github.com/apache/kafka/pull/9903#discussion_r562394942
##########
File path: clients/src/main/resources/common/message/DescribeClusterResponse.json
##########
@@ -0,0 +1,47 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+{
+ "apiKey": 60,
+ "type": "response",
+ "name": "DescribeClusterResponse",
+ "validVersions": "0",
+ "flexibleVersions": "0+",
+ "fields": [
+ { "name": "ThrottleTimeMs", "type": "int32", "versions": "0+",
+ "about": "The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota." },
+ { "name": "ErrorCode", "type": "int16", "versions": "0+",
+ "about": "The top-level error code, or 0 if there was no error" },
+ { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null",
+ "about": "The top-level error message, or null if there was no error." },
+ { "name": "ClusterId", "type": "string", "nullableVersions": "0+", "versions": "0+", "default": "null",
Review comment:
Does it? Does MetadataResponse? Is there a reason Metadata does and this doesn't?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on pull request #9903: KAFKA-12204; Implement DescribeCluster API in the broker
Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #9903:
URL: https://github.com/apache/kafka/pull/9903#issuecomment-762053434
Thanks for the PR. We should have some unit tests for the protocol serdes, right?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org