[ https://issues.apache.org/jira/browse/KAFKA-1215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14682185#comment-14682185 ]
ASF GitHub Bot commented on KAFKA-1215: --------------------------------------- GitHub user allenxwang opened a pull request: https://github.com/apache/kafka/pull/132 KAFKA-1215: Rack-Aware replica assignment option The PR tries to achieve the following: - Make rack-aware assignment and rack data structure optional as opposed to be part of the core data structure/protocol to ease the migration. The implementation of that returns the map of broker to rack is pluggable. User needs to pass the implementation class as a Kafka runtime configuration or command line argument. - The rack aware replica assignment is best effort when distributing the replicas to racks. When there are more replicas than racks, it ensures each rack has at least one replica. When there are more racks than replicas, it ensures each rack has at most one replica. It also tries to keep the even distribution of replicas among brokers and racks when possible. You can merge this pull request into a Git repository by running: $ git pull https://github.com/allenxwang/kafka KAFKA-1215 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/132.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #132 ---- commit 3cccc5db23ee7987a1811d630f14de66a99ce638 Author: Allen Wang <aw...@netflix.com> Date: 2015-08-11T17:52:37Z KAFKA-1215: Rack-Aware replica assignment option ---- > Rack-Aware replica assignment option > ------------------------------------ > > Key: KAFKA-1215 > URL: https://issues.apache.org/jira/browse/KAFKA-1215 > Project: Kafka > Issue Type: Improvement > Components: replication > Affects Versions: 0.8.0 > Reporter: Joris Van Remoortere > Assignee: Jun Rao > Fix For: 0.9.0 > > Attachments: rack_aware_replica_assignment_v1.patch, > rack_aware_replica_assignment_v2.patch > > > Adding a rack-id to kafka config. This rack-id can be used during replica > assignment by using the max-rack-replication argument in the admin scripts > (create topic, etc.). By default the original replication assignment > algorithm is used because max-rack-replication defaults to -1. > max-rack-replication > -1 is not honored if you are doing manual replica > assignment (preffered). > If this looks good I can add some test cases specific to the rack-aware > assignment. > I can also port this to trunk. We are currently running 0.8.0 in production > and need this, so i wrote the patch against that. -- This message was sent by Atlassian JIRA (v6.3.4#6332)