Skip to content

KAFKA-15831: KIP-1000 protocol and admin client - #14811

Merged
junrao merged 5 commits into
apache:trunkfrom
AndrewJSchofield:KAFKA-15831
Dec 5, 2023
Merged

KAFKA-15831: KIP-1000 protocol and admin client#14811
junrao merged 5 commits into
apache:trunkfrom
AndrewJSchofield:KAFKA-15831

Conversation

@AndrewJSchofield

Copy link
Copy Markdown
Member

This adds the new ListClientMetricsResources RPC to the Kafka protocol and puts support
into the Kafka admin client. The broker-side implementation in this PR is just to return an empty
list. A future PR will obtain the list from the config store.

Includes a few unit tests for what is a very simple RPC. There are additional tests already written and
waiting for the PR that delivers the kafka-client-metrics.sh tool which builds on this PR.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@junrao junrao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndrewJSchofield : Thanks for the PR. Just a few minor comments.

}

// Just a placeholder for now.
def handleListClientMetricsResources(request: RequestChannel.Request): CompletableFuture[Unit] = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this return CompletableFuture[Unit] instead of Unit?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just giving the option of asynchronous completion. However, since I don't strictly need it now, I am simplifying it to Unit.

*/
public KafkaFuture<Collection<ClientMetricsResourceListing>> all() {
final KafkaFutureImpl<Collection<ClientMetricsResourceListing>> result = new KafkaFutureImpl<>();
this.future.whenComplete((listings, throwable) -> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Removed.

}

@Test
public void testListClientMetricsResourcesNotSupported() throws Exception {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method doesn't seem to throw.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That appears true to me too, but all of the other tests in that source file are the same pattern. I am going for consistency here.

@mjsax mjsax added core Kafka Broker kip Requires or implements a KIP admin AdminClient labels Nov 27, 2023
@AndrewJSchofield

Copy link
Copy Markdown
Member Author

Build is almost green. A small number of test failures unrelated to this PR.

@apoorvmittal10 apoorvmittal10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @AndrewJSchofield, LGTM. Minor comments/nit.

Comment thread core/src/main/scala/kafka/network/RequestConvertToJson.scala Outdated

@junrao junrao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndrewJSchofield : Thanks for the updated PR. The code LGTM. Are the 33 test failures related?

@junrao

junrao commented Nov 28, 2023

Copy link
Copy Markdown
Contributor

Also, you could trigger a rerun of the tests by closing the PR, waiting for 20 secs and reopening it.

@AndrewJSchofield

Copy link
Copy Markdown
Member Author

The test failures are unrelated. I will rerun the tests as requested.

@AndrewJSchofield

Copy link
Copy Markdown
Member Author

Closing to rerun tests

@junrao

junrao commented Nov 29, 2023

Copy link
Copy Markdown
Contributor

@AndrewJSchofield : Are the 40 failed tests related? Could you file jiras for failed tests not being tracked yet?

@AndrewJSchofield

Copy link
Copy Markdown
Member Author

@junrao The failing tests are not related. Here's a summary:

  • Kafka Streams EOS integration tests
  • KRaft controller tests
  • Consumer coordinator failover test
  • Fetch from follower integration tests
  • Mirroring integration tests
  • Transactions with tiered storage tests

I will file jiras for the 7 failing tests which are not currently being tracked.

None of the failures appear related to the code in this PR.

@junrao

junrao commented Nov 29, 2023

Copy link
Copy Markdown
Contributor

Thanks for the analysis, @AndrewJSchofield. Does the following mean that some of the tests didn't run? Should we rerun the tests?

Build / JDK 21 and Scala 2.13 / Gradle Test Executor 92.failed to execute tests
org.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not complete execution for Gradle Test Executor 92.
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:64)
	at java.base@21.0.1/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base@21.0.1/java.lang.reflect.Method.invoke(Method.java:580)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at jdk.proxy1/jdk.proxy1.$Proxy2.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded

@junrao

junrao commented Nov 30, 2023

Copy link
Copy Markdown
Contributor

@AndrewJSchofield : It seems that the last build timed out?

@AndrewJSchofield

Copy link
Copy Markdown
Member Author

I think so. After 8 hours. I will try resubmitting now (which means it will run overnight for me). In the event that it's still problematic, I'll make a fresh PR and try again.

@AndrewJSchofield

Copy link
Copy Markdown
Member Author

@junrao This time Java 8, 11 and 21 completed with a handful of unrelated flaky test failures, but Java 17 timed out. The CI system seems to be a dice roll at the moment.

@junrao

junrao commented Dec 5, 2023

Copy link
Copy Markdown
Contributor

Just merged a related PR #14767. Re-triggering the tests to make sure there are no new issues.

@junrao junrao closed this Dec 5, 2023
@junrao junrao reopened this Dec 5, 2023

@junrao junrao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndrewJSchofield : Thanks for the PR. The test failures seem unrelated. LGTM

@junrao
junrao merged commit 587f50d into apache:trunk Dec 5, 2023
@AndrewJSchofield
AndrewJSchofield deleted the KAFKA-15831 branch December 5, 2023 15:24
gaurav-narula pushed a commit to gaurav-narula/kafka that referenced this pull request Jan 24, 2024
This adds the new ListClientMetricsResources RPC to the Kafka protocol and puts support
into the Kafka admin client. The broker-side implementation in this PR is just to return an empty
list. A future PR will obtain the list from the config store.

Includes a few unit tests for what is a very simple RPC. There are additional tests already written and
waiting for the PR that delivers the kafka-client-metrics.sh tool which builds on this PR.

Reviewers: Jun Rao <junrao@gmail.com>
yyu1993 pushed a commit to yyu1993/kafka that referenced this pull request Feb 15, 2024
This adds the new ListClientMetricsResources RPC to the Kafka protocol and puts support
into the Kafka admin client. The broker-side implementation in this PR is just to return an empty
list. A future PR will obtain the list from the config store.

Includes a few unit tests for what is a very simple RPC. There are additional tests already written and
waiting for the PR that delivers the kafka-client-metrics.sh tool which builds on this PR.

Reviewers: Jun Rao <junrao@gmail.com>
AnatolyPopov pushed a commit to aiven/kafka that referenced this pull request Feb 16, 2024
This adds the new ListClientMetricsResources RPC to the Kafka protocol and puts support
into the Kafka admin client. The broker-side implementation in this PR is just to return an empty
list. A future PR will obtain the list from the config store.

Includes a few unit tests for what is a very simple RPC. There are additional tests already written and
waiting for the PR that delivers the kafka-client-metrics.sh tool which builds on this PR.

Reviewers: Jun Rao <junrao@gmail.com>
clolov pushed a commit to clolov/kafka that referenced this pull request Apr 5, 2024
This adds the new ListClientMetricsResources RPC to the Kafka protocol and puts support
into the Kafka admin client. The broker-side implementation in this PR is just to return an empty
list. A future PR will obtain the list from the config store.

Includes a few unit tests for what is a very simple RPC. There are additional tests already written and
waiting for the PR that delivers the kafka-client-metrics.sh tool which builds on this PR.

Reviewers: Jun Rao <junrao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

admin AdminClient core Kafka Broker kip Requires or implements a KIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants