You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/08/06 14:49:49 UTC

[GitHub] [kafka] guillaumebort opened a new pull request #9132: Times for offsets

guillaumebort opened a new pull request #9132:
URL: https://github.com/apache/kafka/pull/9132


   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [kafka] Amanda1232 commented on a change in pull request #9132: [KAFKA-10422] [WIP] Introduce `timesForOffsets` in `KafkaConsumer`

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [kafka] guillaumebort closed pull request #9132: [KAFKA-10422] [WIP] Introduce `timesForOffsets` in `KafkaConsumer`

Posted by GitBox <gi...@apache.org>.
guillaumebort closed pull request #9132:
URL: https://github.com/apache/kafka/pull/9132


   


----------------------------------------------------------------
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:
users@infra.apache.org