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 2021/09/07 14:04:43 UTC
[GitHub] [kafka] ijuma opened a new pull request #11307: KAFKA-13262: Remove final from `MockConsumer.close()` and delegate implementation
ijuma opened a new pull request #11307:
URL: https://github.com/apache/kafka/pull/11307
I added the final via 2f3600198722 to catch overriding mistakes
since the implementation was moved from the deprecated and
overloaded `close` with two parameters to the no-arg
`close`.
I didn't realize then that `MockConsumer` is a public
API (seems like a bit of a mistake since we tweak the
implementation and sometimes adds methods without a KIP).
Given that this is a public API, I have also moved the implementation
of `close` to the one arg overload. This makes it easier for a
subclass to have specific overriding behavior depending on the
timeout.
### 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.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on pull request #11307: KAFKA-13262: Remove final from `MockConsumer.close()` and delegate implementation
Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #11307:
URL: https://github.com/apache/kafka/pull/11307#issuecomment-914552427
Merged to master and cherry-picked to 3.0.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on a change in pull request #11307: KAFKA-13262: Remove final from `MockConsumer.close()` and delegate implementation
Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #11307:
URL: https://github.com/apache/kafka/pull/11307#discussion_r703555946
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java
##########
@@ -446,8 +447,8 @@ public synchronized void resume(Collection<TopicPartition> partitions) {
}
@Override
- public final synchronized void close() {
- this.closed = true;
+ public synchronized void close() {
Review comment:
Makes sense, done.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on a change in pull request #11307: KAFKA-13262: Remove final from `MockConsumer.close()` and delegate implementation
Posted by GitBox <gi...@apache.org>.
dajac commented on a change in pull request #11307:
URL: https://github.com/apache/kafka/pull/11307#discussion_r703548948
##########
File path: clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java
##########
@@ -446,8 +447,8 @@ public synchronized void resume(Collection<TopicPartition> partitions) {
}
@Override
- public final synchronized void close() {
- this.closed = true;
+ public synchronized void close() {
Review comment:
Should we move the `synchronized` to the other `close` method or add it there as well?
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma merged pull request #11307: KAFKA-13262: Remove final from `MockConsumer.close()` and delegate implementation
Posted by GitBox <gi...@apache.org>.
ijuma merged pull request #11307:
URL: https://github.com/apache/kafka/pull/11307
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on pull request #11307: KAFKA-13262: Remove final from `MockConsumer.close()` and delegate implementation
Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #11307:
URL: https://github.com/apache/kafka/pull/11307#issuecomment-914551974
Unrelated test failures:
> Build / JDK 17 and Scala 2.13 / org.apache.kafka.streams.integration.NamedTopologyIntegrationTest.shouldPrefixAllInternalTopicNamesWithNamedTopology
> Build / JDK 8 and Scala 2.12 / org.apache.kafka.streams.integration.NamedTopologyIntegrationTest.shouldPrefixAllInternalTopicNamesWithNamedTopology
> Build / JDK 8 and Scala 2.12 / org.apache.kafka.streams.integration.NamedTopologyIntegrationTest.shouldPrefixAllInternalTopicNamesWithNamedTopology
>
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org