Skip to content

KAFKA-9432 automated protocol for DescribeConfigs#8312

Merged
mimaison merged 7 commits into
apache:trunkfrom
tombentley:KAFKA-9432-DescribeConfigs-automated-protocol
Jun 12, 2020
Merged

KAFKA-9432 automated protocol for DescribeConfigs#8312
mimaison merged 7 commits into
apache:trunkfrom
tombentley:KAFKA-9432-DescribeConfigs-automated-protocol

Conversation

@tombentley

Copy link
Copy Markdown
Member

Change the DescribeConfigs request and response to use the generated protocol messages.

@tombentley

Copy link
Copy Markdown
Member Author

@mimaison here's another one, grateful if you could review.

@tombentley
tombentley force-pushed the KAFKA-9432-DescribeConfigs-automated-protocol branch from ed6a9ae to 0fce630 Compare March 20, 2020 15:59
@tombentley
tombentley force-pushed the KAFKA-9432-DescribeConfigs-automated-protocol branch from 0fce630 to 8f2c22f Compare April 9, 2020 12:38
@tombentley

Copy link
Copy Markdown
Member Author

Rebased for conflict.

@tombentley
tombentley force-pushed the KAFKA-9432-DescribeConfigs-automated-protocol branch from 8f2c22f to 4eb1f06 Compare April 9, 2020 14:47
@tombentley

Copy link
Copy Markdown
Member Author

Rebased for conflict.

@tombentley
tombentley force-pushed the KAFKA-9432-DescribeConfigs-automated-protocol branch from 4eb1f06 to c60c196 Compare April 28, 2020 09:04
@tombentley

Copy link
Copy Markdown
Member Author

Rebased for conflict.

@tombentley
tombentley force-pushed the KAFKA-9432-DescribeConfigs-automated-protocol branch from c60c196 to cb1f307 Compare May 12, 2020 10:33
@tombentley

Copy link
Copy Markdown
Member Author

Rebased for conflict.

@mimaison

Copy link
Copy Markdown
Member

retest this please

@mimaison mimaison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tombentley Thanks for the PR. I've made a first pass and left a bunch of comments

Comment thread clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java Outdated
Comment thread clients/src/test/java/org/apache/kafka/common/requests/RequestResponseTest.java Outdated
Comment thread core/src/main/scala/kafka/server/AdminManager.scala Outdated
Comment thread clients/src/main/resources/common/message/DescribeConfigsRequest.json Outdated
Comment thread clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java Outdated
Comment thread clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java Outdated
@tombentley

Copy link
Copy Markdown
Member Author

@mimaison I've fixed those, if you want to make a 2nd pass. I guess I should add a test to KafkaAdminClientTest too.

@mimaison

Copy link
Copy Markdown
Member

retest this please

@mimaison

mimaison commented Jun 4, 2020

Copy link
Copy Markdown
Member

Let's get #8311 merged first and then rebase this one on top

@tombentley
tombentley force-pushed the KAFKA-9432-DescribeConfigs-automated-protocol branch from 10c21a1 to b5b3006 Compare June 8, 2020 15:20
@tombentley

Copy link
Copy Markdown
Member Author

@mimaison I've rebased and added some more tests in KafkaAdminClientTest. In so doing I noticed that describeConfigs() would require two requests to each broker when both BROKER and BROKER_LOGGER config resources for a broker were requested. I've fixed that, but alterConfigs() and incrementalAlterConfigs() do the same thing. WDYT about changing them too?

@tombentley

Copy link
Copy Markdown
Member Author

This PR will also fix KAFKA-6962

@mimaison

mimaison commented Jun 8, 2020

Copy link
Copy Markdown
Member

retest this please

@mimaison mimaison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the updates. It looks good. I just left a few minor comments.

Comment thread core/src/main/scala/kafka/server/KafkaApis.scala Outdated
Comment thread clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java Outdated
@tombentley

Copy link
Copy Markdown
Member Author

@mimaison done.

@mimaison
mimaison merged commit 9a4f00f into apache:trunk Jun 12, 2020
Comment on lines -300 to -302
public DescribeConfigsResponse(int throttleTimeMs, Map<ConfigResource, Config> configs) {
this.throttleTimeMs = throttleTimeMs;
this.configs = Objects.requireNonNull(configs, "configs");

@ableegoldman ableegoldman Jun 13, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @mimaison @tombentley, removing this constructor seems to have broken the build (it was used in TopicAdminTest). Can we get a hotfix for this to unblock other PRs?
edit: nevermind, a PR was just opened for it (pull/8866)

@tombentley

Copy link
Copy Markdown
Member Author

@ableegoldman sorry about that. A fix has now been committed to trunk. Thanks to @chia7712.

Kvicii pushed a commit to Kvicii/kafka that referenced this pull request Jun 13, 2020
* 'trunk' of github.com:apache/kafka: (42 commits)
  HOTFIX: Fix compile error in TopicAdminTest (apache#8866)
  KAFKA-10144: clean up corrupted standby tasks before attempting a commit (apache#8849)
  KAFKA-10157: Fix broken tests due to InterruptedException from FinalizedFeatureChangeListener (apache#8857)
  KAFKA-9432: automated protocol for DescribeConfigs (apache#8312)
  KAFKA-10049: Fixed FKJ bug where wrapped serdes are set incorrectly when using default StreamsConfig serdes (apache#8764)
  KAFKA-10027: Implement read path for feature versioning system (KIP-584) (apache#8680)
  KAFKA-10085: correctly compute lag for optimized source changelogs (apache#8787)
  KAFKA-10086: Integration test for ensuring warmups are effective (apache#8818)
  KAFKA-9374: Make connector interactions asynchronous (apache#8069)
  MINOR: reduce sizeInBytes for percentiles metrics (apache#8835)
  KAFKA-10115: Incorporate errors.tolerance with the Errant Record Reporter (apache#8829)
  KAFKA-9216: Enforce that Connect’s internal topics use `compact` cleanup policy (apache#8828)
  KAFKA-9845: Warn users about using config providers with plugin.path property (apache#8455)
  KAFKA-7833: Add missing test (apache#8847)
  KAFKA-9066: Retain metrics for failed tasks (apache#8502)
  KAFKA-9841: Revoke duplicate connectors and tasks when zombie workers return with an outdated assignment (apache#8453)
  KAFKA-9985: Sink connector may exhaust broker when writing in DLQ (apache#8663)
  KAFKA-9441: remove prepareClose() to simplify task management (apache#8833)
  KAFKA-7833: Add Global/StateStore name conflict check (apache#8825)
  KAFKA-9969: Exclude ConnectorClientConfigRequest from class loading isolation (apache#8630)
  ...
stevenpyzhang added a commit to confluentinc/kafka that referenced this pull request Jul 18, 2020
@omkreddy

omkreddy commented Jul 18, 2020

Copy link
Copy Markdown
Contributor

@tombentley After this change, adminClient.describeConnfigs() is not backward compatible with older kafka broker versions. It seems, older brokers are receiving empty configNames here. Older brokers does not handle empty configKeys. Due to this old brokers are returning empty config list. We may need to explicitly set setConfigurationKeys(null) here.

We also need to update ClientCompatibilityTest, to catch these kind of errors.
https://github.com/apache/kafka/blob/trunk/tools/src/main/java/org/apache/kafka/tools/ClientCompatibilityTest.java
https://github.com/apache/kafka/blob/trunk/tests/kafkatest/tests/client/client_compatibility_features_test.py

cc @mimaison

omkreddy added a commit that referenced this pull request Jul 21, 2020
…` to make it backward compatible with older Kafka versions.

- After #8312, older brokers are returning empty configs,  with latest `adminClient.describeConfigs`.  Old brokers  are receiving empty configNames in `AdminManageer.describeConfigs()` method. Older brokers does not handle empty configKeys. Due to this old brokers are filtering all the configs.
- Update ClientCompatibilityTest to verify describe configs
- Add test case to test describe configs with empty configuration Keys

Author: Manikumar Reddy <manikumar.reddy@gmail.com>

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>

Closes #9046 from omkreddy/KAFKA-9432
vcrfxia pushed a commit to confluentinc/kafka that referenced this pull request Jul 22, 2020
…` to make it backward compatible with older Kafka versions.

- After apache#8312, older brokers are returning empty configs,  with latest `adminClient.describeConfigs`.  Old brokers  are receiving empty configNames in `AdminManageer.describeConfigs()` method. Older brokers does not handle empty configKeys. Due to this old brokers are filtering all the configs.
- Update ClientCompatibilityTest to verify describe configs
- Add test case to test describe configs with empty configuration Keys

Author: Manikumar Reddy <manikumar.reddy@gmail.com>

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>

Closes apache#9046 from omkreddy/KAFKA-9432
@tombentley

Copy link
Copy Markdown
Member Author

@omkreddy sorry about that, I was away. I see that you fixed it in the meantime.

@tombentley

Copy link
Copy Markdown
Member Author

@omkreddy, also thanks for the pointer to that compatibility test, I wasn't previously aware of it, but I'll use it now that I am.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants