Amanda1232 commented on a change in pull request #9132: URL: https://github.com/apache/kafka/pull/9132#discussion_r517141263
########## File path: clients/src/main/java/org/apache/kafka/common/requests/ListOffsetRequest.java ########## @@ -123,20 +126,36 @@ // V5 bump to include new possible error code (OFFSET_NOT_AVAILABLE) private static final Schema LIST_OFFSET_REQUEST_V5 = LIST_OFFSET_REQUEST_V4; + // V6 adds offset to partition + private static final Field PARTITIONS_V6 = PARTITIONS.withFields( + PARTITION_ID, + CURRENT_LEADER_EPOCH, + TIMESTAMP, + OFFSET); + + private static final Field TOPICS_V6 = TOPICS.withFields( + TOPIC_NAME, + PARTITIONS_V6); + + private static final Schema LIST_OFFSET_REQUEST_V6 = new Schema( + REPLICA_ID, + ISOLATION_LEVEL, + TOPICS_V6); + public static Schema[] schemaVersions() { return new Schema[] {LIST_OFFSET_REQUEST_V0, LIST_OFFSET_REQUEST_V1, LIST_OFFSET_REQUEST_V2, - LIST_OFFSET_REQUEST_V3, LIST_OFFSET_REQUEST_V4, LIST_OFFSET_REQUEST_V5}; + LIST_OFFSET_REQUEST_V3, LIST_OFFSET_REQUEST_V4, LIST_OFFSET_REQUEST_V5, LIST_OFFSET_REQUEST_V6}; } private final int replicaId; private final IsolationLevel isolationLevel; - private final Map<TopicPartition, PartitionData> partitionTimestamps; + private final Map<TopicPartition, PartitionData> partitionsData; private final Set<TopicPartition> duplicatePartitions; public static class Builder extends AbstractRequest.Builder<ListOffsetRequest> { Review comment: Our static analysis engine detects that your pull request includes a change that **class name shadows simple name of superclass**. According to [this description](https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#nm-class-names-shouldn-t-shadow-simple-name-of-superclass-nm-same-simple-name-as-superclass), it can be exceptionally confusing, creating many situations where you have to look at import statements to resolve references, and creating many opportunities to accidentally define methods that don't override the methods in their superclasses. ---------------------------------------------------------------- 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: us...@infra.apache.org