[ https://issues.apache.org/jira/browse/KAFKA-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Neha Narkhede updated KAFKA-238: -------------------------------- Attachment: kafka-238-v2.patch Patch applies cleanly on 0.8 1. Done 2. Changed that and log segment metadata request to 1 byte 3. Since this is a rarely used API, I can't see the benefit of caching information from zookeeper. Besides, that will add overhead of maintaining cache coherency. Maybe this can be a future enhancement if we see the need at that time. 4. Good point. This patch doesn't attempt to solve the log metadata problem. It simply lays out the groundwork if we find it useful to return that information through this API or even a separate API. Having said that, adding another API to get the segment metadata might not be a bad idea. I would like to file another JIRA to track the log segment metadata API issue, and not delete the helper code this patch has. 4. Done 5. This will be very helpful. I would also like to add a JIRA to cleanup our tests to use EasyMock efficiently. > add a getTopicMetaData method in broker and expose it to producer > ------------------------------------------------------------------ > > Key: KAFKA-238 > URL: https://issues.apache.org/jira/browse/KAFKA-238 > Project: Kafka > Issue Type: Sub-task > Components: core > Reporter: Jun Rao > Assignee: Neha Narkhede > Attachments: kafka-238-v1.patch, kafka-238-v2.patch > > > We need a way to propagate the leader and the partition information to the > producer so that it can do load balancing and semantic partitioning. One way > to do that is to have the producer get the information from ZK directly. This > means that the producer needs to maintain a ZK session and has to subscribe > to watchers, which can be complicated. An alternative approach is to have the > following api on the broker. > TopicMetaData getTopicMetaData(String: topic) > TopicMetaData { > Array[PartitionMetaData]: partitionsMetaData > } > PartitionMetaData { > Int: partitionId > String: leaderHostname > Int: leaderPort > } > Using this api, the producer can get the metadata about a topic during > initial startup or leadership change of a partition. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira