[ 
https://issues.apache.org/jira/browse/KAFKA-2892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15028148#comment-15028148
 ] 

ASF GitHub Bot commented on KAFKA-2892:
---------------------------------------

GitHub user eljefe6a opened a pull request:

    https://github.com/apache/kafka/pull/592

    KAFKA-2892 Consumer Docs Use Wrong Method

    The KafkaConsumer docs use a non-existent method for assigning partitions 
(consumer.assign).
    
    The JavaDocs show as:
    ```
    String topic = "foo";
    TopicPartition partition0 = new TopicPartition(topic, 0);
    TopicPartition partition1 = new TopicPartition(topic, 1);
    consumer.assign(partition0);
    consumer.assign(partition1);
    ```
    
    Should be:
    ```
    String topic = "foo";
    TopicPartition partition0 = new TopicPartition(topic, 0);
    TopicPartition partition1 = new TopicPartition(topic, 1);
    consumer.assign(Arrays.asList(partition0, partition1));
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/eljefe6a/kafka trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/592.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 #592
    
----
commit 3a9bb6b28771634481eb4edc6c8031b1361c3f25
Author: Jesse Anderson <eljef...@gmail.com>
Date:   2015-11-26T04:38:44Z

    KAFKA-2892 Consumer Docs Use Wrong Method

----


> Consumer Docs Use Wrong Method
> ------------------------------
>
>                 Key: KAFKA-2892
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2892
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 0.9.0.0
>            Reporter: Jesse Anderson
>             Fix For: 0.9.0.0
>
>         Attachments: docspatch.diff
>
>
> The KafkaConsumer docs use a non-existent method for assigning partitions 
> ({{consumer.assign}}).
> The JavaDocs show as:
>      String topic = "foo";
>      TopicPartition partition0 = new TopicPartition(topic, 0);
>      TopicPartition partition1 = new TopicPartition(topic, 1);
>      consumer.assign(partition0);
>      consumer.assign(partition1);
> Should be:
>      String topic = "foo";
>      TopicPartition partition0 = new TopicPartition(topic, 0);
>      TopicPartition partition1 = new TopicPartition(topic, 1);
>      consumer.assign(Arrays.asList(partition0));
>      consumer.assign(Arrays.asList(partition1));



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

Reply via email to