kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-2335; fix comment about thread safety
Date Wed, 15 Jul 2015 22:46:47 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 99c0686be -> 4fcb7acaf


KAFKA-2335; fix comment about thread safety

Author: Jason Gustafson <jason@confluent.io>

Closes #78 from hachikuji/KAFKA-2335 and squashes the following commits:

c697998 [Jason Gustafson] KAFKA-2335; fix comment about consumer thread safety


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

Branch: refs/heads/trunk
Commit: 4fcb7acafe4c98cd2930e6d348d456a3eb7f7444
Parents: 99c0686
Author: Jason Gustafson <jason@confluent.io>
Authored: Wed Jul 15 15:46:19 2015 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Wed Jul 15 15:46:19 2015 -0700

----------------------------------------------------------------------
 .../org/apache/kafka/clients/consumer/KafkaConsumer.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/4fcb7aca/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 9f64255..bea3d73 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
@@ -66,9 +66,8 @@ import static org.apache.kafka.common.utils.Utils.min;
  * The consumer maintains TCP connections to the necessary brokers to fetch data for the
topics it subscribes to.
  * Failure to close the consumer after use will leak these connections.
  * <p>
- * The consumer is thread safe but generally will be used only from within a single thread.
The consumer client has no
- * threads of it's own, all work is done in the caller's thread when calls are made on the
various methods exposed.
- * 
+ * The consumer is not thread-safe. See <a href="#multithreaded">Multi-threaded Processing</a>
for more details.
+ *
  * <h3>Offsets and Consumer Position</h3>
  * Kafka maintains a numerical offset for each record in a partition. This offset acts as
a kind of unique identifier of
  * a record within that partition, and also denotes the position of the consumer in the partition.
That is, a consumer
@@ -302,7 +301,8 @@ import static org.apache.kafka.common.utils.Utils.min;
  * methods for seeking to the earliest and latest offset the server maintains are also available
(
  * {@link #seekToBeginning(TopicPartition...)} and {@link #seekToEnd(TopicPartition...)}
respectively).
  * 
- * <h3>Multithreaded Processing</h3>
+ *
+ * <h3><a name="multithreaded">Multi-threaded Processing</a></h3>
  * 
  * The Kafka consumer is NOT thread-safe. All network I/O happens in the thread of the application
  * making the call. It is the responsibility of the user to ensure that multi-threaded access


Mime
View raw message