kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: Improve doc string in PartitionGrouper
Date Fri, 24 Jun 2016 21:46:53 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.0 a06448b9b -> f630cc79a

MINOR: Improve doc string in PartitionGrouper

Author: Guozhang Wang <wangguoz@gmail.com>

Reviewers: Matthias J. Sax <matthias@confluent.io>

Closes #1550 from guozhangwang/Kminor-grouppartitioner-javadoc

(cherry picked from commit 0e0b632b926f52451495ab254e74ab87848cb353)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>

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

Branch: refs/heads/0.10.0
Commit: f630cc79ac5d57b3ee4e948c36bb08ad96333923
Parents: a06448b
Author: Guozhang Wang <wangguoz@gmail.com>
Authored: Fri Jun 24 14:46:39 2016 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Fri Jun 24 14:46:48 2016 -0700

 .../apache/kafka/streams/processor/PartitionGrouper.java  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/PartitionGrouper.java
index 0c94084..71bfe99 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/PartitionGrouper.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/PartitionGrouper.java
@@ -35,8 +35,14 @@ public interface PartitionGrouper {
      * Returns a map of task ids to groups of partitions. A partition group forms a task,
thus, partitions that are
-     * expected to be processed together must be in the same group. DefaultPartitionGrouper
implements this
-     * interface. See {@link DefaultPartitionGrouper} for more information.
+     * expected to be processed together must be in the same group.
+     *
+     * Note that the grouping of partitions need to be <b>sticky</b> such that
for a given partition, its assigned
+     * task should always be the same regardless of the input parameters to this function.
This is to ensure task's
+     * local state stores remain valid through workload rebalances among Kafka Streams instances.
+     *
+     * The default partition grouper implements this interface by assigning all partitions
across different topics with the same
+     * partition id into the same task. See {@link DefaultPartitionGrouper} for more information.
      * @param topicGroups The map from the {@link TopologyBuilder#topicGroups(String)} topic
group} id to topics
      * @param metadata Metadata of the consuming cluster

View raw message