kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject kafka git commit: MINOR: Add description of how consumer wakeup acts if no threads are awakened
Date Fri, 04 Nov 2016 07:38:21 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk e795ad96c -> 5e7190cf8


MINOR: Add description of how consumer wakeup acts if no threads are awakened

I think the Javadoc should describe what happens if wakeup is called and no other thread is
currently blocking. This may be important in some cases, e.g. trying to shut down a poll thread,
followed by manually committing offsets.

Author: Stig Rohde Døssing <sdo@it-minds.dk>

Reviewers: Jason Gustafson <jason@confluent.io>

Closes #2093 from srdo/minor-expand-wakeup-javadoc


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/5e7190cf
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/5e7190cf
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/5e7190cf

Branch: refs/heads/trunk
Commit: 5e7190cf83860190d54815aab957a58c26fd816e
Parents: e795ad9
Author: Stig Rohde Døssing <sdo@it-minds.dk>
Authored: Fri Nov 4 00:37:18 2016 -0700
Committer: Jason Gustafson <jason@confluent.io>
Committed: Fri Nov 4 00:37:18 2016 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java  | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/5e7190cf/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
index b384211..fe53fb1 100644
--- a/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
+++ b/clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java
@@ -1475,6 +1475,7 @@ public class KafkaConsumer<K, V> implements Consumer<K, V>
{
     /**
      * Wakeup the consumer. This method is thread-safe and is useful in particular to abort
a long poll.
      * The thread which is blocking in an operation will throw {@link org.apache.kafka.common.errors.WakeupException}.
+     * If no thread is blocking in a method which can throw {@link org.apache.kafka.common.errors.WakeupException},
the next call to such a method will raise it instead.
      */
     @Override
     public void wakeup() {


Mime
View raw message