adikou commented on code in PR #23105:
URL: https://github.com/apache/kafka/pull/23105#discussion_r4232617563
##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerSinkTaskTest.java:
##########
@@ -366,7 +366,7 @@ public void testShutdown() throws Exception {
verify(sinkTask, times(2)).put(anyList());
doAnswer((Answer<ConsumerRecords<byte[], byte[]>>) invocation -> {
-
rebalanceListener.getValue().onPartitionsRevoked(INITIAL_ASSIGNMENT);
+
rebalanceListener.getValue().onPartitionsRevoked(INITIAL_ASSIGNMENT, null);
Review Comment:
Good catch. Andrew highlighted this in another PR, I've changed this to pass
in a mock and ensure we don't interact with it. I'll update the tests once the
other JIRA lands - the assertions will have to change by then.
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSinkTask.java:
##########
@@ -729,9 +731,9 @@ long getNextCommit() {
return nextCommit;
}
- private class HandleRebalance implements ConsumerRebalanceListener {
+ private class HandleRebalance implements RebalanceListener {
@Override
- public void onPartitionsAssigned(Collection<TopicPartition>
partitions) {
+ public void onPartitionsAssigned(Collection<TopicPartition>
partitions, RebalanceConsumer rebalanceConsumer) {
Review Comment:
Yes, unused for now to get compilation going. But I see an opportunity to
actually do the right thing™ and have `HandleRebalance` make use of the
`RebalanceConsumer` arg and not store a `consumer` reference if possible.
I'll file a follow-up JIRA to tackle that.
--
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]