You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Ewen Cheslack-Postava (JIRA)" <ji...@apache.org> on 2015/07/24 06:51:05 UTC

[jira] [Updated] (KAFKA-2356) Support retrieving partitions of ConsumerRecords

     [ https://issues.apache.org/jira/browse/KAFKA-2356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ewen Cheslack-Postava updated KAFKA-2356:
-----------------------------------------
    Reviewer: Guozhang Wang

> Support retrieving partitions of ConsumerRecords
> ------------------------------------------------
>
>                 Key: KAFKA-2356
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2356
>             Project: Kafka
>          Issue Type: Improvement
>    Affects Versions: 0.8.3
>            Reporter: Stevo Slavic
>            Priority: Trivial
>              Labels: newbie
>
> In new consumer on trunk, ConsumerRecords has method to retrieve records for given TopicPartition, but there is no method to retrieve TopicPartition's included/available in ConsumerRecords. Please have it supported.
> Method could be something like:
> {noformat}
> /**
>  * Get partitions of records returned by a {@link Consumer#poll(long)} operation
> */
> public Set<TopicPartition> partitions() {
>     return Collections.unmodifiableSet(this.records.keySet());
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)