Re: [PR] MINOR: Update of the PAPI testing classes to the latest implementation [kafka]

2024-02-22 Thread via GitHub


mjsax merged PR #12740:
URL: https://github.com/apache/kafka/pull/12740


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] MINOR: Update of the PAPI testing classes to the latest implementation [kafka]

2023-10-12 Thread via GitHub


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


##
streams/src/test/java/org/apache/kafka/test/MockProcessor.java:
##
@@ -41,16 +42,14 @@ public MockProcessor() {
 delegate = new MockApiProcessor<>();
 }
 
-@SuppressWarnings("unchecked")
 @Override
-public void init(final ProcessorContext context) {
-super.init(context);
-
delegate.init((org.apache.kafka.streams.processor.api.ProcessorContext) context);
+public void init(ProcessorContext context) {
+delegate.init(context);
 }
 
 @Override
-public void process(final K key, final V value) {
-delegate.process(new Record<>(key, value, context.timestamp(), 
context.headers()));
+public void process(Record record) {
+delegate.process(new Record<>(record.key(), record.value(), 
record.timestamp(), record.headers()));

Review Comment:
   Why do we need to make a deep copy? Can we not just forward `record` 
reference?



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org