[ https://issues.apache.org/jira/browse/KAFKA-6775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16443259#comment-16443259 ]
ASF GitHub Bot commented on KAFKA-6775: --------------------------------------- guozhangwang closed pull request #4859: KAFKA-6775: Fix the issue of without init super class's URL: https://github.com/apache/kafka/pull/4859 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/streams/src/test/java/org/apache/kafka/streams/perf/SimpleBenchmark.java b/streams/src/test/java/org/apache/kafka/streams/perf/SimpleBenchmark.java index faab52e2118..e1b45f52e40 100644 --- a/streams/src/test/java/org/apache/kafka/streams/perf/SimpleBenchmark.java +++ b/streams/src/test/java/org/apache/kafka/streams/perf/SimpleBenchmark.java @@ -439,6 +439,7 @@ private void processStreamWithStateStore(final String topic) { @SuppressWarnings("unchecked") @Override public void init(final ProcessorContext context) { + super.init(context); store = (KeyValueStore<Integer, byte[]>) context.getStateStore("store"); } @@ -446,12 +447,6 @@ public void init(final ProcessorContext context) { public void process(final Integer key, final byte[] value) { store.put(key, value); } - - @Override - public void punctuate(final long timestamp) {} - - @Override - public void close() {} }; } }, "store"); diff --git a/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestUtil.java b/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestUtil.java index 87ca82918a9..9e62e3fc9ae 100644 --- a/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestUtil.java +++ b/streams/src/test/java/org/apache/kafka/streams/tests/SmokeTestUtil.java @@ -47,6 +47,7 @@ @Override public void init(final ProcessorContext context) { + super.init(context); System.out.println("initializing processor: topic=" + topic + " taskId=" + context.taskId()); numRecordsProcessed = 0; } @@ -59,12 +60,6 @@ public void process(final Object key, final Object value) { System.out.println("processed " + numRecordsProcessed + " records from topic=" + topic); } } - - @Override - public void punctuate(final long timestamp) {} - - @Override - public void close() {} }; } }; ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 > AbstractProcessor created in SimpleBenchmark should call super#init > ------------------------------------------------------------------- > > Key: KAFKA-6775 > URL: https://issues.apache.org/jira/browse/KAFKA-6775 > Project: Kafka > Issue Type: Bug > Components: streams > Reporter: Ted Yu > Assignee: Jimin Hsieh > Priority: Minor > Labels: easy-fix, newbie > Fix For: 1.2.0 > > > Around line 610: > {code} > return new AbstractProcessor<Integer, byte[]>() { > @Override > public void init(ProcessorContext context) { > } > {code} > super.init should be called above. -- This message was sent by Atlassian JIRA (v7.6.3#76005)