Skip to content

KAFKA-9435: DescribeLogDirs automated protocol#7972

Merged
mimaison merged 7 commits intoapache:trunkfrom
tombentley:KAFKA-9435-DescribeLogDirs-automated-protocol
Mar 19, 2020
Merged

KAFKA-9435: DescribeLogDirs automated protocol#7972
mimaison merged 7 commits intoapache:trunkfrom
tombentley:KAFKA-9435-DescribeLogDirs-automated-protocol

Conversation

@tombentley
Copy link
Copy Markdown
Member

Also add version 2 to make use of flexible versions, per KIP-482.

Committer Checklist (excluded from commit message)

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

@tombentley
Copy link
Copy Markdown
Member Author

@cmccabe are you able to review this?

Copy link
Copy Markdown
Member

@mimaison mimaison left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I've made a very quick first pass and left a few comments

Comment thread clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java Outdated
@tombentley tombentley force-pushed the KAFKA-9435-DescribeLogDirs-automated-protocol branch from f3b8edb to de57806 Compare February 25, 2020 12:07
@tombentley
Copy link
Copy Markdown
Member Author

@mimaison done, if you want to do another pass.

Copy link
Copy Markdown
Member

@mimaison mimaison left a comment

Choose a reason for hiding this comment

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

I've made a quick pass and left a few comments.
Can you also rebase on trunk?

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.

We can remove a bunch of brackets in this statement

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.

I think it's slightly more readable if each setter is called on a new line. There're a few places where setLogDir() is called inline in this file.

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.

Is this comment still acurate?

@tombentley tombentley force-pushed the KAFKA-9435-DescribeLogDirs-automated-protocol branch from de57806 to 39fb997 Compare March 17, 2020 16:13
@tombentley
Copy link
Copy Markdown
Member Author

@mimaison fixed review comments and rebased.

Copy link
Copy Markdown
Member

@mimaison mimaison left a comment

Choose a reason for hiding this comment

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

I've made another pass and spotted a couple of tiny issues. Happy to merge once fixed

this.data = new DescribeLogDirsRequestData(struct, version);
}

// topicPartitions == null indicates requesting all partitions, and an empty list indicates requesting no partitions.
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.

This comment can now be removed

import org.apache.kafka.common.replica.ReplicaView.DefaultReplicaView
import org.apache.kafka.common.replica.{ClientMetadata, _}
import org.apache.kafka.common.requests.DescribeLogDirsResponse.{LogDirInfo, ReplicaInfo}
import org.apache.kafka.common.message.DescribeLogDirsResponseData._
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.

nit: Can we put this with the other import from the same package

@tombentley
Copy link
Copy Markdown
Member Author

@mimaison done

Copy link
Copy Markdown
Member

@mimaison mimaison left a comment

Choose a reason for hiding this comment

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

I've left a couple of new comments for issues we should fix

@@ -49,105 +43,54 @@ public class DescribeLogDirsRequest extends AbstractRequest {
TOPIC_NAME,
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.

This V0 schema should be deleted too


// topicPartitions == null indicates requesting all partitions, and an empty list indicates requesting no partitions.
public DescribeLogDirsRequest(Set<TopicPartition> topicPartitions, short version) {
public DescribeLogDirsRequest(DescribeLogDirsRequestData data, short version) {
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.

The comment above is out of date

@tombentley
Copy link
Copy Markdown
Member Author

Sloppy! Thanks, now fixed.

@mimaison mimaison merged commit 4f1e833 into apache:trunk Mar 19, 2020
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.

2 participants