mjsax commented on code in PR #23134:
URL: https://github.com/apache/kafka/pull/23134#discussion_r3762223463


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/ProcessorTopologyTest.java:
##########
@@ -1371,4 +1366,23 @@ public long extract(final ConsumerRecord<Object, Object> 
record, final long part
             return DEFAULT_TIMESTAMP;
         }
     }
+    
+    private static class FixedPartitionPartitioner implements 
StreamPartitioner<Integer, Object> {

Review Comment:
   ```suggestion
       private static class FixedPartitionPartitioner implements 
StreamPartitioner<String, String> {
   ```



##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/OptimizedKTableIntegrationTest.java:
##########
@@ -222,4 +224,23 @@ private Properties streamsConfiguration(final String 
safeTestName) {
         config.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, 1000);
         return config;
     }
+
+    private static class FixedPartitionPartitioner implements 
StreamPartitioner<Integer, Object> {

Review Comment:
   Seems we are duplicating code here (3x in this PR), plus already existing 
`FixedPartitionPartitioner` in `StreamsMetadataStateTest`).
   
   Might be worth to move to `test-fixtures` module and have it only a single 
time?



##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/KStreamRepartitionIntegrationTest.java:
##########
@@ -398,9 +405,18 @@ public void 
shouldUseStreamPartitionerForRepartitionOperation(final String topol
 
         final Repartitioned<Integer, String> repartitioned = Repartitioned
             .<Integer, String>as(repartitionName)
-            .withStreamPartitioner((topic, key, value, numPartitions) -> {
-                partitionerInvocation.incrementAndGet();
-                return Optional.of(Collections.singleton(partition));
+            .withStreamPartitioner(new StreamPartitioner<>() {
+                @SuppressWarnings({"removal"})

Review Comment:
   ```suggestion
                   @SuppressWarnings("removal")
   ```



##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/ProcessorTopologyTest.java:
##########
@@ -1371,4 +1366,23 @@ public long extract(final ConsumerRecord<Object, Object> 
record, final long part
             return DEFAULT_TIMESTAMP;
         }
     }
+    
+    private static class FixedPartitionPartitioner implements 
StreamPartitioner<Integer, Object> {

Review Comment:
   The removed code also uses `<String, String>`
   ```
   private StreamPartitioner<String, String> constantPartitioner(final Integer 
partition)
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to