-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34273/#review84223
-----------------------------------------------------------



core/src/main/scala/kafka/coordinator/PartitionAssignor.scala
<https://reviews.apache.org/r/34273/#comment135362>

    I feel this logic's irregular assignment result may make it a bit harder to 
reason for debugging. For example if you have three consumers (1,2,3) with two 
topics each with three partitions, and consumer 1/2 subscribe to topic 1/2 
while consumer 3 only subscribe to 2. The result would be:
    
    t1p0: c1
    t1p1: c2
    t1p2: c1
    t2p0: c2
    t2p0: c1
    t2p0: c3
    
    Instead it may be clearer to have:
    
    t1p0: c1
    t1p1: c2
    t1p2: c1
    t2p0: c1
    t2p1: c2
    t2p2: c3
    
    So I suggest grouping the consumers by subscribed topics, and for each 
group do the round-robin.


- Guozhang Wang


On May 15, 2015, 3:46 p.m., Onur Karaman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34273/
> -----------------------------------------------------------
> 
> (Updated May 15, 2015, 3:46 p.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-2196
>     https://issues.apache.org/jira/browse/KAFKA-2196
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> roundrobin doesn't need to make all consumers have identical topic 
> subscriptions.
> 
> todo:
> - run this and range through some simulations
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/coordinator/PartitionAssignor.scala 
> 106982286ce7a9e4f0e9722da2812e3a8e7a6cc3 
>   core/src/test/scala/unit/kafka/coordinator/PartitionAssignorTest.scala 
> ba6d5cd85b89214247209d974701eb6c9eb1e2b2 
> 
> Diff: https://reviews.apache.org/r/34273/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Onur Karaman
> 
>

Reply via email to