-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-15681: Add support of client-metrics in kafka-configs.sh (KIP-714) #14632
Conversation
Build depends on PR - #14621 |
@junrao @hachikuji @AndrewJSchofield @mjsax Please if I can get the feedback on the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apoorvmittal10 : Thanks for the PR. Left a few comments.
@@ -536,6 +552,8 @@ object ConfigCommand extends Logging { | |||
adminClient.listTopics(new ListTopicsOptions().listInternal(true)).names().get().asScala.toSeq | |||
case ConfigType.Broker | BrokerLoggerConfigType => | |||
adminClient.describeCluster(new DescribeClusterOptions()).nodes().get().asScala.map(_.idString).toSeq :+ BrokerDefaultEntityName | |||
case ConfigType.ClientMetrics => | |||
throw new InvalidRequestException("Client metrics entity-name is required") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this will be improved through https://cwiki.apache.org/confluence/display/KAFKA/KIP-1000%3A+List+Client+Metrics+Configuration+Resources ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will be improved in KIP-1000 where empty entity-name can be used to describe all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precisely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've written kafka-client-metrics.sh
also which will be in a new PR once this one is merged.
} | ||
} | ||
ConfigCommand.alterConfig(mockAdminClient, alterOpts) | ||
verify(describeResult).all() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to verify alterResult
too? Also, why do we need to call all()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added alterResult as well, thanks. all()
is need as it ensures the verification of returned future
is executed.
Thanks for the feedback @junrao. I have addressed the comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apoorvmittal10 : Thanks for the updated PR. LGTM
JDK 17 and Scala 2.13 didn't finish. Could you trigger another test run? This can typically be done by closing the PR, waiting for 20 secs and reopening it.
Thanks @junrao, I have merged upstream/trunk branch to trigger the build for now. |
@apoorvmittal10 : Thanks for rerunning the tests. Are the 34 test failures related to this PR? |
@junrao I looked at the failing tests and none of them seems related to the PR changes. I saw the comment and mail by @dajac and completely agree with the pain of getting the build without flaky tests for a while. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. A few minor comments only.
@@ -536,6 +552,8 @@ object ConfigCommand extends Logging { | |||
adminClient.listTopics(new ListTopicsOptions().listInternal(true)).names().get().asScala.toSeq | |||
case ConfigType.Broker | BrokerLoggerConfigType => | |||
adminClient.describeCluster(new DescribeClusterOptions()).nodes().get().asScala.map(_.idString).toSeq :+ BrokerDefaultEntityName | |||
case ConfigType.ClientMetrics => | |||
throw new InvalidRequestException("Client metrics entity-name is required") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precisely.
@@ -536,6 +552,8 @@ object ConfigCommand extends Logging { | |||
adminClient.listTopics(new ListTopicsOptions().listInternal(true)).names().get().asScala.toSeq | |||
case ConfigType.Broker | BrokerLoggerConfigType => | |||
adminClient.describeCluster(new DescribeClusterOptions()).nodes().get().asScala.map(_.idString).toSeq :+ BrokerDefaultEntityName | |||
case ConfigType.ClientMetrics => | |||
throw new InvalidRequestException("Client metrics entity-name is required") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've written kafka-client-metrics.sh
also which will be in a new PR once this one is merged.
clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java
Outdated
Show resolved
Hide resolved
clients/src/test/java/org/apache/kafka/clients/admin/MockAdminClient.java
Outdated
Show resolved
Hide resolved
There are different tests failing from previous runs and none related to the PR. |
@apoorvmittal10 : Thanks for looking into the test failures. There is an ongoing discussion on requiring a green build before merging the PR. I will need to wait for the result of that discussion before merging the PR. |
Thanks @junrao I followed the thread where discussion is going on for green builds, started by @dajac, though I am not so old with AK process but if we are targeting no test failures in PRs for Kafka then shouldn't we be aggressive in fixing those else it will delay all deliverables for 3.7. I ll wait for the decision or what's the way forward. Definitely flaky tests is a big problem with AK right now. |
10 Failing flaky tests in current run, some have existing jira (mostly open): Build / JDK 11 and Scala 2.13 / testRackAwareRangeAssignor(String).quorum=kraft – integration.kafka.server.FetchFromFollowerIntegrationTest Build / JDK 11 and Scala 2.13 / testFailureToFenceEpoch(String).quorum=kraft – org.apache.kafka.tiered.storage.integration.TransactionsWithTieredStoreTest Build / JDK 8 and Scala 2.12 / testDynamicProducerIdExpirationMs(String).quorum=kraft – kafka.api.ProducerIdExpirationTest |
@apoorvmittal10 : Thanks for triaging the failed tests. There is still no green build though. |
Seems there is a compilation error on the last run:
|
The change in dependent classes broke the PR build. I have resolved merge issue and triggered build. |
|
I ll try to find out some details regarding failing tests. Build for JDK11 sems stuck in publishing test result where the build went for more than 7 hours. |
@junrao @mjsax I have investigated the test failure in the build which are reported as New failing - 12
|
@apoorvmittal10 : Thanks for triaging the failed tests. Since they are unrelated to this PR, will merge it. |
…14) (apache#14632) The PR adds support of alter/describe configs for client-metrics as defined in KIP-714 Reviewers: Andrew Schofield <[email protected]>, Jun Rao <[email protected]>
…14) (apache#14632) The PR adds support of alter/describe configs for client-metrics as defined in KIP-714 Reviewers: Andrew Schofield <[email protected]>, Jun Rao <[email protected]>
…14) (apache#14632) The PR adds support of alter/describe configs for client-metrics as defined in KIP-714 Reviewers: Andrew Schofield <[email protected]>, Jun Rao <[email protected]>
…14) (apache#14632) The PR adds support of alter/describe configs for client-metrics as defined in KIP-714 Reviewers: Andrew Schofield <[email protected]>, Jun Rao <[email protected]>
The PR adds support of alter/describe configs for client-metrics as defined in KIP-714
Below are the results of the commands:
Help section adds details for
client-metrics
:Incorrect entity type:
Describe wihout entity name:
Describe with blank entity name:
Invalid entity name. Omitted to throw exception as the describe response is further needed in alter to construct if the new subscription to be added or altered.
Successful alter of
client-metrics
:Successful describe of
client-metrics
:With Zookeper:
Without making change in
ZKConfigRepository
, throws UnknownServerException:After the change in
ZKConfigRepository
:Describe:
Alter:
With zookeeper as arg:
Committer Checklist (excluded from commit message)